Jump to content

Do something until 5 seconds are over


Recommended Posts

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]
Link to comment
Share on other sites

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 ;) | |---------------------------------------------------------------------------------------------------------------->>>>>>|

Link to comment
Share on other sites

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 ;) | |---------------------------------------------------------------------------------------------------------------->>>>>>|

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