Sign in to follow this  
Followers 0
Hyflex

Script, Help pls

10 posts in this topic

Global $Paused
HotKeySet("{HOME}", "Togp")
HotKeySet("{END}", "Close")

While 1
    Sleep(100)
WEnd

Func Togp()
    $Paused = NOT $Paused
    While $Paused

>>>HERE NEED HELP<<<

    WEnd
EndFunc

Func Close()
    Exit 0
EndFunc

Where it says: ">>>HERE NEED HELP<<<" that is where i want it to do.

Press the letter s and then wait 1 sec. But i want it to repeat 500 Times. and i want a little box to be in the top left telling me how many times its done the code i think its ToolTip

Can someone help :)

Share this post


Link to post
Share on other sites



yes tooltip and check out For in the help file, itll be a For Next Loop :)

Share this post


Link to post
Share on other sites

i looked but cant find....

Share this post


Link to post
Share on other sites

Global $Paused
HotKeySet("{HOME}", "Togp")
HotKeySet("{END}", "Close")

While 1
    Sleep(100)
WEnd

Func Togp()
    $Paused = Not $Paused
    While $Paused

        For $i = 1 To 500
            ToolTip("Run No" & $i)
            Send("s")
            Sleep(1000)
        Next
    WEnd
EndFunc   ;==>Togp

Func Close()
    Exit 0
EndFunc   ;==>Close



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

i looked and found it pretty fast typing in For

EDIT: ugh big dod writes it for him, why not let him learn :)

For...Next 
--------------------------------------------------------------------------------

Loop based on an expression.


For <variable> = <start> To <stop> [Step <stepval>]
    statements
    ...
Next


 

Parameters

variable The variable used for the count. 
start The initial numeric value of the variable. 
stop The final numeric value of the variable. 
stepval [optional] The numeric value (possibly fractional) that the count is increased by each loop. Default is 1. 

 

Remarks

The Variable will be created automatically with a LOCAL scope, even when MustDeclareVars is on.

For...Next statements may be nested. The For loop terminates when the value of variable exceeds the stop threshold. If stepVal or stop is a variable, its value is only read the first time the loop executes.

A For loop will execute zero times if:
   start > stop and step > 0, or
   start < stop and step is negative


 

Related

ContinueLoop, ExitLoop

For $i = 5 to 1 Step -1
    MsgBox(0, "Count down!", $i)
Next
MsgBox(0,"", "Blast Off!")
Edited by thatsgreat2345

Share this post


Link to post
Share on other sites

If he runs mine it will not work properly for him, I did not fix the pause/unpause part.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Send doesnt work, i need it to just do a keypress u know wat i mean?

And that text doesnt help me.

And cos there example and everything confuses me more :)

Can ya explain and do me the actual thing cos me = real confused

Share this post


Link to post
Share on other sites

bump :P hehe

can someone explain and everything :)

Share this post


Link to post
Share on other sites

If you want to do some scripting, start "learning" debugging. :)

You think Send is not working - so lets see.

Send does simulate a keypress. If you can't see anything happening, open a notepad window, get the given code and see if anything happens.

Run ('notepad.exe')
Sleep (1000)
For $i = 1 To 500
            ToolTip("Run No" & $i)
            Send("s")
            Sleep(1000)
Next

I'd bet it works. So get rid of those while-stuff, as bigdog said...

Share this post


Link to post
Share on other sites

If you want to do some scripting, start "learning" debugging. :)

You think Send is not working - so lets see.

Send does simulate a keypress. If you can't see anything happening, open a notepad window, get the given code and see if anything happens.

Run ('notepad.exe')
Sleep (1000)
For $i = 1 To 500
            ToolTip("Run No" & $i)
            Send("s")
            Sleep(1000)
Next

I'd bet it works. So get rid of those while-stuff, as bigdog said...

It works when typeing but he game is not reconiseing a keypress.

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