SimpleSi Posted April 20, 2011 Posted April 20, 2011 Is there anyway of creating a shortcut to pre-populate this login form so I can just set up a series of shortcuts in a shared folder for year 3 pupils to simply enter a password with having to type in [email protected] every time? regards Simon
andy_b Posted April 21, 2011 Posted April 21, 2011 Some kind of autohotkey script? #NoTrayIcon #Persistent SiteUrl = https://outlook.lancsngfl.ac.uk/owa/auth/logon.aspx?url=https://outlook.lancsngfl.ac.uk/owa/&reason=3 Email = [email protected] Ie = c:\Program Files\Internet Explorer\iexplore.exe IeTitle = Microsoft Exchange - Outlook Web Access - Windows Internet Explorer BlockInput, On Run, %Ie% %SiteUrl% WinWaitActive, %IeTitle%,,30 if ErrorLevel { BlockInput, Off MsgBox, WinWait timed out. Goto, Exit } else Sleep 100 SendInput %Email% {Tab} BlockInput, Off Exit: ExitApp I think there are fancy ways to detect if the page has loaded, but this seemed to work ok. 1
Arthur Posted April 21, 2011 Posted April 21, 2011 Similar to the script above, but in AutoIt and PowerShell respectively (and a little fancier ). Pupil3.au3 #include $oIE = _IECreate ("https://outlook.lancsngfl.ac.uk/owa/", 0, 1, 1, 1) $oForm = _IEFormGetObjByName($oIE, "logonForm") $oUsername = _IEFormElementGetObjByName($oForm, "username") $oPassword = _IEFormElementGetObjByName($oForm, "password") _IEFormElementSetValue($oUsername, "[color="red"][email protected][/color]") _IEAction ($oPassword, "focus") Pupil3.ps1 $username = "[color="red"][email protected][/color]" $ie = New-Object -com "InternetExplorer.Application" $ie.navigate("https://outlook.lancsngfl.ac.uk/owa/") $ie.visible = $true while ($ie.Busy -eq $true) { Start-Sleep -Milliseconds 500; } $ie.Document.getElementById("username").value = $username; $ie.Document.getElementById("password").select() 1
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