2 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.
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 want to programmatically alter the structure of a large number of PDF which have different sizes and orientation, and come from different generators. To do this I need to be able to capture different parameters describing their layout. I use a console tool called pdfInfo (part of the xpdf public domain suite) which provides me with everything I need. The idea is first to run pdfInfo against my pdf file redirecting the console's output to a text file. And then to load and parse the text file to get the parameters I need. The only problem is that no output file is ever created. I've looked through the forums and saw a number of threads loosely related to this but none of the suggested solutions (like using StdoutRead) has worked for me. I should say maybe that I'm running Win10.
So here's the code that doesn't work:
$pdfInfo = "f:\pdfinfo.exe" $pdfTest = "f:\test.pdf" RunWait(chr(34) & $pdfInfo & " -box " & $pdfTest & " > f:\log.txt", "", @SW_HIDE) If you use in a console the command line:
f:\pdfinfo.exe -box f:\test.pdf > f:\log.txt
it works perfectly. But the piece of code above does not create the log.txt file. So any idea what I am doing wrong. Thanks for any help!
I am running my compiled application as a console application and need to prevent any internal errors from being displayed as a gui message, but rather display it as a console message only. An example of such an error would be a bad array reference (out of bounds).
Does anyone know how to do this or point me in the right direction?
I am trying to insert line numbers in to a string
with this script
Func _MyInc () Static Local $i = 0 $i += 1 Return $i EndFunc Exit _InsertLines() Func _InsertLines() $String = "A" & @CRLF & "B" & @CRLF & "C" & @CRLF & "D" $NewString = Execute("'" & StringRegExpReplace($String,"[\r\n]*", "' & _MyInc () & '\1" ) & "'") MsgBox (0, "", $NewString) EndFunc but I get this:
I never really could master how Execute works here and I always get some working example and make substitutions.
But this is the closest i could get...