saywell Posted February 12, 2009 Share Posted February 12, 2009 I have a program that opens a web page, inputs a username and PIN (from an ini file) and then leaves the user to add a load of other stuff. When this is completed successfully, the website acknowledges completion by opening another page. It's https://nww.sft.nhs.uk/sft/upload3 in fact.I need my script to be able to rcognise when this url has been opened (in the same instance of IE) so I can get it to delete some temporary files.I've looked at the _IE section of help, but not come up with anything.Could someone point me in the right direction please?Thanks,William.Relevant extract of Code follows:#Include <IE.au3>$sSFTPlogin = IniRead(@ScriptDir & "\config\encryption.ini", "SFTP", "nhs_net_email","username@nhs.net") $sSFTPpin = IniRead(@ScriptDir & "\config\encryption.ini", "SFTP", "PIN","0000")$oIE = _IECreate ("https://nww.sft.nhs.uk/sft/upload1" )$oForm = _IEFormGetCollection ($oIE, 0)$oQuery = _IEFormElementGetCollection ($oForm, 0)_IEFormElementSetValue ($oQuery, $sSFTPlogin)$oQuery = _IEFormElementGetCollection ($oForm, 1)_IEFormElementSetValue ($oQuery, $sSFTPpin)[here the user does some stuff][when https://nww.sft.nhs.uk/sft/upload3 opens I need to carry on with the script to do some filedeletes] Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 12, 2009 Share Posted February 12, 2009 I have a program that opens a web page, inputs a username and PIN (from an ini file) and then leaves the user to add a load of other stuff. When this is completed successfully, the website acknowledges completion by opening another page. It's https://nww.sft.nhs.uk/sft/upload3 in fact. I need my script to be able to rcognise when this url has been opened (in the same instance of IE) so I can get it to delete some temporary files. I've looked at the _IE section of help, but not come up with anything. Could someone point me in the right direction please? Thanks, William. Relevant extract of Code follows: #Include <IE.au3> $sSFTPlogin = IniRead(@ScriptDir & "\config\encryption.ini", "SFTP", "nhs_net_email","username@nhs.net") $sSFTPpin = IniRead(@ScriptDir & "\config\encryption.ini", "SFTP", "PIN","0000") $oIE = _IECreate ("https://nww.sft.nhs.uk/sft/upload1" ) $oForm = _IEFormGetCollection ($oIE, 0) $oQuery = _IEFormElementGetCollection ($oForm, 0) _IEFormElementSetValue ($oQuery, $sSFTPlogin) $oQuery = _IEFormElementGetCollection ($oForm, 1) _IEFormElementSetValue ($oQuery, $sSFTPpin) [here the user does some stuff] [when https://nww.sft.nhs.uk/sft/upload3 opens I need to carry on with the script to do some filedeletes] If the window title is unique, you could just use regular WinWait() or WinExists() functions, or you could do a loop of _IEAttach() by URL until it succeeded. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
saywell Posted February 13, 2009 Author Share Posted February 13, 2009 If the window title is unique, you could just use regular WinWait() or WinExists() functions, or you could do a loop of _IEAttach() by URL until it succeeded. Thanks. Unfortunately the window title is constant through the series of pages - only the url and page content changes.I'll have a go at _IEAttach.William Link to comment Share on other sites More sharing options...
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