Failure of ACTIVATE to Set a Window Position

Jun 2, 2008
376
2
Newton, MA
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?
 
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
376
2
Newton, MA
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
12,356
150
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.
 
Similar threads
Thread starter Title Forum Replies Date
Jay Sage WAD Failure of Alias Command with /Z Option Support 14
M MOVE does not behaves like intended (on failure) Support 1
M WAD /elevated failure... Support 13
M TCmd Failure... Support 1
M Start "/Elevated" failure... Support 3
C TakeCommand 18 Installation Failure Support 13
M A UNC name failure... Support 28
S WAD Xenforo posts - EMAIL delivery failure Support 18
M %_EXECARRAY failure... Support 2
Stefano Piccardi UTF-8 BOM marker @iniread failure Support 6
S Failure: _EXECARRAY Support 1
S @DEVICE failure Support 7
Roedy reame.txt failure in installer Support 1
D iftp failure after upgrading to build 65 Support 9
N Command History Failure? Support 3
N Directory wildcard failure? Support 1
J dir failure with some unicode characters Support 6
J V12 PDIR failure Support 1
J OT: Windows 7 failure Support 24
U failure to load plugin Support 5
Jay Sage Failure in TCMD Help with Favorites Support 9
S SHORTCUT command failure Support 1
S Recent website and forum failure Support 9
J Find failure dialog box failure Support 0
Jay Sage Failure with WINDOW Command Support 4
dcantor IF ISAPP failure Support 12
vefatica Tray min'd TCMD and ACTIVATE Support 6
A v25 BC break in WINDOW and ACTIVATE Support 12
D activate /max fortnite Support 6
A Inconsistent @WINPOS // ACTIVATE /POS= behavior Support 0
Jay Sage Change in Behavior of Activate Command Support 4
vefatica WAD More on ACTIVATE Support 4
nickles activate "..." hide hides the foremost window Support 3
ehab aboudaya How to? activate tab with same directory in command line Support 6
D ACTIVATE doesn't find windows Support 7
dcantor Strange status in ACTIVATE command Support 0
Stefano Piccardi TCC ACTIVATE error Support 9
V Set path permanently from within TCC? Support 3
S Debugger keeps breaking with no break point set. Support 1
Joe Caverly Set a batch variable (%1 - %n) when TCC is executing a batch file Support 5
R How to? Set default application in a special folder Support 4
A How to? Set up SMTP password in TCC-RT Support 1
vefatica WAD More SET /A woes Support 4
vefatica SET /A and multidimensional array. Support 1
M How to set Path variable for non-executable file extensions in 4DOS Support 8
D Need to set Take Command font size when switching to high DPI display Support 0
P "Set" command behavior - a bug? Support 3
M How to? Set the ribbon titles to mixed case Support 1
X How to set %_INIREAD result to variable Support 5
M WAD Set statements in () causes problems Support 8

Similar threads