Tripoz Posted July 12, 2015 Share Posted July 12, 2015 (edited) hi, i got some problem to detect IE page/title that already exist..if the page is not exist, it can create a new page, but if already exist..its can detect but cant refresh it.can anybody help me please...thanksmy code:#include <IE.au3> while 1 sleep(2000) bacareturn() WEnd Func bacareturn() local $oIE,$oIE1 Local $Span local $URL ="https://www.xxxxx.com" If Not WinExists("Title Page - Windows Internet Explorer") Then $oIE = _IECreate($URL) consolewrite("web no exist, create new") Else $oIE = _IEAction($oIE,"refresh") consolewrite("web is already exist n refreshed") EndIf EndFunc Edited July 12, 2015 by Tripoz translation Link to comment Share on other sites More sharing options...
JohnOne Posted July 12, 2015 Share Posted July 12, 2015 Translation.n = andpls = pleasethx = thanks AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Tripoz Posted July 12, 2015 Author Share Posted July 12, 2015 Translation.n = andpls = pleasethx = thankslol...thx johnOne. Link to comment Share on other sites More sharing options...
mikell Posted July 12, 2015 Share Posted July 12, 2015 lol = n you shoud say : thx JOHave a look at _IEPropertyGet and these properties"locationname" Retrieves the name of the resource that Internet Explorer is currently displaying."locationurl" Retrieves the URL of the resource that Internet Explorer is currently displaying. Link to comment Share on other sites More sharing options...
Tripoz Posted July 12, 2015 Author Share Posted July 12, 2015 lol = n you shoud say : thx JOHave a look at _IEPropertyGet and these properties"locationname" Retrieves the name of the resource that Internet Explorer is currently displaying."locationurl" Retrieves the URL of the resource that Internet Explorer is currently displaying. more confused...lol.. theres no example for that properties in help file..:( Link to comment Share on other sites More sharing options...
mikell Posted July 12, 2015 Share Posted July 12, 2015 So don't be shy and build your own example #include <IE.au3> $oIE = _IECreate("http://www.google.com") $current_url = _IEPropertyGet($oIE, "locationurl") $oIE.visible = 0 Msgbox(4096,"locationUrl", $current_url) Link to comment Share on other sites More sharing options...
jguinch Posted July 12, 2015 Share Posted July 12, 2015 _IEAttach should also help you Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Tripoz Posted July 13, 2015 Author Share Posted July 13, 2015 (edited) _IEAttach should also help youyes ieattach could help me..but i need to refresh the web after attach it ( to grab some new data), because if just Attach it, the data still not change on the webpage so i must refresh it after attach it. So don't be shy and build your own example #include <IE.au3> $oIE = _IECreate("http://www.google.com") $current_url = _IEPropertyGet($oIE, "locationurl") $oIE.visible = 0 Msgbox(4096,"locationUrl", $current_url) hmm...that i dont know is what relation between locationurl/locationname with refresh the page..??please explain to me cause i need to know so in other day i willnt askin same question again..:) heres the solved code for my question (inspired by mikell code)..lol...thx so much mikell#include <IE.au3> $oIE = _IECreate("http://www.google.com") $current_url = _IEPropertyGet($oIE, "locationurl") _IEAction($oIE,"refresh") Edited July 13, 2015 by Tripoz solved Link to comment Share on other sites More sharing options...
jvds Posted July 13, 2015 Share Posted July 13, 2015 and why not _IEAttach and then _IEAction($oIE,"refresh")?and i think _IENavigate($URL) to the same url could also work as a refresh Link to comment Share on other sites More sharing options...
Tripoz Posted July 13, 2015 Author Share Posted July 13, 2015 @mikell1 more question, how to detect it if it opened or not?i trying something like this n got error :#include <IE.au3> If Not WinExists("Google - Windows Internet Explorer") Then $oIE = _IECreate("http://www.google.com") Else $current_url = _IEPropertyGet($oIE, "locationurl") _IEAction($oIE,"refresh") EndIfif it opened, i dont want to create a new one..just refresh. Link to comment Share on other sites More sharing options...
jguinch Posted July 13, 2015 Share Posted July 13, 2015 with _IEAttach :$oIE = _IEAttach("google") If IsObj($oIE) Then _IEAction($oIE, "refresh") Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Tripoz Posted July 13, 2015 Author Share Posted July 13, 2015 with _IEAttach :$oIE = _IEAttach("google") If IsObj($oIE) Then _IEAction($oIE, "refresh") niceeeeeee..thx so much @jguinch Link to comment Share on other sites More sharing options...
jguinch Posted July 13, 2015 Share Posted July 13, 2015 Glad to help you.In #7, I gave you the same answer... Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Tripoz Posted July 13, 2015 Author Share Posted July 13, 2015 Glad to help you.In #7, I gave you the same answer...Yeap..before i just know _ieattach with kind of "url" n not realize that the title of the page could help me.Thx once again 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