Jump to content

Script doesn't wprk


PcExpert
 Share

Recommended Posts

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

  • Developers

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

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

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

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

Hi,

so know you know where to start. :P

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

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