MaXiMiUS Posted March 4, 2010 Share Posted March 4, 2010 This is what I wanted to do.. Func ReleaseAllKeys() For $i = 32 To 126 Send("{" & Chr($i) & " Up}") Next EndFunc But even after a very brief examination, it's obvious that won't work. I can't really think of a way to do this easily =/ Link to comment Share on other sites More sharing options...
Fulano Posted March 5, 2010 Share Posted March 5, 2010 (edited) Based on the Send documentation this might work: Func releaseAllKeys() Local $ascKey For $ascKey = 32 to 126 Local $key = Chr ($ascKey) Send ("{" & $key & " up}") Next EndFunc Edit: Formating inside a '' tag is ... finicky Edited March 5, 2010 by Fulano #fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja! Link to comment Share on other sites More sharing options...
dani Posted March 5, 2010 Share Posted March 5, 2010 (edited) If that does work it's crazy as the behaviour of both is identical. by the way it's not required to declare $ascKey before the loop as it's declared in the loop anyway so: Func releaseAllKeys() For $ascKey = 32 to 126 Local $key = Chr ($ascKey) Send ("{" & $key & " up}") Next EndFunc Again though, this executes the exact same Send() command as the OP's code, so I highly doubt this will work given his code does not. Edited March 5, 2010 by dani Link to comment Share on other sites More sharing options...
Fulano Posted March 5, 2010 Share Posted March 5, 2010 If that does work it's crazy as the behaviour of both is identical. by the way it's not required to declare $ascKey before the loop as it's declared in the loop anyway so: Func releaseAllKeys() For $ascKey = 32 to 126 Local $key = Chr ($ascKey) Send ("{" & $key & " up}") Next EndFunc Again though, this executes the exact same Send() command as the OP's code, so I highly doubt this will work given his code does not. I grew up on C .... and it's affected me I haven't tested this yet, but the code comes from the bottom of the Send documentation, so it should work ... in a perfect world. #fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja! Link to comment Share on other sites More sharing options...
dani Posted March 5, 2010 Share Posted March 5, 2010 Fair enough, then I guess it should work, which leads me to ... @MaXiMiUS, do some more testing Link to comment Share on other sites More sharing options...
martin Posted March 5, 2010 Share Posted March 5, 2010 Fair enough, then I guess it should work, which leads me to ...@MaXiMiUS, do some more testing Or maybe it won't work.Maybe ControlSend("", "", "", " ", 0)will though? 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