I've tried to create a script to browse to a web page in IE, but it only works for some sites, I've tried to simplify the script as much as possible, hoping you can point me in the right direction - thanks.
This one going to Google does work:
#include <IE.au3> $oIE = _IECreate("https://www.google.com.au/", 0, 1, 1) _IELoadWait($oIE) _IEQuit($oIE) But this one going to OneDrive opens the IE page, but fails immediately returning the errors, and the IE window is not closed:
--> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147023174, Browser has been deleted prior to operation.)
--> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_InvalidObjectType ()
--> IE.au3 T3.0-2 Error from function _IEQuit, $_IESTATUS_InvalidObjectType
#include <IE.au3> $oIE = _IECreate("https://abccorp-my.sharepoint.com/", 0, 1, 1) _IELoadWait($oIE) _IEQuit($oIE) Even if I put a sleep timer in for 10 seconds after the _IECreate it still doesn't work
Just had an idea and wanted to know where to start. I want to download a screenshot of a website automatically into a .png .jpg ect format so I can then set it as my desktop background.
This might be for for news: When the latest news is added to a website a screenshot of that website is saved and added to my desktop background.
I have tried using website that already do the screenshot but you have to open the website and click the button for it to generate one and thus InetGet does not help.
I'm trying to:
1) Open a hidden browser session
2) Do some stuff in the background
3) Make the hidden window visible
This is my code:
Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase $oIE = _IECreate("https://www.google.co.uk/",0,0) $oSearchBox = _IEGetObjById($oIE, "lst-ib") $oSearchBox.innertext = "AutoIT" $oForm = _IEFormGetObjByName($oIE,"f") _IEFormSubmit($oForm) WinSetState("Google","",@SW_SHOW)
It dosen't work
The last line does make the window visible but it is an empty greyed out box that disappears as soon as I click on it.
I have a sort of workaround that hides the browser window as soon as I have created it which works fine:
$oIE = _IECreate("https://www.google.co.uk/") WinSetState("Google","",@SW_HIDE) . . . WinSetState("Google","",@SW_SHOW) But this looks a bit pants as the newly created window flashes on then off of the screen.
Am I using the wrong method to make the browser window visible?
I saw few UDFs related to IE and Firefox to automate tasks related to these browsers.
But is it possible to automate tasks like drag and drop in the website.?
Like in the below video.
If not can you tell me some alternatives, as it is not possible in selenium as I heard.