Jump to content

Winwaitactive with alternative text


Recommended Posts

This script opens Filezilla and uploads a file to an FTP site, then when succesful, close Filezilla

If however the upload is unsuccesful, the window would stay open and the user could have access to the FTP site

Is there a way of using winwaitactive with a choice of texts so that if either of the phrases 'upload succesful' or 'upload unsuccesful' is seen the following line (winclose) is activated?

; Run FileZilla with the command line option identifying the target file and FTP location

Run ('"C:\Program Files\FileZilla\FileZilla.exe" -u "c:\zilla1.txt" ftp://xxx.net/zilla/ -t zilla1.txt')

; Wait until the appropriate feedback is received

WinWaitActive("FileZilla version 2.2.28", "Status: Upload successful")

; Now close Filezilla

WinClose("FileZilla version 2.2.28")

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