Jump to content

karthikraju

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by karthikraju

  1. Thank you Firefox. I took your code and modified it as follows: #include <Misc.au3> #include <HotKey.au3> #include <vkConstants.au3> Local $hDLL = DLLOpen("user32.dll") _HotKey_Assign($VK_LAUNCH_APP1, '_funcApp', $HK_FLAG_WAIT) _HotKey_Assign(BitOR($CK_CONTROL, $VK_ESCAPE), 'funcQuit') While 1 Sleep(1000) WEnd Func _funcApp() ; Send("{LEFT}"); DOES NOT work(!), when not commented ; Send("^{LEFT}"); DOES work, when not commented ; Send("^+{LEFT}"); DOES work, when not commented If _isPressed("41", $hDLL) Then ; Send("{LEFT}"); IS NOT when "Hotkey & A" Send("^{LEFT}") ; IS NOT invoked when "Hotkey & A" Endif EndFunc Func funcQuit() Exit ; DOES work EndFunc DllClose($hDLL) As the inline comments show, the send "Left" does not work, but "Control + Left" and "Control + Shift + A" does. Also, I wanted to use the Hotkey and A to send "Left", but this doesn't work either. Any input is appreciated.
  2. FF is for one key, and is the key code for a key on the keyboard I've. Sorry, I am only tentative that the modifier name is Wake. Besides, the help file with the documentation for _isPressed [1] shows that it takes the key code as the argument and not the modifier name. Isn't it so? So, I tested the individual keys like you recommended as follows: #include <misc.au3> Local $hDLL = DllOpen("user32.dll") while 1 If _ispressed ("FF", $hDLL) and _ispressed (41, $hDLL) Then Send("{LEFT}") Endif wend DllClose($hDLL) which produced the intended result, but with side effects. The outcome results in multiple Left key presses and when the key combination is released it leaves an "a". Yes, indeed. Thanks. [1] http://www.autoitscript.com/autoit3/docs/libfunctions/_IsPressed.htm
  3. Sorry, I made a mistake with my first post. This code block ; DOES NOT work ; Alt + Wake + a = Home ; If _ispressed ("FF") and _ispressed ("12") Then ; Send("{HOME}") ; Endif should have been as follows: ; DOES NOT work ; Alt + Wake + a = Home If _ispressed ("FF") and _ispressed ("12") Then Send("{HOME}") Endif
  4. Hello, Background 1) AutoIt : 3.3.8.1 2) OS : Windows XP SP3 Issue I am attempting to create a set of keyboard shortcuts, as shown in the code below: #include <misc.au3> Local $hDLL = DllOpen("user32.dll") while 1 HotKeySet ("a" , "_keyA") wend Func _keyA () ; DOES work ; Wake + Left = Left If _ispressed ("FF") Then Send("{LEFT}") Endif ; DOES NOT work ; Alt + Wake + a = Home ; If _ispressed ("FF") and _ispressed ("12") Then ; Send("{HOME}") ; Endif EndFunc DllClose($hDLL) One of them, as indicated in the comment, works and sends a Left when pressing "Wake + a". The other one when sending "Alt + Wake + a" does not work. Could someone please let me know what is that I am doing wrong? Thank you for your time.
×
×
  • Create New...