Run and then window resize

Started by MW4, March 19, 2015, 09:16:03 AM

Previous topic - Next topic

MW4

I have this code that opens up a saved RDP sessions on my Win7 machine.
Then shrinks the window then puts it in a certain place on my screen.
Opens a second an then puts that one just below the first on the screen.

It has worked flawlessly for years and since we changed internal domain names only one VM-45 gets shrunk down.
They both get opened but 45 shrinks and VM-90 stays full size:

I have re-compiled the winbatch exe, and saved both RDP sessions so it should not be a permissions issue.
If I reverse the order the same thing 45 shrinks, 90 doesn't.
Any thoughts?





AddExtender("WWWNT34i.DLL")

timedelay (20)

Run("\\fleetdc01\fleet\users\mw\RDPs\_FleetVM-90.rdp","")

   while WinState("~VM-90") == @FALSE
      timedelay (10)
   endwhile
   
   timedelay(6)
      WinPlaceSet(@normal, "~VM-90", "250 211 1080 311")
   timedelay(6)

Run("\\fleetdc01\fleet\users\mw\RDPs\_FleetVM-45.rdp","")

   while WinState("~VM-45") == @FALSE
      timedelay (10)
   endwhile
   
   timedelay(6)
   WinPlaceSet(@normal, "~VM-45", "250 110 1080 210")   
   timedelay(6)

exit

td

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

MW4

I did, and have even shortened the lookup to just ~90 and ~45.

It works for 45, not for 90

td

Did you check the actual  window titles in the RDP windows?  Assuming that there aren't any UAC issues, WinBatch will find the window if it is there.  Also is your script hanging or is it producing an error?   If it is not doing either one then you likely have some kind of timing issue.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

MW4

yes, very perplexing...

it will run the program.
give me the coordinates using --  WinPlaceGet(@normal, "_FleetVM-90 - fleetvm-90 - Remote Desktop Connection")
but not move it with  --  WinPlaceSet( @normal , "_FleetVM-90 - fleetvm-90 - Remote Desktop Connection" , "245 205 994 305" )

I'm going to run a DebugTrace

MW4

weird, this is what I get

I watch where the window is on the screen, and it's at -2,-3,756,864 and I get the return of  216 227 985 942 below....

WinPlaceSet( @normal , "_FleetVM-90 - fleetvm-90 - Remote Desktop Connection" , "245 205 994 305" )
(60123) VALUE STRING => "216 227 958 942"

MW4

had to do with settings in the RDP file 
winposstr:s:0,1,0,0,1560,1000
that worked

td

A window receives a position changing message went you attempt to move it or change its size with WinPlaceSet so it has an opportunity to refuse to move. 
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade