Jump to content

MesaCorp

Members
  • Posts

    4
  • Joined

  • Last visited

MesaCorp's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. The path and working directory change did not work. Thanks everyone for your input so far. 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:\Windows\System32\cmd.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
  2. AutoIt version 3.3.8.1 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:\Windows\System32\cmd.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
  3. When I use the full path to the executable I get "Could not execute LIS" as a response, LIS.exe is the executable and the application does not start. I get the same message if I go to Start -> Run and type in the same full path to the executable.
  4. I am using AutoIt to run a client for an old Novell server application to print reports. The client runs in a DOS box. The script was working fine running on a Windows 95 pc. The script has been moved to a virtual windows xp machine and now I have problems. 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.
×
×
  • Create New...