Jump to content
Sign in to follow this  
Ysengrim

How end FizelZilla after upload ?

Recommended Posts

Ysengrim

Because I couldn't find a way to upload files to my website automaticly I changed my way of working and started to use FileZilla to do the job for me.

Evrything works perfectly with using shortcuts but I found myself stuck on the final problem

I want to close Filezilla automatic after uploading the file

I don't want to use the sleep() function and processclose() because the script can close Filezilla before ending the upload job

I don't can use the winwaitclose() function either because there are no pop-up windows coming up

The only thing I could think of was trying to captury the text from a window that give a logview of whats happening

$text=ControlGetText ( "FileZilla version 2.2.32", "", "[CLASS:RichEdit20W; INSTANCE:1]")

MsgBox(0, "the text is :", $text)

the output =

Status: Starting upload of C:\Program Files\Beurs\Website Offline\bestanden\Bolero.pdf

Command: TYPE I

Response: 200 Type set to I

Command: PASV

Response: 227 Entering Passive Mode (195,130,132,85,20,204).

Command: STOR Bolero.pdf

Response: 150 Opening BINARY mode data connection for Bolero.pdf

Response: 226 Transfer complete.

Status: Upload successful

Command: REST 0

Response: 350 Restarting at 0. Send STORE or RETRIEVE to initiate transfer

Status: Disconnected from server

I have to wait for the last line : upload succesful before closing the program

Now my question is

1) is there an easier way to see of the upload was fininshed (because I think this is not the best way I was thinking of right now)

2) how can i make the script telling me when the line "Status: Upload successful" appears in that window so I can stop the script when it returns that value

because the script is scrolling and making new text very quick

I will thank you in front for helping me out

Ysengrim

Share this post


Link to post
Share on other sites
Nahuel

Well, your idea was good!

Global $Finished=False

While Not $Finished
    $OutPutText=ControlGetText ( "FileZilla version 2.2.32", "", "[CLASS:RichEdit20W; INSTANCE:1]")
    If StringInStr($OutPutText,"Upload successful") Then
        ;ProcessClose("Filezilla")
        MsgBox(0,"","Upload successful")
        Exit
    EndIf
    Sleep(100)
WEnd

Share this post


Link to post
Share on other sites
Ysengrim

Well, your idea was good!

Global $Finished=False

While Not $Finished
    $OutPutText=ControlGetText ( "FileZilla version 2.2.32", "", "[CLASS:RichEdit20W; INSTANCE:1]")
    If StringInStr($OutPutText,"Upload successful") Then
        ;ProcessClose("Filezilla")
        MsgBox(0,"","Upload successful")
        Exit
    EndIf
    Sleep(100)
WEnd
Nahuel

THANKS !!!!!!!!!!!!!!!!!!!!!!!!!

its working perfectly

I still got to learn a lot and but because of the help here I'm motivated to continu learning and trying

This forum is great when you stuck on a problem and losing hours of testing

Share this post


Link to post
Share on other sites
Nahuel

Haha, indeed it is ;)

Glad you got it working :P

Share this post


Link to post
Share on other sites
kwixro

I try with FlashFXP

Posted Image

Global $Finished=False
While Not $Finished
    WinWait("FlashFXP")
    If Not WinActive("FlashFXP") Then _
            WinActivate("FlashFXP")
    WinWaitActive("FlashFXP")
    $OutPutText= ControlGetText ( "FlashFXP", "", "[CLASS:TWinConsole; INSTANCE:2]")
    If StringInStr($OutPutText,"Transfer complete") Then
        ProcessClose("FlashFXP")
        MsgBox(0,"","Transfer complete")
        Exit
    EndIf

Not work

Pls help ?

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  

×