|
Post by TinyTerror on Oct 10, 2004 18:04:30 GMT -5
The AutoIT site has a good list of functions and exactly what they do. Also, there are sections describing the usage of if statements, loops, operators, variables and so on. This is how I learned to script. www.autoitscript.com/autoit3/docs/The list of functions is under the Function Reference link.
|
|
Yrael
New Member
Posts: 6
|
Post by Yrael on May 18, 2005 22:51:55 GMT -5
Hey tiny, I was checking out that website but I couldnt find what i'm looking for. I want to make something within the script that makes a certain key do pause Autoit.
Ex: If i press F1 it will pause the Autoit script i'm currently running.
Help me out!
|
|
|
Post by TinyTerror on May 19, 2005 6:30:17 GMT -5
I think what you might be looking for is the lock checking feature in Autoterror. I wouldn't recomend using normal keys to pause and unpause your script, as they have no machine maintained state. Caps, Num, and Scroll lock on the other haned all have easily checkable states. Autoterror has a few functions for checking to see if these lock keys are on or not. If you want to pause your script using them, the function would look a little like this:
Func PauseCheck() while CapsCheck()=1 Sleep 100 wend EndFunc
Pardon my code if there are any errors. It's been months since I messed around with autoit. Essentially this function sleeps while the caps lock is engaged. You can call it from anywhere in your code where you want to be able to pause your script.
|
|
|
Post by Jubei on May 19, 2005 6:35:48 GMT -5
You can set up a function within your script to pause it when you want. Add this to the top of your script along with your declared variables: Global $Paused HotKeySet("{PAUSE}", "TogglePause");// This set's the Pause/Break key to pause the script. Change the "{PAUSE}" to whatever key you want to use(refer to the AutoIt help file for a full list of available hotkey buttons > Function Reference > Keyboard Control > Send Then you want to add your Pause function. Functions usually go at the end of your code. This is what mine looks like: Func TogglePause() $Paused = Not $Paused While $Paused Sleep(4000) WEnd EndFunc ;==>TogglePause
Hope this helps you EDIT: Tiny's right about using the lock keys. Damn you reply quick Tiny
|
|
|
Post by TinyTerror on May 19, 2005 10:23:41 GMT -5
^_________^
|
|