Sign in to follow this  
Followers 0
Blade1

Opening save dialog

7 posts in this topic

Hi,

I'm running Windows 7 and using autoscript. I want to launch IE9 at a specified address (works), press ctrl s and save the webpage. The last 2 bits I cannot do. The script below is what I have.

$my_url = "http://www.google.com"

ShellExecute ( "C:\Program Files\Internet Explorer\iexplore.exe", $my_url )

Send("^S")

However, the Send() function does not successfully open the save dialog. How can I do this?

Thanks

Share this post


Link to post
Share on other sites



If you use Send() you will need to have the IE windows on front, maybe ControlSend() will be more useful.

Share this post


Link to post
Share on other sites

If you use Send() you will need to have the IE windows on front, maybe ControlSend() will be more useful.

That function takes a few parameters. What would be an example of using that function on a webpage?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Mt IE dont have the Save option even the File menu... and my mozilla resist the key sending.

for example: this should work, but it doesn´t

Controlsend("[CLASS:MozillaUIWindowClass]","","[CLASS:MozillaWindowClass;INSTANCE:1]","^S")

Maybe InetGet() will be useful. you can get html bodys or images or wherever you want.

$my_url = "http://www.google.com"
$my_file = "google.html"
$inetget = InetGet($my_url,$my_file)
Edited by monoscout999

Share this post


Link to post
Share on other sites

#include <IE.au3>

Local $oIE = _IECreate("http://www.google.com")

_IEAction($oIE, "saveas")

This worked perfectly! Thanks. How could I save the file in the save as box? Sorry for all the questions!

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