Execute batch-file from browser - browser

i have got a batch-File. I mostly have to execute it when i'm in my browser (Firefox).
So i dont want to go to the directory and execute it. I want to have something in my browser.
First i thought about making a firefox-add-on. Something like a button, which executes my batch-file. But I failed.
Then i made a bookmark to the file, but it only shows me the content of the batch-file.
Is there any other option to execute a batch-file from the browser?
EDIT: I have found an add-on that creates an button to execute files:
https://addons.mozilla.org/de/firefox/addon/external-application-button/

I don't know a way you can run this from a browser, but perhaps you don't need to. I'd create a global keyboard shortcut. You haven't mentioned your OS so I've assumed Windows.
Go to your desktop, right-click and select New > Shortcut.
Browse to your .bat file.
Name the shortcut whatever you like - probably best to use yourfile.bat shortcut or similar.
Right-click your newly-created shortcut and select Properties.
On the Shortcut tab, click into the Shortcut key area.
Press Ctrl+Alt+B. I've used B for bat - you can use what you like, although some shortcuts may be used already in your browser - test and adjust if necessary.
Click OK - you're good to go!

Related

failed to launch preferred application for category TerminalEmulator?

I get this error:
Failed to launch preferred application for category "TerminalEmulator".
Step 1
Go to applications and search for qterminal and open QTerminal.
This will open a terminal.
Step 2
Type sudo apt install xfce4-settings, hit enter, wait for process to complete.
Now you can use all your applications.
After a lot of scrapping through various answers which asked to install or update various things, all just was for NO LUCK!
Then I decided to do it in my own lazy way.
I donot have any problem with QTerminal, hence I just tweak some parts in the thunar and settings.
In thunar(file manager) > Edit > Configure custom actions > Open Terminal Here (If this tag is not available then create it or if there is multiple tags with same value then keep only one and delete other)>double click on it to open and customize it.
In the next box you'll see "command" which will be run when clicking on "Open Terminal Here". Just dont write any command manually. There on the right side a "Select Application" icon is present. Just click it and select your preferred terminal. Save this change and Bingo! you'll be opening the folder in your preferred terminal.
now you'll see the command (basically path to the terminal application with a modifier f to open folder). Select only the application path and copy it, we'll need it in step 2.
In this step we will set up just tweak setting
Setting>Keyboard>Shortcuts
if Ctrl+Alt+T is already defined here then just edit it or create new "Custom shortcut"
paste the copied path of the terminal (what we copied in step 1) in the command section. Save it
DONE!!! *** You can set any shortcut key for your convenience ***

How to bind keyboard shortcut to run command on selected file in linux?

I know how to set a keyboard command shortcut, that's easy, I just go to Applications > Settings > Keyboard and then click the Application Shortcuts tab within my Manjaro Linux system and set whatever command to whatever shortcut.
But how can I make it run that command on a selected file or selection of files?
Is there something I can change or add to the command to make it run on the file or files currently selected within my XFCE desktop environment?
Thanks!
Your approach would require to correlate your mouse position to your desktop and file-manager. Then you would need to have knowledge of the internal state. You then would need to display some GUI. This way of thinking in regards of programing is seriously wrong.
What you are looking for are context menu actions. So keep it that way.
You have files on your desktop or in the file-manager and can call user defined actions on one or more files. I think XFCE had something like Thunar. You may use caja wit caja --no-desktop and create some actions with caja-actions-config-tool. Gnome still has it, if you prefer Nautilus.

How to change the functionality of a button so that it can work as the backspace button

Okay, so I have a Compaq laptop [American keyboard].
It is a few days that the backspace button is broken - I mean, it is totally popped off. It ought to be replaced but it is hard to find it out.
Now, I was wondering whether or not there was a way to change the functionality of another button so that it can replace the functionality of the backspace button.
It is not the DEL button. It is the BACKSPACE button [above the Enter button].
I knew that through some binary numbers it is possible to change the functionality of a button. For example, I can change the DEL button in the Number Lock so that instead of working as DEL button or dot, it will work as backspace.
Is it possible?
Another way on Ankit's recommendation:
After installing the AutoHotkey, creating the short script and saving it with .ahk extension, just put the file in the startup folder :) click Start(or windows logo)---All Program---startup folder :) then re-start pc.
If on windows, you may use AutoHotkey, install it, create a file with .ahk extension and put following code in it.
F1::Send {BackSpace} ; Makes the 'F1' key send 'BackSpace' key.
Then run the above script on startup.
More Details for remapping here.

how to assign keyboard shortcut for the typescript code window?

in VS2012 (with the ts extension installed) it seems that typescript files (.ts) isn't recognized as a code window
meaning, if you are focused on another window, hitting F7 doesn't switch to the typescript window for focus.
Does anyone know a custom keyboard shortcut override I can create to allow me to switch to the .ts file?
thank you.
The only way I can think of to navigate back to the code files for TypeScript, JavaScript, CSS and other files that aren't classed as "View Code" is this:
Use CTRL + Tab - this opens up an open file list. From here you can select the file to show.
This is actually a handy shortcut if you want to do the same as "View Code", but not go straight to the current "on top" code file - so it is worth knowing - even though it isn't going to be as fluid as your F7 shortcut.
If you want to use it like F7, just hit CTRL + Tab and then let go - the "on top" file will be selected by default.

Shortcut for reload jscript file

I am using notepad++ for jscript file editing and TestComplete for automation testing which uses the JScript files, but every time i exit and start the TestComplete whenever i change anything in Jscript file.
is there any short-cut-Key to reload without closing the TestComplete.
So, you are creating a script extension. Thank you for clarification. I have checked the Tools | Customize Keyboard... dialog and there is no a possibility to assign a shortcut to the Reload Script Extensions action. So, you can do this only by manually clicking the Reload button in the Script Extensions dialog. The Alt-F-E shortcut just opens this dialog (File | Install Script Extensions...).
http://www.philnicholas.com/2009/05/11/reloading-your-javascript-without-reloading-your-page/
This page explains what you're looking for, I think. All you need to do is change the event to when ur shortcut key is pressed.

Resources