Overclock.net › Forums › Components › Keyboards › AutoHotKey Script Help!
New Posts  All Forums:Forum Nav:

AutoHotKey Script Help!

post #1 of 3
Thread Starter 
I am having a hard time writing a specific script in AHK. I'm using my Pause Button as the Windows Button because my Omni Key 101 doesn't have a Windows Button. I am trying to write a script that says: Pause+1=Win+1, Pause+2=Win+2, etc... But I'm having a hard time writing a script that actually works. Ive tried:
Code:
Pause & 1::#1
Pause1::#1
1Pause::#1
and none of these work. Please help.
Project Predator
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 4.2 GHz GA-MA785GM-US2H EVGA GTX 260 Crucial Technology 4GB DDR2 800 
Hard DriveOptical DriveCoolingOS
1tb Samsung F3 LG dvd burner x24 XSPC Rasa rs240 Windows 7 Ultimate 64-bit 
MonitorKeyboardPowerCase
Samsung 22in 2253LW Razer Lycosa Corsair HX850w Alienware Area 51 
Mouse
Coolermaster Storm Sentinel 
  hide details  
Reply
Project Predator
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 4.2 GHz GA-MA785GM-US2H EVGA GTX 260 Crucial Technology 4GB DDR2 800 
Hard DriveOptical DriveCoolingOS
1tb Samsung F3 LG dvd burner x24 XSPC Rasa rs240 Windows 7 Ultimate 64-bit 
MonitorKeyboardPowerCase
Samsung 22in 2253LW Razer Lycosa Corsair HX850w Alienware Area 51 
Mouse
Coolermaster Storm Sentinel 
  hide details  
Reply
post #2 of 3
I haven't used AHK since, um... I think 2007, but something looks off about the 'send' portion of your script. What's with the # symbol?

Also, I don't think you can stack like that. For example, IIRC, to remap 'r' to send 'ty' you would do this:
Code:
r::ty
Read the manual for sending key combos.

Edit:
And I think there is more than one way to remap keys with AHK. Search the manual for the "send" command. I think you'll have more luck with that. In fact, now that I think about it, I think you have to use 'send' to input a string. It is a little bit slower running than the ::, but unless you're sending 5 commands a second, it doesn't really matter.
Edited by theCanadian - 12/19/10 at 1:56am
Move On It v2
(16 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 965 Gigabyte GA-MA790X-UD4P XFX Radeon HD 5750 G.Skill Pi F2-8800CL5-2GBPI 
RAMHard DriveOptical DriveCooling
G.Skill Pi F2-8800CL5-2GBPI 500GB WD + 160 WD + 500GB WD + 1TB WD DVD/Lightscribe Burner Thermaltake Big Typhoon 
OSMonitorKeyboardPower
Windows 7/ Windows XP Pro Performance Edition HANNspree HF229H 22" Dell AT101W SevenTeam ST-750ZAF 750W Modular 
CaseMouseMouse PadAudio
Cooler Master CM 690 Microsoft SideWinder X5 Nova Master Xonar D1 
  hide details  
Reply
Move On It v2
(16 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X4 965 Gigabyte GA-MA790X-UD4P XFX Radeon HD 5750 G.Skill Pi F2-8800CL5-2GBPI 
RAMHard DriveOptical DriveCooling
G.Skill Pi F2-8800CL5-2GBPI 500GB WD + 160 WD + 500GB WD + 1TB WD DVD/Lightscribe Burner Thermaltake Big Typhoon 
OSMonitorKeyboardPower
Windows 7/ Windows XP Pro Performance Edition HANNspree HF229H 22" Dell AT101W SevenTeam ST-750ZAF 750W Modular 
CaseMouseMouse PadAudio
Cooler Master CM 690 Microsoft SideWinder X5 Nova Master Xonar D1 
  hide details  
Reply
post #3 of 3
Thread Starter 
Quote:
Originally Posted by theCanadian;11700330 
I haven't used AHK since, um... I think 2007, but something looks off about the 'send' portion of your script. What's with the # symbol?

Also, I don't think you can stack like that. For example, IIRC, to remap 'r' to send 'ty' you would do this:
Code:
r::ty
Read the manual for sending key combos.

Edit:
And I think there is more than one way to remap keys with AHK. Search the manual for the "send" command. I think you'll have more luck with that. In fact, now that I think about it, I think you have to use 'send' to input a string. It is a little bit slower running than the ::, but unless you're sending 5 commands a second, it doesn't really matter.

Thanks for the response. I'll look into the send command. # is just a AHK shortcut for LWin. I just remapped the windows button with the pause button through the registry and it was much easier. biggrin.gif
Project Predator
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 4.2 GHz GA-MA785GM-US2H EVGA GTX 260 Crucial Technology 4GB DDR2 800 
Hard DriveOptical DriveCoolingOS
1tb Samsung F3 LG dvd burner x24 XSPC Rasa rs240 Windows 7 Ultimate 64-bit 
MonitorKeyboardPowerCase
Samsung 22in 2253LW Razer Lycosa Corsair HX850w Alienware Area 51 
Mouse
Coolermaster Storm Sentinel 
  hide details  
Reply
Project Predator
(14 items)
 
  
CPUMotherboardGraphicsRAM
Phenom II X4 4.2 GHz GA-MA785GM-US2H EVGA GTX 260 Crucial Technology 4GB DDR2 800 
Hard DriveOptical DriveCoolingOS
1tb Samsung F3 LG dvd burner x24 XSPC Rasa rs240 Windows 7 Ultimate 64-bit 
MonitorKeyboardPowerCase
Samsung 22in 2253LW Razer Lycosa Corsair HX850w Alienware Area 51 
Mouse
Coolermaster Storm Sentinel 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Keyboards
Overclock.net › Forums › Components › Keyboards › AutoHotKey Script Help!