Jump to content
Sign in to follow this  
Info

Do something until 5 seconds are over

Recommended Posts

Info

I need something like:

Do

MsgBox(0,"MsgBox","Yep...")

Until 5 Seconds Over

How can I do that?

Share this post


Link to post
Share on other sites
goldenix

I need something like:

Do

MsgBox(0,"MsgBox","Yep...")

Until 5 Seconds Over

How can I do that?

Take a look at loops in the help file Do, for, while

This is how loop works.

$i = 1
while 1 ; infinite loop starts
    
    sleep(1000) ; pause for 1 sec = 1000 ms
    $i = $i + 1
    
;~  if $i = 5 then ExitLoop
    if $i = 5 then Exit 
wend
Edited by goldenix

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]

Share this post


Link to post
Share on other sites
dixo

MsgBox(64,"MsgBox","Yep...")
sleep("1000")
MsgBox(64,"MsgBox","Yep...")

That do so then you press ok the first time a new msg will show up 1 sec after 1000=1 sec, i think so.

FX if you whant to say soem text in a noteblok then open your script say

sleep("5000")
send("hey there")

then after 5 sec it would make the text hey there in the noteblok but remember to have noteblok as main window then you make this.

you can say

sleep("5000")
MsgBox(64,"MsgBox","Yep...")

Then 5 sec after you runned script it would come a window with the text.

hop i helped you :)


---------------------------------------------------------------------------------------------------------------->>>>>>| |My scripts: |Warcraft lll auto login -- an auto login to warcraft lll ;) |Wow auto login -- an auto login to wow ;) | |---------------------------------------------------------------------------------------------------------------->>>>>>|

Share this post


Link to post
Share on other sites
dixo

dohhh i thinken i posted worng xD first now i understand what you mean ;S


---------------------------------------------------------------------------------------------------------------->>>>>>| |My scripts: |Warcraft lll auto login -- an auto login to warcraft lll ;) |Wow auto login -- an auto login to wow ;) | |---------------------------------------------------------------------------------------------------------------->>>>>>|

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  

×