Jump to content

Recommended Posts

Posted

doesnt seem to be working

You know what? ...until you give some background on what you are wanting to accomplish your answers will be as poor as your questions...

So, here is my answer...

try it again... but harder this time.

Lar.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Posted

You know what? ...until you give some background on what you are wanting to accomplish your answers will be as poor as your questions...

So, here is my answer...

try it again... but harder this time.

Lar.

I looking for a plain script that will hold the shift key down untill i send a cmd to release it.

Posted (edited)

I looking for a plain script that will hold the shift key down untill i send a cmd to release it.

There may be a bug in "SHIFT DOWN" ... try "SHIFTDOWN". I think AutoIt has some special doings for modifier keys...

Send("{SHIFTDOWN}")

SHIFTUP later

Lar.

buggerfugginmuggerfudder...bleepbleep

Edited by LarryDalooza

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Posted

Im having some trouble release the keys again now :mellow:

; Hotkeys
HotKeySet("{F11}", "hammer_toggle")
$autohammer = 0
Func hammer_toggle()
        If $autohammer = 0 Then 
        Sleep(100)
        MouseUp("left")
        Send("{ShiftUp}")
        Sleep(100)
        $autohammer = 1
    Else 
        Sleep(100)
        MouseDown("left")
        Send("{ShiftDown}")
        Sleep(100)
        $autohammer = 0
        EndIf
    EndFunc 


; Idle
While 1
    Sleep(10)
Wend

Getting it to hold down the mouse + shift key is working fine now, but I cant get it to release it after pressing F11 the second time.

Posted

could it be because shift is down :mellow: . your hot key would need to be shift F11. If I'm not mistaken

Tried changing it to some numpad keys and even a simple "P".

Didnt change anything :(

Posted

if you as in there for a msgbox to come up, does that work? what about setting a timer to auto shiftup after 5 seconds, does that work? I personally have never used hotkeys.

Giggity

Posted (edited)

Shouldn't it be:

; Hotkeys
HotKeySet("{F11}", "hammer_toggle")
global $autohammer = 0
Func hammer_toggle()
   If $autohammer = 0 Then
      Sleep(100)
      MouseDown("left")
      Send("{ShiftDown}")
      Sleep(100)
      $autohammer = 1
      HotKeySet("{F11}")
      HotKeySet("+{F11}", "hammer_toggle")
   Else
      Sleep(100)
      MouseUp("left")
      Send("{ShiftUp}")
      Sleep(100)
      $autohammer = 0
      HotKeySet("+{F11}")
      HotKeySet("{F11}", "hammer_toggle")
   EndIf
EndFunc   
; Idle
While 1
   Sleep(10)
Wend
Edited by senthor
Posted (edited)

Shouldn't it be:

; Hotkeys
HotKeySet("{F11}", "hammer_toggle")
global $autohammer = 0
Func hammer_toggle()
   If $autohammer = 0 Then
      Sleep(100)
      MouseDown("left")
      Send("{ShiftDown}")
      Sleep(100)
      $autohammer = 1
      HotKeySet("{F11}")
      HotKeySet("+{F11}", "hammer_toggle")
   Else
      Sleep(100)
      MouseUp("left")
      Send("{ShiftUp}")
      Sleep(100)
      $autohammer = 0
      HotKeySet("+{F11}")
      HotKeySet("{F11}", "hammer_toggle")
   EndIf
EndFunc   
; Idle
While 1
   Sleep(10)
Wend
Seems to be working :mellow:

thanks alot

Edited by pastak
Posted

you know what the problem was?

When Shift-Key is down, the hotkey must be shift+f11.

not f11.

:mellow:

ah and the "+" is instead of shift :(?

  • 10 years later...
Posted

i can get any include where i can use    Send("{ShiftDown}") and    Send("{ShiftUp}") for other heys ?
like Send("{EntertDown}") or Send("{wDown}")




 

  • Jos locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...