I have created this script that just keeps clicking the refresh button on the connect to window. This should help make vistumbler results more accurate.
I am looking for a better way of doing this without the connect to gui, but for now here is my test script.
*Note* this is made for US-english, so window titles may need to be changed to have this work in another language. To change edit refreshnetworks.ini.
Code: Select all
#include <GUIConstants.au3>
$setings = "refreshnetworks.ini"
$ConnectToWindowName = IniRead($setings, "Settings", "ConnectToWindowName", "Connect to a network")
$ConnectToButton = IniRead($setings, "Settings", "ConnectToButton", "Button4")
Dim $Running = 0
Dim $timer = TimerInit()
$Form1 = GUICreate("Refresh Networks", 138, 106, -1, -1)
$Start = GUICtrlCreateButton("Start", 8, 8, 121, 25, 0)
$Time = GUICtrlCreateInput("5000", 8, 40, 121, 21)
$Exit = GUICtrlCreateButton("Exit", 8, 72, 121, 25, 0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Exit
Exit
Case $Start
If $Running = 1 Then
$Running = 0
GUICtrlSetData($Start, "Start")
WinClose ($ConnectToWindowName)
Else
$Running = 1
GUICtrlSetData($Start, "Stop")
Run("RunDll32.exe van.dll,RunVAN")
$timer = TimerInit()
EndIf
EndSwitch
If $Running = 1 And TimerDiff($timer) >= GUICtrlRead($Time) And WinExists($ConnectToWindowName) Then
;WinSetState ("Connect to a network", "", @SW_HIDE)
$c = ControlClick($ConnectToWindowName, "", $ConnectToButton)
If $c <> 1 Then MsgBox(0, "error", "error")
$timer = TimerInit()
EndIf
WEnd