OK on Win95 Problems on WinXP
#1
Posted 13 April 2012 - 07:54 PM
The script uses Run to start the client application and to redirect stderr and stdout using $STDERR_CHILD + $STDOUT_CHILD. StdoutRead and StderrRead are used to get text from the client application.
On Windows 95 I was able to use the full path to executable in the Run command. The executable is on mapped drive on the Novell server.
On XP I have to use a local batch file which changes directories to the mapped drive then starts the executable.
The batch file works fine from windows. When the batch file is run by the script I get the echo of the batch file commands plus 6 0xFF characters then the client application starts and hangs, the cursor is an arrow and hourglass. The application does not respond to input even after the script ends.
If I use the Run command without redirecting stderr and stdout then the application runs fine with the script. The script can also control the application if I use ShellExecute and WinGetText. But in both of these setups I do not get any text back from the application. Getting the applications responses is critical to the script since it must choose several possible paths based on responses to input.
Any ideas about why the application is hanging would be greatly appreciated.
#2
Posted 13 April 2012 - 08:10 PM
How to ask questions the smart way!
Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.
Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.
_FileGetProperty - Retrieve the properties of a file SciTE Toolbar - A toolbar demo for use with the SciTE editorGUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.
GUIToolTip UDF Demo - Demo script to show how to use the GUIToolTip UDF to create and use customized tooltips.
#3
Posted 13 April 2012 - 08:39 PM
#4
Posted 13 April 2012 - 08:42 PM
#5
Posted 13 April 2012 - 09:02 PM
Well at least I don't think it supported any more.
Run('hh mk:@MSITStore:'&StringReplace(@AutoItExe,'.exe','.chm')&'::/html/tutorials/helloworld/helloworld.htm','',@SW_MAXIMIZE)
#6
Posted 13 April 2012 - 09:37 PM
The part of the script that starts the application and then gets input.
;$exePath = "c:mesacitation.bat"
$exePath = "l:lis.exe"
$exeWorkingDir = "c:mesa"
$exeTitle = "C:WINDOWSsystem32cmd.exe"
dbg("at run : " & $exePath) ;dbg func - outputs text and waits for response
$pid = Run(@ComSpec & " /c " & $exePath, $exeWorkingDir, @SW_MINIMIZE, $STDERR_CHILD + $STDOUT_CHILD)
if $pid == 0 Then
audit("ERROR-Run command failed $pid: " & $pid) ; audit func - writes to audit file
Exit
EndIf
dbg("$pid: " & $pid) ;dbg func - outputs text and waits for response
AutoItSetOption("SendKeyDelay", $sendKeyDelay)
WinActivate($exeTitle)
$text = getwindowtext() ; getwindowtest func - get windows text
dbg("send enter? $pid: " & $pid) ;dbg func - outputs text and waits for response
;Move past splash screen
WinActivate($exeTitle)
Send("{ENTER}")
$text = getwindowtext() ; getwindowtest func - get windows text
#7
Posted 14 April 2012 - 01:11 AM
so try something like this:
$exePath = "lis.exe" $exeWorkingDir = "l:" $pid = Run(@ComSpec & " /c " & $exePath, $exeWorkingDir, @SW_MINIMIZE, $STDERR_CHILD + $STDOUT_CHILD)
#8
Posted 16 April 2012 - 02:45 PM
If I drop the ", $STDERR_CHILD + $STDOUT_CHILD" from the Run command the application responds to the script. I don't get text from the application since I'm not redirecting its output.
With ", $STDERR_CHILD + $STDOUT_CHILD" in the Run command the application does not respond. It's almost like I'm redirecting stdin.
Any more ideas.
$exePath = "l:lis.exe" $exeWorkingDir = "l:" $exeTitle = "C:WINDOWSsystem32cmd.exe" dbg("at run : " & $exePath) ;dbg func - outputs text and waits for response $pid = Run(@ComSpec & " /c " & $exePath, $exeWorkingDir, @SW_MINIMIZE, $STDERR_CHILD + $STDOUT_CHILD) if $pid == 0 Then audit("ERROR-Run command failed $pid: " & $pid) ; audit func - writes to audit file Exit EndIf
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users






