Jump to content
Sign in to follow this  
blah

wats wrong with this...

Recommended Posts

blah

i copyied this right from the help guide and added it down bottum of my script and when i hit Esc it deosnt seem to work same with pause

Global $Paused

HotKeySet("{PAUSE}", "TogglePause")

HotKeySet("{ESC}", "Terminate")

HotKeySet("+!d", "ShowMessage")

Share this post


Link to post
Share on other sites
LurchMan

Have you tried putting a ConsoleWrite () or MSgBOX () as the first line of those functions to see if its going into the functions? If it is going into the functions, post those. And when posting code, please wrap it in

 
.

Edit: Also its usually better to put those at the top of the script

Edited by LurchMan

Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end.

Share this post


Link to post
Share on other sites
Yoriz

HotKeySet("{ESC}", "Terminate")

............^keyPressed....^Function called

you need the functions in your script as well.

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","This is a message.")
EndFunc

GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.