WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: MW4 on March 19, 2015, 09:16:03 AM

Title: Run and then window resize
Post by: MW4 on March 19, 2015, 09:16:03 AM
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
Title: Re: Run and then window resize
Post by: td on March 19, 2015, 09:33:19 AM
Check your window titles.
Title: Re: Run and then window resize
Post by: MW4 on March 19, 2015, 09:43:29 AM
I did, and have even shortened the lookup to just ~90 and ~45.

It works for 45, not for 90
Title: Re: Run and then window resize
Post by: td on March 19, 2015, 11:40:42 AM
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.
Title: Re: Run and then window resize
Post by: MW4 on March 20, 2015, 11:16:34 AM
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
Title: Re: Run and then window resize
Post by: MW4 on March 20, 2015, 11:56:35 AM
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"
Title: Re: Run and then window resize
Post by: MW4 on March 20, 2015, 12:41:15 PM
had to do with settings in the RDP file 
winposstr:s:0,1,0,0,1560,1000
that worked
Title: Re: Run and then window resize
Post by: td on March 20, 2015, 02:49:46 PM
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.