Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Launch a program on the system tray
I am not sure this is going to work for you, but its worth a try.....
------------------------------------
The following script is used only for determining the window name...
allwins = WinItemize() win = AskItemList("Select Program Name to activate", allwins, @TAB,@UNSORTED,@SINGLE) WinActivate(win) ;*or* WinShow(win)
------------------------------------
After you've found the name of the applications window, add one of the following lines to the script file you are creating.
For example......
WinActivate("FtpNetDrive Monitor")
*OR*
WinShow("FtpNetDrive Monitor")
------------------------------------
If this doesn't work....
You'll need to figure out what EXE the systray icon EXE points to, then
launch that EXE with the Run function. Their may be commandline
parameters, you are not aware of....
You may be able to find out the name of the EXE that in the Systray, by looking through the list of applications in the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
------------------------------------
Finally
Contact the developer of this ftp utility and ask if they have any undocumented way to activate the window via the commandline....(using the run command)
Older versions of windows uses a kind of different systray area... and that window was opaque to Winbatch.
The following will activate WinBatch PopMenu on Windows XP, as long as you do not have the "Hide inactive icons" selected in the Taskbar and StartMenu properties.
And this only run on Winbatch 2001 and later.
;RoboScripter ; Made with ; RoboScripter ver: 28 ; CtlMgr ver: 20026 AddExtender("wwctl34i.dll") ;Title: Notification Area ;ID: 0 ;Class: ToolbarWindow32 ;Level: 4 window1=cWndByWndSpec("Shell_TrayWnd","explorer",3,304,303,40965) window2=cWndByID(window1,303) window3=cWndByID(window2,0) ControlHandle=cWndByID(window3,0) result=cGetTBText(ControlHandle) Message("Toolbar Text",StrReplace(result,@tab,@crlf)) ;Get the index of the button select1=ItemLocate("WinBatch PopMenu", result, @tab);note ItemLocate is case sensitive message("",select1) cClickToolbar(Controlhandle,select1) ;Clicks a toolbar button exit
partial_icon_name = "Local Area Connection" AddExtender("wwctl34i.dll") window1=cWndByWndSpec("Shell_TrayWnd","EXPLORER",3,304,303,40965) window2=cWndByClass(window1,`TrayNotifyWnd`) window3=cWndByClass(window2,`SysPager`) ControlHandle=cWndByClass(window3,`ToolbarWindow32`) tbtext=cGetTBText(ControlHandle) beginptr = StrIndexNC(tbtext,partial_icon_name,0,@FwdScan) if beginptr == 0 Message("","Icon not found in Systray") exit Endif endptr = StrIndexNC(tbtext,@Tab,beginptr,@FwdScan) if endptr == 0 ;assume end of list len = -1 Else len = endptr-beginptr Endif iconname = StrSub(tbtext,beginptr,len) selectitem = ItemLocate(iconname, tbtext, @Tab) cClickToolbar(Controlhandle,selectitem) ;Clicks a toolbar button
Article ID: W14606
Filename: Launch a program on the system tray.txt
File Created: 2002:07:12:13:25:46
Last Updated: 2002:07:12:13:25:46