=========================================================================== BYWINDOW.EXE http://www.ozemail.com.au/~dbareis (db0@anz.com) =========================================================================== You need to be aware that the commands you specify are sent to all windows that match the mask. The "*" character is the wildcard character and means different things depending on its position (you are allowed 0 or 1 '*' chars). * No '*' means text describes EXACT window title (including leading and trailing whitespace. * The '*' begins the text means the Window should contain the text you supply. * The '*' ends the text means that the window title should start with the text you supply. This program sends output to stdout/stderr so you should redirect this. Some simple examples: ByWindow MAXIMISE Netscape* ByWindow SetFocus Netscape* To position and size a window: ByWindow Size E.EXE* 100 300 ByWindow Move E.EXE* 100 100 Change Windows Title: ByWindow NewTitle "E.EXE -*" "Simple Editor" To dump its application menu: ByWindow DumpMenu "Simple Editor" > E.DMP To remove its "save As" option: ByWindow RemoveMenu1 "Simple Editor" 0x404 To close the window: ByWindow close "Simple Editor" The following shows the programs redirected output when a syntax error occurred: []-----------------------------------------------------------[] | BYWINDOW.EXE, Version 98.213 (C)opyright Dennis Bareis 1998 | | http://www.ozemail.com.au/~dbareis (db0@anz.com) | []-----------------------------------------------------------[] CORRECT SYNTAX: BYWINDOW[.EXE] [!]ActionId "[*]WindowText[*]" | DESK-TOP | WINDOW-LIST [XposOrLen YposOrLen] [ON|OFF] ["NewWindowTitle"] [WindowId|NOFID SpecMsgId SpecIdMp1Val SpecIdMp2Val] [SV_*SysId NewValue] [[0x]MenuItemID ...] [> DebugOutputFile/Device] Valid ActionIds (! means apply to all windows, ie. even owned): DUMP[+] MINIMIZE MAXIMIZE SETFOCUS CLOSE HIDE SHOW REFRESH size move SysModal flash NewTitle SpecifiedId SetSysValue DumpMenu DumpSysMenu RemoveMenu RemoveMenu1 RemoveSysMenu RemoveSysMenu1 Note that the 'WindowText' including any wildards may be specified twice seperated by '~', in which case the 2nd window text is a child window of the 1st! (example "*Command Ref~Contents") *** NOT WORKING YET! *** REAL LIFE (tested & used) EXAMPLES: ByWindow.exe !DUMP * > \1.tmp & type \1.tmp ByWindow.exe SetFocus "STARTUP.CMD*" ByWindow.exe SpecifiedId DESK-TOP NOFID 0x20 0x2c1 0x10002 ByWindow.exe !SpecifiedId "PMDiary Opt*" NOFID 0x7a 0x2e011005 0x63 REASON: Too few parameters, expect at least 2.