Jump to content
Sign in to follow this  
APRES

Problem with RunWait

Recommended Posts

APRES

I try to FTP by this way:

ftp.au3 :

RunWait(@ComSpec & " /c " & "ftp -s:c:\ftp.txt", "", @SW_HIDE)

ftp.txt :

open myhost.com
username
password
put c:\mydir\myfile path_on_server/myfile
put c:\mydir\myfile path_on_server/myfile
close
bye

When I run ftp -s:c:\ftp.txt from command line - everything works.

When I run the above au3 script with one string there - weird things happens:

Icon of AutoIt begins to multiply and computer runs out of memory.

Why????

:whistle::dance::dance:

Edited by APRES

Share this post


Link to post
Share on other sites
Jos

I try to FTP by this way:

ftp.au3 :

RunWait(@ComSpec & " /c " & "ftp -s:c:\ftp.txt", "", @SW_HIDE)

ftp.txt :

open myhost.com
username
password
put c:\mydir\myfile path_on_server/myfile
put c:\mydir\myfile path_on_server/myfile
close
bye

When I run ftp -s:c:\ftp.txt from command line - everything works.

When I run the above au3 script with one string there - weird things happens:

Icon of AutoIt begins to multiply and computer runs out of memory.

Why????   

:whistle:  :dance:  :dance:

<{POST_SNAPBACK}>

Long Shot : You called your script FTP.au3 and compiled it ???

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
APRES

Long Shot :  You called your script FTP.au3 and compiled it ???

<{POST_SNAPBACK}>

Yes.

Share this post


Link to post
Share on other sites
Sokko

Your RunWait line is executing your script again, since the command prompt looks in the current directory first. FTP.exe runs, executes the program "ftp" at the command prompt, which opens and executes "ftp" again, opening another copy of the program... ad infinitum. Change the name of your compiled script and it should function as intended.

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  

×