Jump to content

Starting and ending


AlfzZz
 Share

Recommended Posts

; ----------------------------------------------------------------------------
;
;Starting Programing, 
; My demo 2
; ----------------------------------------------------------------------------

; Script Start - Add your code below here

Global $Paused
HotKeySet("{INSERT}", "TogglePause")
HotKeySet("{END}", "Terminate")


Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        Send("a")
        sleep (200)
    WEnd
EndFunc

Func Terminate()
    Exit 0
EndFunc

im trying to make the program start when i hit insert and end when i hit end. Right now it does nothing :)

Link to comment
Share on other sites

you have to have a loop

Global $Paused
HotKeySet("{INSERT}", "TogglePause")
HotKeySet("{END}", "Terminate")
while 1 
sleep(100)
wend

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        Send("a")
        sleep (200)
    WEnd
EndFunc

Func Terminate()
    Exit 0
EndFunc
Wow >< i really need to keep reading the manual

so is this the right way to do it??

Global $Paused
HotKeySet("{INSERT}", "TogglePause")
HotKeySet("{END}", "Terminate")
[b]while 1
sleep(100)[/b]
wend

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        Send("a")
        sleep (200)
    WEnd
EndFunc

Func Terminate()
    Exit 0
EndFunc
Link to comment
Share on other sites

Wow >< i really need to keep reading the manual

so is this the right way to do it??

Global $Paused
HotKeySet("{INSERT}", "TogglePause")
HotKeySet("{END}", "Terminate")
[b]while 1
sleep(100)[/b]
wend

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        Send("a")
        sleep (200)
    WEnd
EndFunc

Func Terminate()
    Exit 0
EndFunc
without the [ b ] [/ b ] tags in it, it should work :):P

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

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...