mbm Posted June 18, 2009 Share Posted June 18, 2009 (edited) I know I might be flamed for asking this, but I have search and looked in the Q&A.I Have made some scripts and would like to activate them by a keystroke. Found something about Hotkeyset, but not sure how it works, and if it what I should be using?HotKeySet("{F3}", "Go")While 1Sleep(100)WEndFunc Go()AND HERE I SET ALL MY CODE INEndFuncAm I missing something? Edited June 18, 2009 by mbm Link to comment Share on other sites More sharing options...
bo8ster Posted June 18, 2009 Share Posted June 18, 2009 Welcome to the forum. It does not look like you are missing anything except to replace "AND HERE I SET ALL MY CODE IN" with some code. When F3 is pressed, the Go function will be executed. If that is not working, let us know what it is doing wrong. Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic] Link to comment Share on other sites More sharing options...
mbm Posted June 18, 2009 Author Share Posted June 18, 2009 Welcome to the forum.It does not look like you are missing anything except to replace "AND HERE I SET ALL MY CODE IN" with some code.When F3 is pressed, the Go function will be executed. If that is not working, let us know what it is doing wrong.ok I got the idea wrong. I though the script would execute when the F3 key was press, but the script shold be running in the background offcouse.Tried this which worked fine. Will try with my own script later.:HotKeySet("{F3}", "Go")While 1Sleep(100)WEndFunc Go()MsgBox(0, "My First Script!", "Hello World!")EndFunc Link to comment Share on other sites More sharing options...
ajag Posted June 18, 2009 Share Posted June 18, 2009 If you want to start running your script (or any other proramm) by pressing a key (i.e. "F3"), you can create a shortcut of your script on the desktop, go to the properties of the shortcut and enter the key you want. A-Jay Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1) Link to comment Share on other sites More sharing options...
mbm Posted June 18, 2009 Author Share Posted June 18, 2009 If you want to start running your script (or any other proramm) by pressing a key (i.e. "F3"), you can create a shortcut of your script on the desktop, go to the properties of the shortcut and enter the key you want.A-JayOk thanks, so no need for the Hotkey in the script then? Link to comment Share on other sites More sharing options...
ajag Posted June 18, 2009 Share Posted June 18, 2009 Yep, this is a Windows feature to start any programm by short-key Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1) Link to comment Share on other sites More sharing options...
mbm Posted June 19, 2009 Author Share Posted June 19, 2009 Yep, this is a Windows feature to start any programm by short-keyThanks alot... 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