Jump to content

Remote Desktop Application Automate Help

Recommended Posts


Hi Everyone, I got a little problem with trying to create a script to automate a remote desktop application that I use on a daily basis. Here is the problem:

Part of my script is waiting for a new window after selecting from the main app. The problem is that window title changes depending the information you click. Here is the code so you can check it:

Local $sPO = PO NUMBER

WinWait("Purchase Order: " & $sPO &" (Remote)","",60)
 if WinExists("Purchase Order: " & $sPO &" (Remote)") = 1 Then
  Local $sTemp2 = "Purchase Order: " & $sPO &" (Remote)"
  MsgBox($MB_SYSTEMMODAL, "INFO1", $sTemp2) ;just for debug purposes
   MsgBox($MB_SYSTEMMODAL, "DEBUG INFO", "") ;just for debug purposes
   Local $sTemp2 = " (Remote)"
   MsgBox($MB_SYSTEMMODAL, "INFO2", $sTemp2) ;just for debug purposes
  until WinWait(" (Remote)"," (Remote)","")


Example #1 (Using the $sPO = JOEL011A) (00.JPG and 01.JPG)

The script runs perfectly, enters on the if statement, assigns the $sTemp2 variable the name of the window, and then continues to WinActivate, the process continues flawlessly.

Example #2 (Using the $sPO = 1020145428) (02.JPG and 03.JPG)

The scripts enter into the if statement, because the window title is " (Remote)", the script goes to the else statement, but do not exits the WinWait, but continues looping, therefore the window never gets activated by WinActivate.

What I am doing wrong?

Please help, thanks, regards.






Share this post

Link to post
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


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.