Jump to content

Wierd, Hotkeyset Error


Recommended Posts

look here is my script

HotKeySet("{ESC}", "Terminate")
While 1
If WinExists("NETI - Eesti Interneti Kataloog ja Otsingusüsteem - Mozilla Firefox") Then 
WinClose("NETI - Eesti Interneti Kataloog ja Otsingusüsteem - Mozilla Firefox")
MsgBox(16, "Halt!", "No internet for you!") 
EndIf 
WEnd

and it gives me an error on hotkeyset line :)

what have i done wrong?

Link to comment
Share on other sites

You did not create a "Terminate" function

HotKeySet("{ESC}", "Terminate")
While 1
If WinExists("NETI - Eesti Interneti Kataloog ja Otsingusüsteem - Mozilla Firefox") Then
WinClose("NETI - Eesti Interneti Kataloog ja Otsingusüsteem - Mozilla Firefox")
MsgBox(16, "Halt!", "No internet for you!")
EndIf
WEnd

Func Terminate()
Exit
EndFunc

8)

NEWHeader1.png

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...