# DL Uplink Monitor Script v3
#
# Monitor the DL Uplink Applications and automatically re-connect
# if the application drops its connection to the main server.
#
# For use with the DL Uplink 1.5 application (http://www.dreamloverlabs.com)
# This script is written for the AutoIT script utility (http://www.autoitscript.com)
# Enable the hover-over debug on the Icon so I know what line
# The script is executing
AutoItSetOption ("TrayIconDebug", 1);0-off
# Repeat forever
While True
# Assume the DL Uplink Application is running
If WinExists("DL Uplink") Then
# Need to find a way to check if the "Connect" option is dimmed
# For now we just click on that part of the bar regargless of state
# I haven't found a good way to click the specific button, but this works
# I found we can get multiple Login Windows. Do not click if present
If Not (WinExists ("Login", "")) Then
ControlClick( "DL Uplink", "", "[NAME:toolStrip1]", "left", 1, 30, 30)
Else
# Try to raise the Login Window
WinActivate ("Login", "")
EndIf
EndIf
# Wait for 30 seconds fo the Login Window after clicking 'Connect'
WinWait("Login", "", 30)
If WinExists ("Login", "") Then
ControlClick ("Login", "Login", "[NAME:button1]")
Sleep (30000)
EndIf
#
# Look for error dialogs
#
# Connection error
If WinExists ("Connection error", "") Then
ControlClick ("Connection error", "OK", "[ID:2]")
EndIf
# During server maintinance the logins will fail.
If WinExists ("[CLASS:#32770]", "") Then
# This should handle the following errors:
# Login response unsuccessful
# Connection error
#
ControlClick ("[CLASS:#32770]", "", "[ID:2]")
EndIf
# During server maintinance the logins will fail.
# Look for additional error dialogs:
# The SQL query fails to connect to the database
If WinExists ("[CLASS:#32770]", "Server error") Then
ControlClick ("[CLASS:#32770]", "", "[ID:2]")
EndIf
# Male Management Server unreachable. Server offline or internet connection is down. Please try later or diagnose your internet connection.
If WinExists ("[CLASS:#32770]", "Connection error") Then
ControlClick ("[CLASS:#32770]", "", "[ID:2]")
EndIf
# Do not reduce this timeout, polling a downed server is useless
# and will likely get this script banned. You can wait 5 minutes,
# especially if its automated.
Sleep (300000)
WEnd
An automatic pulse would solve the problem except it wouldn't be good if the connection really did go down and you just kept getting zapped
Maybe a triple auto pulse would work but I was thinking along the lines of the software tries to reconnect and keeps trying until it does it successfully.
Either of these options would be just a software update and not require modification of the receiver