Sign in to follow this  
Followers 0
Steven Vandenhoute

internet explorer startup script business envirement

1 post in this topic

#1 ·  Posted (edited)

I am working on an It helpdesk.

When we open out internet explorer we are standardly redirected to the intranet page.

I have now written a little script ( as a test and learning application) witch do the following.

When I am at work the script asks me with site I would open (intranet, ICT intranet, google, ...)

When I am at every other place, the script go's automaticly to google.

the listing:

#Include <GUIConstants.au3>

;ping to mainframe
$var = Ping("1.2.3.4",250)
If $var Then; also possible:  If @error = 0 Then ...

GUICreate ( "Internet Explorer", 220, 80)



$combo=GUICtrlCreateCombo ( "Select Website", 10, 10, 200, 1000)

GUICtrlSetData ( -1, "Intranet|Intranet ICT|Google.be|Cibazone.be", "Select Website")


$okbutton=GUICtrlCreateButton ("Go!",  10, 40, 50, 30)
$cancelbutton=GUICtrlCreateButton ( "Cancel",  80, 40, 50, 30)

GUISetState ()

$msg = GUIGetMsg()

While 1
     $msg = GUIGetMsg()

     Select
       Case $msg= $GUI_EVENT_CLOSE
         ExitLoop

       Case $msg = $okbutton
         $data = GUICtrlRead($combo)
       
         If $data="Select Website" then 
           msgbox(4096, "Error", "Please select a Website.")
           ExitLoop
         ElseIf $data="Intranet" then 
           Run('explorer http://www.url.intranet, @WindowsDir)
           ExitLoop
         ElseIf $data="Intranet ICT" then 
           Run('explorer http://www.url.ict intranet', @WindowsDir)
           ExitLoop
         ElseIf $data="Google.be" then
           Run('explorer http://www.google.be', @WindowsDir)
           ExitLoop
         ElseIf $data="Cibazone.be" then 
           Run('explorer http://www.cibazone.be', @WindowsDir)
           ExitLoop
         
         EndIf
       
       Case $msg = $cancelbutton
         ExitLoop
     EndSelect

Wend


Else
    Run('explorer http://www.google.be', @WindowsDir)
EndIf
Edited by Steven Vandenhoute

"You cannot solve a problem with the mind that created it" (Albert Einstein)

Share this post


Link to post
Share on other sites



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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0