Legacy1 Posted October 12, 2009 Share Posted October 12, 2009 K, so my friend started using AutoIt and he said it was good so I downloaded it and tried it. I have written a little simple script and it doesn't work? The tooltips work but the hotkeys dont. expandcollapse popupWhile 1 ToolTip("Launch Steam F1",600,0,"HotKeys") Sleep(2000) ToolTip("Launch Firefox F2",600,0,"HotKeys") Sleep(2000) ToolTip("Launch MSN F3",600,0,"HotKeys") Sleep(2000) ToolTip("Launch SPaMR F4",600,0,"HotKeys") Sleep(2000) Wend HotKeySet("{F1}","Steam") HotKeySet("{F2}","Firefox") HotKeySet("{F3}","MSN") HotKeySet("{F4}","SPaMR") While 1 Sleep(100) WEnd Func Steam() Run("C:\Program Files\Steam\Steam.exe") EndFunc Func Firefox() Run("C:\Program Files\Firefox\Firefox.exe") EndFunc Func MSN() Run("C:\Program Files\Windows Live\Messenger\msnmsgr.exe") EndFunc Func SPaMR() Run("C:\Documents and Settings\Harry\My Documents\SPaMR\SPaMR.exe") EndFunc While 1 Sleep(100) WEnd Maybe some unnecessary stuff, but I'm a newb. So, any help? Link to comment Share on other sites More sharing options...
dantay9 Posted October 12, 2009 Share Posted October 12, 2009 You have to declare the hotkeys before the loop. Also you don't need that second while loop. Like this: expandcollapse popupHotKeySet("{F1}", "Steam") HotKeySet("{F2}", "Firefox") HotKeySet("{F3}", "MSN") HotKeySet("{F4}", "SPaMR") While 1 ToolTip("Launch Steam F1", 600, 0, "HotKeys") Sleep(2000) ToolTip("Launch Firefox F2", 600, 0, "HotKeys") Sleep(2000) ToolTip("Launch MSN F3", 600, 0, "HotKeys") Sleep(2000) ToolTip("Launch SPaMR F4", 600, 0, "HotKeys") Sleep(2000) WEnd While 1 Sleep(100) WEnd Func Steam() Run("C:\Program Files\Steam\Steam.exe") EndFunc ;==>Steam Func Firefox() Run("C:\Program Files\Firefox\Firefox.exe") EndFunc ;==>Firefox Func MSN() Run("C:\Program Files\Windows Live\Messenger\msnmsgr.exe") EndFunc ;==>MSN Func SPaMR() Run("C:\Documents and Settings\Harry\My Documents\SPaMR\SPaMR.exe") EndFunc ;==>SPaMR Link to comment Share on other sites More sharing options...
Legacy1 Posted October 12, 2009 Author Share Posted October 12, 2009 Ah, cheers mate. ^^ 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