ErrorLevel ( "syntax" )
# create marker file
If ( DirExists("\MN Settings") )
WriteFile( "\MN Settings\Format_Test.txt", "FORMAT TEST")
EndIf
RunWait("\My Flash Disk\PartitionChecker.exe")
If ( FileExists("\MN Settings\Format_Test.txt") )
Delete("\MN Settings\Format_Test.txt")
EndIf
CallScript("\My Flash Disk\DisableUniscribe.mscr")
If ( FileExists("\My Flash Disk\AutoHideTaskbar.exe") )
Run("\My Flash Disk\AutoHideTaskbar.exe")
EndIf
If ( FileExists("\My Flash Disk\BT\BTCore.exe") )
Run("\My Flash Disk\BT\BTCore.exe")
EndIf
Run("\My Flash Disk\
NAVIGON\PM.exe")
If ( FileExists("\My Flash Disk\updateme_bak.exe") )
Delete("\My Flash Disk\*.NB0")
EndIf
If ( FileExists("\My Flash Disk\DFUWizardCE_bak.exe") )
Delete("\My Flash Disk\*.xpv")
Delete("\My Flash Disk\*.xdv")
Delete("\My Flash Disk\*.dfu")
EndIf
Delete("\My Flash Disk\*_bak")
Delete("\My Flash Disk\*_bak.exe")
Run ("\My Flash Disk\\
navigon.exe")
Sleep (32000)
title = "Mobile Navigator"
If (ActiveWindow() eq title)
x = 337
y = 231
day_color = 2698281
night_color = 1581080
While (TRUE)
GetColorAt (x, y, color)
If (color = day_color || color = night_color)
MouseClick (title, x, y)
Exit
EndIf
Sleep (200)
EndWhile
Else
Message (title & " not active", "Error")
EndIf