pastak Posted November 6, 2008 Posted November 6, 2008 Is there a function to hold down a key ? Like the MouseDown
dbzfanatic Posted November 6, 2008 Posted November 6, 2008 Send("{SHIFT down}") Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
pastak Posted November 6, 2008 Author Posted November 6, 2008 Send("{SHIFT down}")doesnt seem to be working
LarryDalooza Posted November 6, 2008 Posted November 6, 2008 doesnt seem to be workingYou 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. AutoIt has helped make me wealthy
pastak Posted November 6, 2008 Author Posted November 6, 2008 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.
Pain Posted November 6, 2008 Posted November 6, 2008 Try with {SHIFTDOWN} instead, without space. {SHIFTUP} to release the key.
LarryDalooza Posted November 6, 2008 Posted November 6, 2008 (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 laterLar.buggerfugginmuggerfudder...bleepbleep Edited November 6, 2008 by LarryDalooza AutoIt has helped make me wealthy
pastak Posted November 6, 2008 Author Posted November 6, 2008 Im having some trouble release the keys again now ; 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.
youknowwho4eva Posted November 6, 2008 Posted November 6, 2008 could it be because shift is down . your hot key would need to be shift F11. If I'm not mistaken Giggity
pastak Posted November 6, 2008 Author Posted November 6, 2008 could it be because shift is down . your hot key would need to be shift F11. If I'm not mistakenTried changing it to some numpad keys and even a simple "P".Didnt change anything
youknowwho4eva Posted November 6, 2008 Posted November 6, 2008 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
senthor Posted November 6, 2008 Posted November 6, 2008 (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 November 6, 2008 by senthor FileListToArray UDFMy tools
pastak Posted November 6, 2008 Author Posted November 6, 2008 (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 thanks alot Edited November 6, 2008 by pastak
senthor Posted November 6, 2008 Posted November 6, 2008 you know what the problem was? When Shift-Key is down, the hotkey must be shift+f11. not f11. FileListToArray UDFMy tools
youknowwho4eva Posted November 6, 2008 Posted November 6, 2008 :-P like I said. Only I haven't needed to use hotkeys yet, so I couldn't make an example and know it works Giggity
pastak Posted November 6, 2008 Author Posted November 6, 2008 you know what the problem was?When Shift-Key is down, the hotkey must be shift+f11.not f11. ah and the "+" is instead of shift ?
youknowwho4eva Posted November 6, 2008 Posted November 6, 2008 yes, look up send in the help file, it will give you loads of valuables like that one. Giggity
pastak Posted November 6, 2008 Author Posted November 6, 2008 yes, look up send in the help file, it will give you loads of valuables like that one.thank you both
Verssuss Posted January 27, 2019 Posted January 27, 2019 i can get any include where i can use Send("{ShiftDown}") and Send("{ShiftUp}") for other heys ? like Send("{EntertDown}") or Send("{wDown}")
Developers Jos Posted January 28, 2019 Developers Posted January 28, 2019 Oh, and while you have my attention: Stick to posting in one topic instead of cross posting the same question at different places. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts