Jump to content

Problem with RunWait


APRES
 Share

Recommended Posts

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
Link to comment
Share on other sites

  • Developers

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

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

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.

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