Jump to content
Sign in to follow this  
Blade1

Opening save dialog

Recommended Posts

Blade1

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
monoscout999

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
Blade1

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
monoscout999

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
Blade1

#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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.