Sign in to follow this  
Followers 0
saywell

_IE question

3 posts in this topic

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]

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0