bornsan Posted September 22, 2010 Share Posted September 22, 2010 Hello guyz! I'm a newbie, i used this script to automatically login to a site, it will open the firefox and execute the script the problem is i want to return an error like when the user accidentally close the firefox or when there is no connection or the firefox is not installed. any suggestions, comments is very much appreciated...thanks! Case $CONNECT GUISetState (@SW_DISABLE) $uname = GUICtrlRead ($USERNAME) $upass = GUICtrlRead ($PASSWORD) $site = GUICtrlRead ($Combo1) MsgBox(0, "VSAL v1.0", "Please wait until the webpage is fully loaded") _FFStart($site) If _FFConnect() Then _FF_AutoLogin($uname , $upass, $site) MsgBox(0, "VSAL v1.0", "Webpage loaded successfully") GUISetState (@SW_ENABLE) Else if there is no connection or the firefox is accidentally closed or not installed Then MsgBox(0, "ERROR", "Webpage did not load successfully, please try again") GUISetState (@SW_ENABLE) EndIf Link to comment Share on other sites More sharing options...
lordicast Posted September 22, 2010 Share Posted September 22, 2010 Most functions have a @error response. find Failure: Returns 0 and sets @ERROR also check SetError in helpfile. if @Error then msgbox(0,'Error','You got a error') endif [Cheeky]Comment[/Cheeky] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now