I want to test connection then if connected display web site. Checked successful.
Code:
res = File.Run(SessionVar.Expand("%TempLaunchFolder%\\TestConnection.exe"), "http://games.mannet.ru/stat/", "", SW_HIDE, true);
error = Application.GetLastError();
-- stop timer as soon as function returns
Screen.StopTimer();
-- now check the result
if (error == 0) then
if (res == 0) then
-- TestConnection was able to connect to URL
bConnected = true;
DlgScrollingText.SetProperties(CTRL_SCROLLTEXT_BODY_01, {Text = "http://games.mannet.ru/stat/"});
else
-- TestConnection timed out or failed
bConnected = false;
DlgScrollingText.SetProperties(CTRL_SCROLLTEXT_BODY_01, {Text = "Can't connect to server"});
-- jump to an error screen, if you need connectivity
end
else
bConnected = false;
DlgScrollingText.SetProperties(CTRL_SCROLLTEXT_BODY_01, {Text = "Can't connect to server"});
-- error while running TestConnection.exe (have you included the primer file?)
-- jump to appropriate screen
end
But it display http://games.mannet.ru/stat/ as text only. DlgScrollingText sets to HTML mode.