Merchants Posted April 20, 2010 Share Posted April 20, 2010 hotkey stays down when func is done this is very bothersome is there not a dll or a way to run a func to let ALL the hotkeys come up ? already tryed: Send("{<Hotkey>Down}{<Hotkey>Up}") Link to comment Share on other sites More sharing options...
ForsakenGod Posted April 20, 2010 Share Posted April 20, 2010 Can you post your full source ? Link to comment Share on other sites More sharing options...
Merchants Posted April 20, 2010 Author Share Posted April 20, 2010 (edited) not full but what i use.. Global $run HotKeySet("!z", "start") While 1 WEnd Func start() some functions here While $run some functions here If ... = 0 Then $run = 0 EndIf WEnd EndFunc Edited April 20, 2010 by Merchants Link to comment Share on other sites More sharing options...
Developers Jos Posted April 20, 2010 Developers Share Posted April 20, 2010 (edited) This does not reproduce the issue so why post it and not post something that shows your problem? Edit: Also after your edit. Edited April 20, 2010 by 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...
Merchants Posted April 20, 2010 Author Share Posted April 20, 2010 (edited) wel it is a very big script + i don't want to post my full script (private script) Edited April 20, 2010 by Merchants Link to comment Share on other sites More sharing options...
Developers Jos Posted April 20, 2010 Developers Share Posted April 20, 2010 wel it is a very big script + i don't want to post my full script (private script)Don't even want to see it. post something sweet and simple that demonstrates the issue. 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...
Merchants Posted April 20, 2010 Author Share Posted April 20, 2010 pff then i have to make a demo i hope that works... Link to comment Share on other sites More sharing options...
Developers Jos Posted April 20, 2010 Developers Share Posted April 20, 2010 pff then i have to make a demo i hope that works...Well its simple: Either supply info or be prepared to pay the big bucks for the miracle you are asking for. 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...
Merchants Posted April 20, 2010 Author Share Posted April 20, 2010 got it i fond a way to make this demo simple open a notepad and run the script and press altdown+z then if it stops then alt = down and not up you can see that easy via presing tab expandcollapse popupGlobal $run, $index = "test", $i = 500, $p = True Opt("MouseCoordMode", 2) HotKeySet("!z","start") HotKeySet("!w","start1") HotKeySet("!s","start2") HotKeySet("!x","start3") While 1 WEnd Func Start() $run = 1 While $run ClipPut($index) MouseMove(10, 10, 0) MouseClick("Left") Send("^v") If $p = True Then ClipPut($index) Send("{Tab}{Sleep 5}^v") Else EndIf MouseMove(10, 10, 0) MouseClick("Left") Sleep($i) If PixelGetColor(109,9) = 0xAC9C64 Then Else $run = 0 EndIf WEnd EndFunc Func Start1() HotKeySet("!w") $run = $run +1 HotKeySet("!w","start1") EndFunc Func Start2() HotKeySet("!s") $run = $run -1 HotKeySet("!s","start2") EndFunc Func Start3() HotKeySet("!x") $p = True HotKeySet("!x","start4") EndFunc Func Start4() HotKeySet("!x") $p = False HotKeySet("!x","start3") EndFunc Link to comment Share on other sites More sharing options...
martin Posted April 20, 2010 Share Posted April 20, 2010 (edited) pff then i have to make a demo i hope that works...Check item 19 here before you wait for the miracle in case it's relevant.EDIT:I see you are using Send in the function started by the hot key so my bet it that the link I gave is what you need to read. Edited April 20, 2010 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Merchants Posted April 20, 2010 Author Share Posted April 20, 2010 how does this work ? can you give me a example #include < Misc.au3 > ;Send the string $ss after the Shift Alt and Ctrl keys are released. Optionally give a warning after 1 sec if any of those keys still down. ;Requires misc.au3 to be included in the script for the _IsPressed function. Func _SendEx($ss, $warn = "") Local $iT = TimerInit() While _IsPressed("10") Or _IsPressed("11") Or _IsPressed("12") If $warn <> "" And TimerDiff($iT) > 1000 Then MsgBox(262144, "Warning", $warn) EndIf Sleep(50) WEnd Send($ss) EndFunc;==>_SendEx Link to comment Share on other sites More sharing options...
martin Posted April 21, 2010 Share Posted April 21, 2010 how does this work ? can you give me a example #include < Misc.au3 > ;Send the string $ss after the Shift Alt and Ctrl keys are released. Optionally give a warning after 1 sec if any of those keys still down. ;Requires misc.au3 to be included in the script for the _IsPressed function. Func _SendEx($ss, $warn = "") Local $iT = TimerInit() While _IsPressed("10") Or _IsPressed("11") Or _IsPressed("12") If $warn <> "" And TimerDiff($iT) > 1000 Then MsgBox(262144, "Warning", $warn) EndIf Sleep(50) WEnd Send($ss) EndFunc;==>_SendEx With that function in your script, replace Send with SendEx. In your case use SendEx("^v") Then the "^v" won't be sent until the keys for the hotkey are released and you won't get the stuck key problem. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now