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("",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||", "Select Website")

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

GUISetState ()

$msg = GUIGetMsg()

While 1
     $msg = GUIGetMsg()

       Case $msg= $GUI_EVENT_CLOSE

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


    Run('explorer', @WindowsDir)
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