This is an AutoIT script for anyone who wants to automate their login to the Sherston ICT website content.
$sURL = "http://www.sherston.com/Login/Default.aspx?RedirectPath=/Default.aspx" $sUserName = "USERNAME" $sPassword = "PASSWORD" $sForm = "aspnetForm" $sUserfield = 'ctl00$PageContent$Login1$txtUsername' $sPassfield = 'ctl00$PageContent$Login1$txtPassword' $oTimeout = 5000 _IELoadWaitTimeout($oTimeOut) _IEErrorHandlerRegister() $oIE = _IECreate($sURL) _IELoadWait($oIE) $oForm = _IEFormGetObjByName($oIE, $sForm) $oUserName = _IEFormElementGetObjByName($oForm, $sUserfield) $oPassword = _IEFormElementGetObjByName($oForm, $sPassfield) _IEFormElementSetValue($oUserName, $sUserName) _IEFormElementSetValue($oPassword, $sPassword) _IELinkClickByIndex($oForm, 5) _IELoadWait($oIE, $oTimeout, $oTimeout) _IENavigate($oIE, "http://www.sherston.com/crystal/default.aspx") _IELoadWait($oIE, $oTimeout, $oTimeout) _IELinkClickByText($oIE, "Launch")
Their website code is quite frankly showing every example of what NOT to do with HTML and code with truly awful accessibility fubars but at time of writing this code will write and I'll update as/when I notice any changes that require it.
To use this simply edit the username/password variables to suit your school and then upload the resultant executable to a shared space on your server.. Create a shortcut to that and deploy to your users and it'll handle the login fine... (It even works if you are logged in already).
Adjust the timeout to get it to wait longer or run quicker according to your system.
Hope it helps...
I'm sure this will come in handy now I have a school that have just bought in to this.
Cool. We don't use it but I'm thinking the same concept might work with Living Library. Why they can't just let you specify the password in the URL I don't know!
How embarrassing... I'd totally forgotten I'd even written that...
Let me know if anything changes won't you
There are currently 1 users browsing this thread. (0 members and 1 guests)