Jump to content

Recommended Posts

Posted (edited)

Hello hello

who can help me to write basic scrit to to job like this :

check FileExists on drive R:\test.tx

if not wait to connect drive R:

after found file do some code

i dont have idea how to put it in loop ...

Many thx for help

lxxl

Edited by lxxl
Posted

ahh and one more. its possible to add some extra stop marker to skip DO and go to other section when 20 times try or 1 minute pass

Do
    Sleep(99)
Until FileExists("w:\")

lxxl

Posted

ha always help file help ;DD

Do
    Sleep(99)
Until FileExists("w:\")
$try = $try + 1
If $try = 100 Then ExitLoop
  • 11 months later...
Posted

Sorry to reopen this old topic.

But what is the longest time this loop will wait?

Do
    Sleep(99)
    $try = $try + 1
    If $try = 100 Then ExitLoop
Until FileExists("w:\")

The loop is made by herewasplato from the post above.

Thank you!

Posted

Sorry to reopen this old topic.

But what is the longest time this loop will wait?

Do
    Sleep(99)
    $try = $try + 1
    If $try = 100 Then ExitLoop
Until FileExists("w:\")

The loop is made by herewasplato from the post above.

Thank you!

it will wait until the path really exists.
Website: www.cerescode.comForum: www.forum.cerescode.comIRC: irc.freenode.net , Channel: #Ceres--------------------Autoit Wrappers, Great additions to your script (Must See) (By: Valuater)Read It Befor Asking Question Click Here...--------------------Join Monoceres's Forums http://www.monoceres.se--------------------There are three kinds of people: Those who make things happen, those who watch things happen, and those who ask, ‘What happened?’” –Casey Stengel
Posted

Then what is the difference to this:

Do
    Sleep(99)
Until FileExists(.....
;other code hereoÝ÷ ئì-¢Ç+bªê-{¥È^rKaz­ëÞ¯/}Ã"$rݱú+ë,r®±¨¦êé¢Ç¬Êjv¥²h)¶¬jëh×6Do
    ;Sleep(0)
Until FileExists(.....

but it will use much process usage.

Website: www.cerescode.comForum: www.forum.cerescode.comIRC: irc.freenode.net , Channel: #Ceres--------------------Autoit Wrappers, Great additions to your script (Must See) (By: Valuater)Read It Befor Asking Question Click Here...--------------------Join Monoceres's Forums http://www.monoceres.se--------------------There are three kinds of people: Those who make things happen, those who watch things happen, and those who ask, ‘What happened?’” –Casey Stengel
Posted

$try=0
Do
    Sleep(99)
    $try = $try + 1
    If $try = 100 Then ExitLoop
Until FileExists("w:\")

This code from herewasplato waits ~ 100*100 ms -> 10 seconds :)

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted

$try=0
Do
    Sleep(99)
    $try = $try + 1
    If $try = 100 Then ExitLoop
Until FileExists("w:\")

This code from herewasplato waits ~ 100*100 ms -> 10 seconds :)

Correct :-)

...but just to be clear, that code was a modification of what lxxl posted.

I am not a big fan of using counters like $try = $try + 1 when a For/Next loop will work.

See my post above for the For/Next version that I would use instead.

[size="1"][font="Arial"].[u].[/u][/font][/size]

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...