MSingh Posted February 23, 2016 Share Posted February 23, 2016 Hi, I’m new to the community and am in need for some help scripting an automation to open a url then right click on that page, click on save picture as (or keyboard stroke down 7 times I guess). The problem im getting is that with the following script im able to open the url but the mouse clicks occur in the autoit editor and not in the browser. $url1 = "blah blah blah" ShellExecute("iexplore", $url1) MouseClick("left", 100, 100, 1, 5) MouseClick("right", 100, 100, 1, 5) I hope you can help J Kind Regards, M Singh Link to comment Share on other sites More sharing options...
AutoBert Posted February 23, 2016 Share Posted February 23, 2016 You can open a URL with Quote $sUrl='https://www.autoitscript.com/forum/topic/180835-how-to-open-url-and-mouseclick-in-browser/' ShellExecute($sUrl) for automating a website it's better to use the functions of IE.au3, for example: _IECreate;or _IEAttach Link to comment Share on other sites More sharing options...
MSingh Posted February 24, 2016 Author Share Posted February 24, 2016 On 23/02/2016 at 0:43 PM, AutoBert said: You can open a URL with for automating a website it's better to use the functions of IE.au3, for example: _IECreate;or _IEAttach Hi, thank you for your response, I will change the script to use _IECreate, im unable to do this while at work but will try this tonight. Do you think this will help with the right click currently not being in the browser? Link to comment Share on other sites More sharing options...
AutoBert Posted February 24, 2016 Share Posted February 24, 2016 (edited) The IE.au3 has more than this 2 funcs. Have a look in the help and test the func's and the examples. Best starting is: ; Open a browser with the basic IE.au3 introductory text displayed #include <IE.au3> Local $oIE = _IE_Introduction("basic") and read the Introduction. edit: $sUrl='https://www.autoitscript.com/forum/topic/180835-how-to-open-url-and-mouseclick-in-browser/' ;to be canged ShellExecute($sUrl) $hwnd=WinActivate("bla-bla-Windowtitle") WinWaitActive($hwnd,'','') MouseClick() ;to be canged MouseClick() ;to be canged should do the job. Edited February 25, 2016 by AutoBert pid changed to hwnd Link to comment Share on other sites More sharing options...
MSingh Posted February 25, 2016 Author Share Posted February 25, 2016 Hi, i ran the same code with the click references but it only opens the url and doesnt do the mouseclick. I'll explain what im exactly trying to do, i want to open the url, right click, save image as, save to a folder on my c:// I need to automate this as i need to do this for over 400 images, each on seperate urls. I hope you can help. Link to comment Share on other sites More sharing options...
AutoBert Posted February 25, 2016 Share Posted February 25, 2016 Sorry, i had a strong failure. Now, is edited. 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