Jump to content

Recommended Posts

Posted

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.

  • Thanks 1
Posted

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()

  • Thanks 1

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



×
×
  • Create New...