4 posts in this topic
I am running the tomcat batch file through autoit and need to wait until the below line I get in console output.
But when I am trying to read the console output using the ProcessEx UDF, I am getting only the partial output.
So, can you please suggest how to handle this.
im just started in programming and all..
and i wanted to learn autoscript to.
Was wondering if any can convert my one-liner batch script to an autoit script -
FOR /F %%i IN (names.txt) DO @copy system.act %%i.act
So what this does is open and read the file "names.txt" incrementally, and copy a certain file named "system.act" and rename it to each name that is listed on "names.txt"
So im trying this on autoit but no idea how to start file manipulation and do command -
$file = "c:\names.txt"
For $i = 1 to _FileCountLines($file)
$line = FileReadLine($file, $i)
Can anyone help me or guide me on how to continue this to get the result that i want..:)?
I'm currently working a program that constantly prints out log files through "consolewrite" and the "#AutoIt3Wrapper_Change2CUI=y" wrapper.
Part of this program requires me to run a batch script.
My issue is the batch script launches from the same window as consolewrite. I need the batch file to be launched through a different window as currently this causes an issue with the logs (which need to be very precise) but also causes the batch file to produce some funny behavior...
Does anyone know how I can force the file to run on a second DOS window?
Thanks in advance!!!
Edit: Im using the "run" command if that helps. I tried "shellexecute" but that seemed to not launch the batch scripts at all.
I have several batch files, e.g.
echo off echo !DT | ncat 192.168.1.6 80 > scan1.dta This data1.bat works as expected by saving data from !DT command.
I have tried several variations from AutoIt
; $DOS = RunWait(@ComSpec & " /k " & "ncat 192.168.1.6 80 <getdata >scan1.dta", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) ; $DOS = Run(@ComSpec & " /k " & "ncat 192.168.1.6 80 <getdata >scan1.dta", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) ; $DOS = Run(@ComSpec & " /c " & "echo ?DT | ncat 192.168.1.6 80 > scan1.dta & @CRLF", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) $DOS = Run(@ComSpec & " /c " & "data1.bat & @CRLF", "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) but none save the data to scan1.dta
Run out of ideas so far...