BOUNCER Posted August 29, 2007 Posted August 29, 2007 (edited) i cant identify windows task tray to bring up the program in the task trayheres what i want to do, i want to make a script that clicks refresh button every 5-10 minutes cause my network gets disconnected frequently and wont reconnect unless its refreshedalso under window and control are 2 different position coordinates, under window its 398, 63, however under control its 6,7? which one am i suppose to follow, and how do i identify the windows task tray, theres no way to identify it Edited August 29, 2007 by BOUNCER
BigDod Posted August 29, 2007 Posted August 29, 2007 For the answer to the first part do a search in Example Scripts for SysTray_UDF.au3 bu Tuape Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Zedna Posted August 29, 2007 Posted August 29, 2007 This has been discussed many times already.Search for tray and look at Auto3Lib Resources UDF ResourcesEx UDF AutoIt Forum Search
BOUNCER Posted August 29, 2007 Author Posted August 29, 2007 hmm i cant install autolib it wants older version of autoit
BOUNCER Posted August 29, 2007 Author Posted August 29, 2007 (edited) ok i got the task tray part working expandcollapse popup#include "SysTray_UDF.au3" ; Press hide inactive icon's button part is from Valik's refresh system tray script! $oldMatchMode = Opt("WinTitleMatchMode", 4) $oldChildMode = Opt("WinSearchChildren", 1) $class = "classname=Shell_TrayWnd" $hControl = ControlGetHandle($class, "", "Button2") ; get tray position and move there. Helps if Auto Hide tray option is used. $posTray = WinGetPos(_FindTrayToolbarWindow()) MouseMove($posTray[0], $posTray[1]) $index = _SysTrayIconIndex("RaUI.exe"); Change this to some other application if needed If $index <> -1 Then $pos = _SysTrayIconPos($index) If $pos = -1 Then ; ***** Moved by CatchFish ***** ; If XP and the Hide Inactive Icons mode is active If $hControl <> "" And ControlCommand($class, "", $hControl, "IsVisible","") Then ControlClick($class, "", $hControl) Sleep(250); Small delay to allow the icons to be drawn EndIf ; ****************************** $pos = _SysTrayIconPos($index) If $pos = -1 Then Exit; ** A real error this time;) EndIf MouseMove($pos[0], $pos[1]) Sleep(1000) MouseClick("left") MouseClick("left") WinWaitActive("Ralink Wireless Utility", "Rescan") Sleep(1000) WinWaitActive("Ralink Wireless Utility", "Ok") EndIf ConsoleWrite(@CRLF & @CRLF & "Pos[0]: " & $pos[0] & "$pos[1]: " & $pos[1]) ; Restore Opt settings Opt("WinTitleMatchMode", $oldMatchMode) Opt("WinSearchChildren", $oldChildMode) whats the best way to click the rescan button? it has no keyboard shortcuts, it has the visible text "Rescan" would it be ControlClick ? Edited August 29, 2007 by BOUNCER
weaponx Posted August 29, 2007 Posted August 29, 2007 This seems like a poor workaround for a more serious problem. Use netsh to connect to the wireless network instead.http://technet.microsoft.com/en-us/windows...x#bkmk_wlanConnnetsh connect ssid=linksys name=Profile2 interface="Wireless Network Connection"Hell you could even use at.exe or schtasks.exe to schedule it so you don't need an autoit process running 24 /7:http://www.microsoft.com/resources/documen...s.mspx?mfr=trueMaybe??:schtasks /create /SC MINUTE /MO 15 /TN reconnectwireless /TR netsh connect ssid=linksys name=Profile2 interface="Wireless Network Connection"
BOUNCER Posted August 29, 2007 Author Posted August 29, 2007 (edited) ah damn i got it working too, ill look at the netsh, i dont seem to have most of the netsh commands, such as add profile Edited August 29, 2007 by BOUNCER
BOUNCER Posted August 29, 2007 Author Posted August 29, 2007 the new netsh commands seem to be vista, i dont have any of those commands
Zedna Posted August 29, 2007 Posted August 29, 2007 hmm i cant install autolib it wants older version of autoitLook here Resources UDF ResourcesEx UDF AutoIt Forum Search
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