I'm really new to autoit, I mean i've only had it for a few hours. i'm attempting to make an application for some of my clients to retrieve data from the internet, now i have a connection ping test to make sure they have internet access, if the result from that ping is negative display some offline information.
Is there some possiblity of loading an internal file from the apps exe or not?. here's my code below - anyhelp would be apreciated.
#NoTrayIcon
#include <GUIConstantsEx.au3>
#include <IE.au3>
#Region
#EndRegion
; Main Window Variables
Dim $WindowName = "VT Computer Services :: Online Mode"
Dim $WindowFail = "VT Computer Services :: Offline Mode"
Dim $width = "900"
Dim $height = "600"
Dim $HomePage = "http://www.some-domain.net/"
Dim $iCon = "VTCServices.ico"
; ~~~~~~~~~~~~~~~~~~~~
$ping = Ping("google.com", 1000)
If $ping = 0 then
; GUI
Dim $gui = GUICreate($WindowName, $width, $height)
Dim $IE = _IECreateEmbedded()
GUICtrlCreateObj($IE, 0, 0, $width, $height)
_IENavigate($IE, "index.html");Section I Would Like To Have Load Internal HTML File from Self EXE.
GUISetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
WEnd
Exit
Else
Dim $gui = GUICreate($WindowName, $width, $height)
Dim $IE = _IECreateEmbedded()
GUICtrlCreateObj($IE, 0, 0, $width, $height)
_IENavigate($IE, $HomePage)
GUISetState()
EndIf
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
EndSelect
WEnd