/dev/null Posted May 15, 2005 Posted May 15, 2005 Hi, is it possible to start an application (enlarge the window and bring it to the front) that sits in the system tray? Using keystrokes or mouse clicks does not work, as I don't know the exact position of the tool (which might even change). I searched the forum and docs, but could not find a hint. Acutally I want to start the "Wireless Network Connections" tool from WinXP, which shows me the available WLANs.ยด If it's not possible to start a tray application, is there another way to start the WinXP "wireless network connections" tool? Thanx Kurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
CyberSlug Posted May 16, 2005 Posted May 16, 2005 Until a better solution is found (assumes XP SP2):$title = "Network Connections" $adapter = "Wireless Network Connection" Run("control.exe ncpa.cpl") WinWait($title) ControlListView($title, "", "SysListView321", "Select", ControlListView($title,"","SysListView321","FindItem",$adapter) ) WinWaitActive($title) ControlSend($title, "", "SysListView321", "+{F10}v") WinClose($title) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
/dev/null Posted May 17, 2005 Author Posted May 17, 2005 Until a better solution is found (assumes XP SP2)Works great. Thanx! __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
Guest DSV Posted May 24, 2005 Posted May 24, 2005 G'day!Until a better solution is found (assumes XP SP2):$title = "Network Connections" $adapter = "Wireless Network Connection" Run("control.exe ncpa.cpl") WinWait($title) ...I tried to make nearly the same - it is necessary to change one of the option in LAN adapter. My code is very similar to your but I've wrote it without any assistance :expandcollapse popup$titleN = "Network and Dial-up Connections" $LAN = "Local Area Connection" $LANP = "Local Area Connection Properties" Run("control ncpa.cpl") $t=WinWait($titleN, "", 60) If $t = 0 Then MsgBox(0, "Error", "Timeout!") Exit EndIf WinWait($titleN) Sleep(500) WinActivate($titleN) ControlListView($titleN, "", "SysListView321", "Select", ControlListView($titleN, "", "SysListView321", "FindItem", $LAN)) If @error = 1 Then MsgBox(0, "Error", "Not selected!") Exit EndIf WinActivate($titleN) $t=ControlSend($titleN, "", "SysListView321", ""+{F10}r"") If $t = 0 Then MsgBox(0, "Error", "Can't to send!") Exit EndIf $t=WinWait($LANP, "", 10) If $t = 0 Then MsgBox(0, "Error", "Timeout!") Exit EndIf WinSetState($LANP, "", @SW_HIDE) ControlSend($LANP, "", "SysListView321", "NWLink Net{Space}{Space}") ControlSend($LANP, "", 1, "{Space}") WinClose($titleN)What trouble: sometime after selecting $LAN don't make next ControlSend (must to send "+{F10}r" to select P&roperties) and I've get timeout for opening $LANP. Look like ControlSend sometime send characters as if $LAN was NOT selected (as if I click right mouse button on empty space into "Network and Dial-up Connections" window). Or sometime this characters was send as if into "emptiness" - absolutely nothing happen after selection . If I try to run script (or compiled exe, it is unimportant) few times one after another - it's works. But if machine is relatively heavy loaded (and if when my script run from startup folder after booting) - I've get this trouble - missed "+{F10}r" characters after selection $LAN. I tried to change "+{F10}r" on equivalent (for me) "!fr" - without success. Where I'm wrong?TIA,Sergei
Guest DSV Posted May 25, 2005 Posted May 25, 2005 G'day! Hmm, nobody know? Seem I've find some workaround by setting more delay between sent keystrokes and plus minimizing all windows before run NCPA.CPL: Opt("SendKeyDelay", 100) ... WinMinimizeAll() Sleep(100) Run("control ncpa.cpl") ... Today my script with this additions (running from autostart) perfectly work while Windows booting - it was 1st time
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now