pastak Posted November 6, 2008 Share Posted November 6, 2008 Is there a function to hold down a key ? Like the MouseDown Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 6, 2008 Share 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] Link to comment Share on other sites More sharing options...
pastak Posted November 6, 2008 Author Share Posted November 6, 2008 Send("{SHIFT down}")doesnt seem to be working Link to comment Share on other sites More sharing options...
LarryDalooza Posted November 6, 2008 Share 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 Link to comment Share on other sites More sharing options...
pastak Posted November 6, 2008 Author Share 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. Link to comment Share on other sites More sharing options...
Pain Posted November 6, 2008 Share Posted November 6, 2008 Try with {SHIFTDOWN} instead, without space. {SHIFTUP} to release the key. Link to comment Share on other sites More sharing options...
LarryDalooza Posted November 6, 2008 Share 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 Link to comment Share on other sites More sharing options...
pastak Posted November 6, 2008 Author Share 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. Link to comment Share on other sites More sharing options...
youknowwho4eva Posted November 6, 2008 Share 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 Link to comment Share on other sites More sharing options...
pastak Posted November 6, 2008 Author Share 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 Link to comment Share on other sites More sharing options...
youknowwho4eva Posted November 6, 2008 Share 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 Link to comment Share on other sites More sharing options...
senthor Posted November 6, 2008 Share 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 Link to comment Share on other sites More sharing options...
pastak Posted November 6, 2008 Author Share 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 Link to comment Share on other sites More sharing options...
senthor Posted November 6, 2008 Share 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 Link to comment Share on other sites More sharing options...
youknowwho4eva Posted November 6, 2008 Share 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 Link to comment Share on other sites More sharing options...
pastak Posted November 6, 2008 Author Share 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 ? Link to comment Share on other sites More sharing options...
youknowwho4eva Posted November 6, 2008 Share Posted November 6, 2008 yes, look up send in the help file, it will give you loads of valuables like that one. Giggity Link to comment Share on other sites More sharing options...
pastak Posted November 6, 2008 Author Share 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 Link to comment Share on other sites More sharing options...
Verssuss Posted January 27, 2019 Share 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}") Link to comment Share on other sites More sharing options...
Developers Jos Posted January 28, 2019 Developers Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts