Jump to content

[SplashScreen] RunWait[command] executes twice instead once


 Share

Recommended Posts

I am trying to make a nice screen for some users for a simple command. What i want to create:

I want to make a kind of SplashScreen wich says "Uploading . . . " while the screen is ON TOP i want to execute a DOS command. Wich will upload files to a FTP on the internet. After the DOS command is completed the SplashScreen have to say something like "Finished".

Now i am a really noob with this kind of problems but i will try, i have this:

#include <GUIConstants.au3>
GUICreate("My GUI picture",350,300,-1,-1,$WS_SIZEBOX+$WS_SYSMENU) ; will create a dialog box that when displayed is centered

GUISetBkColor (0xE0FFFF)
$n=GUICtrlCreatePic(@Systemdir & "\oobe\images\mslogo.jpg",50,50, 200,50)

GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
RunWait("ftp -s:c:\ftp.txt", "")
Sleep(5000)

    If $msg = 0 Then ExitLoop
Wend

Only Problem is that i dont have the second image wich says Finished but the main problem is the DOS command is executed twice instead of once.

Can anyone help me with this "simple" problem?

Link to comment
Share on other sites

  • Developers

You run your FTP inside the While...Wend loop so it will run everytime it loops.

Just put it before the While..Wend loop.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

You run your FTP inside the While...Wend loop so it will run everytime it loops.

Just put it before the While..Wend loop.

Then i must not use the RunWait command or else you see the splashscreen after the batch or ftp command is finished. Or am i wrong?

Just the Run command will do the trick?

Link to comment
Share on other sites

  • Developers

Then i must not use the RunWait command or else you see the splashscreen after the batch or ftp command is finished. Or am i wrong?

Just the Run command will do the trick?

Correct..

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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