Sign in to follow this  
Followers 0
Legacy1

Im a newb.

3 posts in this topic

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.

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



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?

Share this post


Link to post
Share on other sites



You have to declare the hotkeys before the loop. Also you don't need that second while loop. Like this:

HotKeySet("{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

[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

Ah, cheers mate. ^^

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0