smcombs Posted April 1, 2009 Share Posted April 1, 2009 Ok I have written my own script to setup hotkeys for myself. However, they have all been working fine until I tried to add this last one. Here is the code: CODEHotKeySet("#o", "Labsim") HotKeySet("#i", "Firefox") HotKeySet("#p", "ControlPanel") HotKeySet("#c", "Console") HotKeySet("#a", "AddRemovePrograms") HotKeySet("^l", "output") ;~ HotKeySet("{ESC}", "Terminate") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; #e : Opens My computer ; #m : Minimizes all Windows ; #b : Gives Focus to Tray ; #d : Shows Desktop ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; While 1 sleep(100) WEnd ;;;;;;;;;;;Shortcut Functions;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Func Labsim() run("C:\Program Files (x86)\TestOut\Orbis\OrbisClient.exe") EndFunc Func Firefox() ShellExecute("firefox.exe") EndFunc Func ControlPanel() Run("control") EndFunc Func Console() Run("C:\Console2\Console.exe") EndFunc Func AddRemovePrograms() Run("control appwiz.cpl") EndFunc Func output() Send("Sending us some text for") EndFunc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;~ Func Terminate() ;~ Exit ;~ EndFunc Now what happens is when I hit ^l to send the text. The button acts as if its stuck and will underline and open a find window because of the u and the f that exists within the text that its sending. Does Autoit have a flush code that releases any key that has been pressed. Thanks for your help Link to comment Share on other sites More sharing options...
martin Posted April 1, 2009 Share Posted April 1, 2009 Ok I have written my own script to setup hotkeys for myself. However, they have all been working fine until I tried to add this last one.Here is the code:CODEHotKeySet("#o", "Labsim")HotKeySet("#i", "Firefox")HotKeySet("#p", "ControlPanel")HotKeySet("#c", "Console")HotKeySet("#a", "AddRemovePrograms")HotKeySet("^l", "output");~ HotKeySet("{ESC}", "Terminate");;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #e : Opens My computer; #m : Minimizes all Windows; #b : Gives Focus to Tray; #d : Shows Desktop;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;While 1 sleep(100)WEnd;;;;;;;;;;;Shortcut Functions;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Func Labsim() run("C:\Program Files (x86)\TestOut\Orbis\OrbisClient.exe")EndFuncFunc Firefox() ShellExecute("firefox.exe")EndFuncFunc ControlPanel() Run("control")EndFuncFunc Console() Run("C:\Console2\Console.exe")EndFuncFunc AddRemovePrograms() Run("control appwiz.cpl")EndFuncFunc output() Send("Sending us some text for")EndFunc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;~ Func Terminate();~ Exit;~ EndFuncNow what happens is when I hit ^l to send the text. The button acts as if its stuck and will underline and open a find window because of the u and the f that exists within the text that its sending. Does Autoit have a flush code that releases any key that has been pressed.Thanks for your helpProbably you have something in your output function which uses Send. If so then you must wait untill the CTRL key is released before you call send. 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...
smcombs Posted April 1, 2009 Author Share Posted April 1, 2009 I have added some sleep statements in, but that doesnt seem to fix it. I actually have to press the ctrl key on my keyboard so it will release it. Link to comment Share on other sites More sharing options...
martin Posted April 1, 2009 Share Posted April 1, 2009 I have added some sleep statements in, but that doesnt seem to fix it. I actually have to press the ctrl key on my keyboard so it will release it.I think that if you ensure that the control key is not pressed before you call send then you won't have a problem. Sleep doesn't ensure that.See here. 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...
smcombs Posted April 1, 2009 Author Share Posted April 1, 2009 Ok thanks I will play around with that and see how it works. 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