File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes General Computing and the fly likes call batch or executable script with shortcut key in Win XP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » General Computing
Bookmark "call batch or executable script with shortcut key in Win XP" Watch "call batch or executable script with shortcut key in Win XP" New topic
Author

call batch or executable script with shortcut key in Win XP

Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
Although I don't tend to remember to use it, I specified Ctrl+Alt+W as a shortcut key combo for starting up Winamp on my computer. Now, I want to use a comparably simple keystroke combo to run some scripts for some very frequent and annoying tasks I have to pretty often. I was hoping for something as simple as Ctrl+Alt+J or something like that. However, it doesn't run the batch file, and I'm wondering if a .bat file is not considered a Windows program and isn't eligible for those kinds of shortcuts (even though it lets you specify a shortcut).
If not and it is possible, how do you do it?
himanshu patel
Ranch Hand

Joined: Feb 03, 2003
Posts: 205
I created first shortcut of existing .bat file.Then i moved shotcut file to desktop.And rightclick->properties->Shortcut key, I specified own keyborad shortcut key and it is working fine.I am using XP.


If you want to become a rich, do not work for others but make others to work for you.
himanshu patel
Ranch Hand

Joined: Feb 03, 2003
Posts: 205
After assigning keyborad shortcut, if I rename file,It does not work for me.What I did is again specified new shortcut key, launched file
using new shortcut key and then again I specfied previous shortcut key and its is working again......
DO not know why this behaviour
Stephen Huey
Ranch Hand

Joined: Jul 15, 2003
Posts: 618
There are restrictions on where the shortcut can be. I wanted to be able to call my batch file no matter what window/program had the focus, which meant that just having it on the Desktop wasn't good enough for me b/c I actually had to click on the Desktop to be able to use the shortcut keys. However, I found that in XP I could put the shortcut file in my Start Menu folder and now I can use the keystroke combo anywhere to run it! (I didn't put it under my Documents->Administrator or my username--I put it under All Users).
 
GeeCON Prague 2014
 
subject: call batch or executable script with shortcut key in Win XP