Sign in to follow this  
Followers 0
Iznogoud

[SplashScreen] RunWait[command] executes twice instead once

4 posts in this topic

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?

Share this post


Link to post
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.


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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