Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Weird Browser Issue

$
0
0

Im running a test to make sure browsers connect properly to the internet like this

            If ProcessExists('iexplore.exe') Then ProcessClose('iexplore.exe')             If ProcessExists('chrome.exe') Then ProcessClose('chrome.exe')             If ProcessExists('firefox.exe') Then ProcessClose('firefox.exe')             Sleep(200)             ShellExecuteWait('iexplore.exe')             Sleep(200)             If FileExists(@ProgramFilesDir & '\Google\Chrome\Application\chrome.exe') Then ShellExecuteWait('chrome.exe')             Sleep(200)             If FileExists(@ProgramFilesDir & '\Mozilla Firefox\firefox.exe') Then ShellExecuteWait('firefox.exe')             Sleep(200)             If Not ProcessExists('iexplore.exe') Or Not ProcessExists('chrome.exe') Or Not ProcessExists('firefox.exe') Then                 Switch MsgBox($MB_YESNO + $MB_ICONWARNING + $MB_DEFBUTTON2, 'Browsers Check', 'Did All Browsers Work')                     Case $IDYES                         GUICtrlSetImage($BrowserIcon, $tick)                         RegWrite('HKEY_LOCAL_MACHINE\SYSTEM\Setup\Simple', 'Browser', 'REG_SZ', _Date_Time_SystemTimeToDateTimeStr($CuDate))                     Case $IDNO                         GUICtrlSetImage($BrowserIcon, $cross)                         RegWrite('HKEY_LOCAL_MACHINE\SYSTEM\Setup\Simple', 'Browser', 'REG_SZ', 'NotCompleted')                 EndSwitch             EndIf

But it hangs like a git between 

            ShellExecuteWait('iexplore.exe')             Sleep(200)             If FileExists(@ProgramFilesDir & '\Google\Chrome\Application\chrome.exe') Then ShellExecuteWait('chrome.exe')

If i reduce it to this

            ShellExecuteWait('iexplore.exe')             Sleep(200) ;~          If FileExists(@ProgramFilesDir & '\Google\Chrome\Application\chrome.exe') Then                 ShellExecuteWait('chrome.exe')             Sleep(200) ;~          If FileExists(@ProgramFilesDir & '\Mozilla Firefox\firefox.exe') Then                 ShellExecuteWait('firefox.exe')

Its instant but then it gives an error that firefox cant be found if its not installed

 

Any suggestions how to stop this hanging


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>