This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

call batch or executable script with shortcut key in Win XP

 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
himanshu patel
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic