Jump to content

IECREATE & IEBodyReadText


Recommended Posts

Hey guys!

i've been wandering why does that code below returns diffrent values if the IECreate is SHOWN or HIDDEN !!!

- what do i need to add in order to get the HIDDEN WINDOW to work more similar to the SHOWN one?!

THANKS IN ADVANCE !

#include <IE.au3>
$ret = CheckValidIP()
MsgBox(0,"",$ret&" | "&@error)
Func CheckValidIP()
Opt("SendKeyDelay", 150) 
$oIE = _IECreate("www.google.com",0,0,1)
$oIEhwnd = _IEPropertyGet($oIE, "hwnd")
ControlShow($oIEhwnd, "", "Internet Explorer_Server1")
ControlSend($oIEhwnd, "", "Internet Explorer_Server1", "{TAB 15}{ENTER}")
_IELoadWait($oIE,3000,7000)
$text = _IEBodyReadText($oIE)
If StringInStr($text,"Download via",0,1)=0 Then
    If StringInStr($text,"reached the download-limit",0,1)=0 Then
        If StringInStr($text,"already downloading",0,1)=0 Then
            MsgBox(0,"",-1)
            SetError("Unknown Error!")
            Return -1
        Else
            MsgBox(0,"",2)
            SetError("Already downloading from that IP!")
            Return 2
        EndIf
    Else
        MsgBox(0,"",0)
        SetError("IP is invalid, you have to wait!")
        Return 0
    EndIf
Else
    MsgBox(0,"",1)
    SetError("IP is open for business!")
    Return 1
EndIf
EndFunc
Edited by Armand

[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Link to comment
Share on other sites

Why are you using ControlSend? If you activate whatever control it is you are activating with the TAB 15 Enter, you will not need to delay the start of _IELoadWait. Setting a timeout for _IELoadwait of 7 seconds can surely change what is in the body of the browser when you try to retrieve it... and the amount of time to display the content is shrted for an invisible window than a displayed one...

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

just tried it again and it seems like it's not working still!

_IELoadWait($oIE,0,7000)

- the page i'm viewing is static! it doesn't change while i'm waiting !

[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

Link to comment
Share on other sites

When I run this it takes me to gmail. Please describe what you are trying to do and why you are using ControlSend.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

well, i'm trying to click on that object:

</td>
<td align="center"><input type="submit" name="dl.start" value="Free"></td></tr>

since i didn't manage to use these:

$oIE = _IECreate("http://rapidshare.com/files/33739038/SpikkoPhoneSetup_DotNet-2.0.exe",0,1,1)
$oSubmit = _IEGetObjByName($oIE, "Free")
_IEAction ($oSubmit, "click")
oÝ÷ Ù©Ýj[(¶­jëh×6
$oIE = _IECreate("http://rapidshare.com/files/33739038/SpikkoPhoneSetup_DotNet-2.0.exe",0,1,1)
$oSubmit = _IEGetObjByName($oIE, "dl.start")
_IEAction ($oSubmit, "click")
oÝ÷ ٩ݶ­jëh×6
$oIE = _IECreate("http://rapidshare.com/files/33739038/SpikkoPhoneSetup_DotNet-2.0.exe",0,1,1)
$oSubmit = _IEGetObjByName($oIE, "Free")
_IEFormSubmit ($oSubmit)
oÝ÷ ٩ݶ­jëh×6
$oIE = _IECreate("http://rapidshare.com/files/33739038/SpikkoPhoneSetup_DotNet-2.0.exe",0,1,1)
$oSubmit = _IEGetObjByName($oIE, "dl.start")
_IEFormSubmit ($oSubmit)

--> so, do you have any idea on what should i do ?!

- or what's wrong with the control send in hidden mode ?!

[u]My Au3 Scripts:[/u]____________(E)Lephant, A Share download manager (RS/MU etc)Http1.1 Console, The Ez Way!Internet Reconnection Automation Suite & A Macro Recording Tool.SK's Alarm Clock, Playing '.MP3 & .Wav' Files._________________Is GOD a mistake of the Humanity Or the Humanity is a mistake of GOD ?!

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...