Jump to content

_IECreate : Online vs. Offline Page


Go to solution Solved by musahi0128,

Recommended Posts

What's up everybody,

It feels really good to back here :v

Please take a look at this :

#include <IE.au3>

$PageOnline = "http://kasumiremix.appspot.com/mangareader.net/shingeki-no-kyojin"
$oIE = _IECreate("")
_IENavigate($oIE, $PageOnline)
$LatestChapter = _IEGetObjById($oIE, "latestchapters")
MsgBox(0, "", _IEPropertyGet($LatestChapter, "innerhtml"))

Those code works, but it take some time to finish, which i don't want to go through;

#include <IE.au3>

$PageOnline = "http://kasumiremix.appspot.com/mangareader.net/shingeki-no-kyojin"
$PageOffline = "D:\Test.html"
InetGet($PageOnline, $PageOffline)
$oIE = _IECreate("")
_IENavigate($oIE, $PageOffline)
$LatestChapter = _IEGetObjById($oIE, "latestchapters")
MsgBox(0, "", _IEPropertyGet($LatestChapter, "innerhtml"))

Those next code, while it does load the page correctly (faster, empty without any image etc. which i preffered), why it just give me "0".

Can anybody give me explanation and maybe workaround about this ?

Regards, Moh. Sarip Hidayat

IT Staff @ ECO Paper Indonesia, Ltd.

 

Link to comment
Share on other sites

Looks like your last line is inverted

Edit... oops sry didn't look at it close enough... one second.

; Open a browser to the basic example, get an object reference ; to the DIV element with the ID "line1". Display the innerText ; of this element to the console.

#include <IE.au3>

#include <MsgBoxConstants.au3>

Local $oIE = _IE_Example("basic")

Local $oDiv = _IEGetObjById($oIE, "line1") MsgBox($MB_SYSTEMMODAL, "Line1", $oDiv.innertext)

Edited by markyrocks
Link to comment
Share on other sites

Write some debug stuff:

Local $debug = _IEPropertyGet($oDiv, "innerhtml")
Switch @error
    Case 3
        MsgBox(0, "", "3($_IEStatus_InvalidDataType) - Invalid Data Type")
    Case 4
        MsgBox(0, "", "4($_IEStatus_InvalidObjectType) - Invalid Object Type")
    Case 5
        MsgBox(0, "", "5($_IEStatus_InvalidValue) - Invalid Value")
    Case Else
        MsgBox(0, "", $debug)
EndSwitch

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

  • Solution

#include <IE.au3>
#include <MsgBoxConstants.au3>
Local $PageOnline = "http://kasumiremix.appspot.com/mangareader.net/shingeki-no-kyojin"
Local $oIE = _IECreate("about:blank")
_IEDocWriteHTML($oIE, BinaryToString(InetRead($PageOnline)))
Local $oDiv = _IEGetObjById($oIE, "latestchapters")
MsgBox($MB_SYSTEMMODAL, "LatestChapter", _IEPropertyGet($oDiv, "innerhtml"))

Working :v

Edit: Thanks for markyrocks for pointing me out.

Edited by musahi0128
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...