Code:
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=green_padlock.ico
#AutoIt3Wrapper_outfile=User2Shibboleth.exe
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_Comment=A little script to sit and run in the background of child logons to automatically re-enter their globalid. This is a huge time saver especially for the younger children that can't type quickly.
#AutoIt3Wrapper_Res_Description=Passes Username to a Shibboleth SSO Form
#AutoIt3Wrapper_Res_Fileversion=1.3.1.2
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p
#AutoIt3Wrapper_Res_LegalCopyright=Alex 'Freedom' Haines
#AutoIt3Wrapper_Res_SaveSource=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
; Start the main loop.
Do
; Wait until the logon window shows itself...
WinWaitActive("Login - Windows Internet Explorer", "https://shibboleth.networcs.net/SSO/auth/networcs_auth2/index.php")
; Make sure this is the username window...
; WinWaitActive("Login - Windows Internet Explorer","Please enter your Username:")
; Add a little delay to avoid lag in accessing the website.
Sleep(500)
; Send the current logged on username to the form (which defaults to the username box).
Send(@UserName)
; Send the enter key to progress to the next page.
Send("{ENTER}")
; Display a message so the user knows what is happening.
MsgBox(0, "Shibboleth Logon Helper v1.3", "Hi " & @UserName &"! I noticed that you were trying to use a SSO service enabled website. To help out, I have already entered your username for you. Now all you need to do is put your password in.", 10)
; Wait for the user to finish entering their password and then loop.
; This helps stop us entering the username again by mistake as we can't differenciate the pages due to iframes!
Sleep(5000)
WinWaitClose("Login - Windows Internet Explorer", "https://shibboleth.networcs.net/SSO/auth/networcs_auth2/index.php")
; Sleep again and then loop to beginning to avoid double pasting etc.
Sleep(10000)
; End of the main loop.
; Exit the loop using 'ExitLoop' command.
Until False