Failure of ACTIVATE to Set a Window Position

Jun 2, 2008
284
1
Newton, MA
#1
This probably does not concern a problem with the ACTIVATE command, but perhaps someone here can help. The command

activate "*Sticky Notes*" /pos=680,0,380,830
activates the Windows Post-It app (C:\Windows\System32\StikyNot.exe), but it does not change its position. The command works fine with TCMD, Firefox, Thunderbird, etc. Are some programs unable to have their window size and position changed using ACTIVATE?
 
#2
Just as a test, try changing the position from 680,0 to 0,0 and see what happens.

I had a dickens of a problem with an SDL window. I solved my problem as follows;
Code:
set wcs=%@winsize[dbDOS(TM) PRO 3]
set height=%@word[0,%wcs]
set width=%@word[1,%wcs]
activate "dbDOS(TM) PRO 3" /pos=0,0,%width,%height
Joe
 
Jun 2, 2008
284
1
Newton, MA
#3
I tried using a number of values for the position and size, and nothing ever changed. I also found that for that program @winpos and @winsize returned bogus values. There is something strange about that application.

I have a script that resets the window positions of certain programs to my default position for them. I use it if I temporarily change the size or placement or if that happens by accident. I have now deleted the code for Sticky Notes from that script.
 

rconn

Administrator
Staff member
May 14, 2008
10,778
97
#4
ACTIVATE will have problems with applications that have multiple main windows (not many, but there are some out there) because the window it's sending messages to may not be the one whose message queue the app is monitoring.

Also, some apps will ignore or override the messages sent by ACTIVATE.