PcExpert Posted December 28, 2006 Share Posted December 28, 2006 (edited) Hi all, Why doesn't this script work? CODE $1 = InputBox("test", "question 1") $2 = InputBox("test", "question 2") $3 = InputBox("test", "question 3") InetGet("ftp://user:pass@IPADRESS/questions.txt", @TempDir) FileWriteLine(@TempDir & "questions.txt", "answere 1: " & $1) FileWriteLine(@TempDir & "questions.txt", "answere 2: " & $2) FileWriteLine(@TempDir & "questions.txt", "answere 3: " & $3) FileWriteLine(@TempDir & "questions.txt", "--------------------------------------------") FileCopy(@TempDir & "questions.txt", "ftp://user:pass@IPADRESS/questions.txt") FileDelete(@TempDir & "questions.txt") I can't find out why. Edited December 28, 2006 by PcExpert Link to comment Share on other sites More sharing options...
Developers Jos Posted December 28, 2006 Developers Share Posted December 28, 2006 Hi all,Why doesn't this script work?CODE$1 = InputBox("test", "question 1")$2 = InputBox("test", "question 2")$3 = InputBox("test", "question 3")InetGet("ftp://user:pass@IPADRESS/questions.txt", @TempDir)FileWriteLine(@TempDir & "questions.txt", "answere 1: " & $1)FileWriteLine(@TempDir & "questions.txt", "answere 2: " & $2)FileWriteLine(@TempDir & "questions.txt", "answere 3: " & $3)FileWriteLine(@TempDir & "questions.txt", "--------------------------------------------")FileCopy(@TempDir & "questions.txt", "ftp://user:pass@IPADRESS/questions.txt")FileDelete(@TempDir & "questions.txt")I can't find out why.@TempDir contains a directory name ... not a file name ! 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 More sharing options...
PcExpert Posted December 28, 2006 Author Share Posted December 28, 2006 Can you show me what you mean? Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 28, 2006 Share Posted December 28, 2006 Hi, maybe: $1 = InputBox("test", "question 1") $2 = InputBox("test", "question 2") $3 = InputBox("test", "question 3") InetGet("ftp://user:pass@IPADRESS/questions.txt", @TempDir & "\somethinghere.extension") FileWriteLine(@TempDir & "\questions.txt", "answere 1: " & $1) FileWriteLine(@TempDir & "\questions.txt", "answere 2: " & $2) FileWriteLine(@TempDir & "\questions.txt", "answere 3: " & $3) FileWriteLine(@TempDir & "\questions.txt", "--------------------------------------------") FileCopy(@TempDir & "\questions.txt", "ftp://user:pass@IPADRESS/questions.txt") FileDelete(@TempDir & "\questions.txt") So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
PcExpert Posted December 28, 2006 Author Share Posted December 28, 2006 If I open the questions.txt file from the ftp server it is empty.. Maybe it isn't possible what I want to do? Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 28, 2006 Share Posted December 28, 2006 Hi, how far do you get? Which step doesnt work? So long, Mega $1 = InputBox("test", "question 1") $2 = InputBox("test", "question 2") $3 = InputBox("test", "question 3") InetGet("ftp://user:pass@IPADRESS/questions.txt", @TempDir & "\questions.txt") FileWriteLine(@TempDir & "\questions.txt", "answere 1: " & $1) FileWriteLine(@TempDir & "\questions.txt", "answere 2: " & $2) FileWriteLine(@TempDir & "\questions.txt", "answere 3: " & $3) FileWriteLine(@TempDir & "\questions.txt", "--------------------------------------------") FileCopy(@TempDir & "\questions.txt", "ftp://user:pass@IPADRESS/questions.txt") FileDelete(@TempDir & "\questions.txt") Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
PcExpert Posted December 28, 2006 Author Share Posted December 28, 2006 I think it goes wrong when the 4th line is excuted. Because otherwise the filecopy line woul'd work. Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 28, 2006 Share Posted December 28, 2006 Hi, what about testing it step by step. $1 = InputBox("test", "question 1") $2 = InputBox("test", "question 2") $3 = InputBox("test", "question 3") If InetGet("ftp://user:pass@IPADRESS/questions.txt", @TempDir & "\questions.txt", 1) = 0 Then MsgBox(16, "Error", "Download") Exit (0) EndIf ConsoleWrite(1 & @LF) FileWriteLine(@TempDir & "\questions.txt", "answere 1: " & $1) FileWriteLine(@TempDir & "\questions.txt", "answere 2: " & $2) FileWriteLine(@TempDir & "\questions.txt", "answere 3: " & $3) FileWriteLine(@TempDir & "\questions.txt", "--------------------------------------------") ConsoleWrite(2 & @LF) If FileCopy(@TempDir & "\questions.txt", "ftp://user:pass@IPADRESS/questions.txt") = 0 Then MsgBox(16, "Error", "FileCopy") Exit (0) EndIf FileDelete(@TempDir & "\questions.txt") So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
PcExpert Posted December 28, 2006 Author Share Posted December 28, 2006 1 error occured: DOWNLOAD Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 28, 2006 Share Posted December 28, 2006 Hi, so know you know where to start. So long, Mega I cannot test it, cause I have no ftp here. :"> Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
PcExpert Posted December 28, 2006 Author Share Posted December 28, 2006 OK, thanks for your help anyway Link to comment Share on other sites More sharing options...
PcExpert Posted December 28, 2006 Author Share Posted December 28, 2006 I just detected an interesting line in the ftp server logfile: Dec 28 14:17:10 FTP server: user anonymous quit by session timeout What could have made the timeout to occure Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now