Sign in to follow this  
Followers 0
ConsultingJoe

Get IE results?

14 posts in this topic

I know there are many ways to get the source but I need to know if it is possible to set the results of a site to a variable.

the page I want to use this on is:

http://zerocool60544.t35.com/files/gmailcount.html

There are pop-ups and a logo

I just want the number set to a variable

Thanks A Lot


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites



I know there are many ways to get the source but I need to know if it is possible to set the results of a site to a variable.

the page I want to use this on is:

http://zerocool60544.t35.com/files/gmailcount.html

There are pop-ups and a logo

I just want the number set to a variable

Thanks A Lot

I am a bit unclear what you are asking. Are you saying you want that number in the top left hand corner of the pop-up?

Share this post


Link to post
Share on other sites

I know there are many ways to get the source but I need to know if it is possible to set the results of a site to a variable.

the page I want to use this on is:

http://zerocool60544.t35.com/files/gmailcount.html

There are pop-ups and a logo

I just want the number set to a variable

Thanks A Lot

The number is enclosed in a SPAN element with an ID of 'quota'

#include <IE.au3>
$oIE = _IEAttach("GMAIL COUNTER")
$myNumber = $oIE.document.getElementByID("quota").innerText

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

The number is enclosed in a SPAN element with an ID of 'quota'

#include <IE.au3>
$oIE = _IEAttach("GMAIL COUNTER")
$myNumber = $oIE.document.getElementByID("quota").innerText

Dale

I get an error variable must be of type object

and am I going to need a _waitload() func

would it be something like this:

#include "IE.au3"
$oIE = _IECreate(0)
_IENavigate($oIE, "http://zerocool60544.t35.com/files/gmailcount.html")
$oIE = _IEAttach("GMAIL COUNTER")
$myNumber = $oIE.document.getElementByID("quota").innerText
MsgBox(0,"",$myNumber)
Edited by zerocool60544

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

I get an error variable must be of type object

and am I going to need a _waitload() func

would it be something like this:

#include "IE.au3"
$oIE = _IECreate(0)
_IENavigate($oIE, "http://zerocool60544.t35.com/files/gmailcount.html")
$oIE = _IEAttach("GMAIL COUNTER")
$myNumber = $oIE.document.getElementByID("quota").innerText
MsgBox(0,"",$myNumber)
If you create the IE window (and object), you don't need to use _IEAttach. What you need to do instead is _IELoadWait ($oIE).

#include "IE.au3"
$oIE = _IECreate(0)
_IENavigate($oIE, "http://zerocool60544.t35.com/files/gmailcount.html")
_IELoadWait ($oIE)
$myNumber = $oIE.document.getElementByID("quota").innerText
MsgBox(0,"",$myNumber)

Share this post


Link to post
Share on other sites

If you create the IE window (and object), you don't need to use _IEAttach. What you need to do instead is _IELoadWait ($oIE).

#include "IE.au3"
$oIE = _IECreate(0)
_IENavigate($oIE, "http://zerocool60544.t35.com/files/gmailcount.html")
_IELoadWait ($oIE)
$myNumber = $oIE.document.getElementByID("quota").innerText
MsgBox(0,"",$myNumber)
@greenmachine

Thanks for jumping in. I did my initial example in a hurry and didn't indicate that it presumed the browser window to the site had already been created (it attached based on the window title). Your code using _IECreate is correct, but I have some comments. First, _IENavigate calls _IELoadWait for you so there is no need to call it again (although it hurts nothing). Second, if you use _IECreate(0) it will create an invisible instance of IE -- this is OK, but be certain that you also add an _IEQuit($oIE) when you are done or you will have a Zombie IE process left running on the system.

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

Share this post


Link to post
Share on other sites

Thanks a lot guys thats exactly what I needed

~zerocool60544


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

@greenmachine

Thanks for jumping in. I did my initial example in a hurry and didn't indicate that it presumed the browser window to the site had already been created (it attached based on the window title). Your code using _IECreate is correct, but I have some comments. First, _IENavigate calls _IELoadWait for you so there is no need to call it again (although it hurts nothing). Second, if you use _IECreate(0) it will create an invisible instance of IE -- this is OK, but be certain that you also add an _IEQuit($oIE) when you are done or you will have a Zombie IE process left running on the system.

Dale

Of course, I forgot about _IENavigate automatically calling _IELoadWait.

I was just editing the scriptlet he had posted, and so I really wasn't thinking about making everything correct (hence the forgotten _IEQuit($oIE) as well) - I just wanted to point out that _IEAttach wasn't necessary.

Share this post


Link to post
Share on other sites

hey guys it worked once now I got an error on IE.au3 at line 1236 with the error requested object failed

. . .document.readyState. . .

. . .document^ ERROR

what do I do???


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

hey guys it worked once now I got an error on IE.au3 at line 1236 with the error requested object failed

. . .document.readyState. . .

. . .document^ ERROR

what do I do???

First thing to look at -- Strange things can happen if you have a zombie IE process. Exit all IE windows and then kill any IEXPLORE.EXE processes. Then try again -- make sure you heed my _IEQuit warning above.

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

Share this post


Link to post
Share on other sites

First thing to look at -- Strange things can happen if you have a zombie IE process. Exit all IE windows and then kill any IEXPLORE.EXE processes. Then try again -- make sure you heed my _IEQuit warning above.

Dale

yeah I added that in and there are not IE process running, It did work again once then did the same thing. Could it be because I'm on Dial-up

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

yeah I added that in and there are not IE process running, It did work again once then did the same thing. Could it be because I'm on Dial-up

post your code please.

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

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

post your code please.

Dale

It's just like you said, I ran it again and it worked, even two instances but after they finish it puts out the error

#include "IE.au3"
$oIE = _IECreate(0)
_IENavigate($oIE, "http://zerocool60544.t35.com/files/gmailcount.html")
_IELoadWait ($oIE)
$myNumber = $oIE.document.getElementByID("quota").innerText
MsgBox(0,"",$myNumber)
_IEQuit($oIE)

I got it, I put this in and it works just fine, It works too fast

#include "IE.au3"
$oIE = _IECreate(0)
Sleep(1000)
_IENavigate($oIE, "http://zerocool60544.t35.com/files/gmailcount.html")
sleep(1000)
_IELoadWait ($oIE)
$myNumber = $oIE.document.getElementByID("quota").innerText
MsgBox(0,"",$myNumber)
_IEQuit($oIE)
Edited by zerocool60544

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

It's just like you said, I ran it again and it worked, even two instances but after they finish it puts out the error

#include "IE.au3"
$oIE = _IECreate(0)
_IENavigate($oIE, "http://zerocool60544.t35.com/files/gmailcount.html")
_IELoadWait ($oIE)
$myNumber = $oIE.document.getElementByID("quota").innerText
MsgBox(0,"",$myNumber)
_IEQuit($oIE)

I got it, I put this in and it works just fine, It works too fast

#include "IE.au3"
$oIE = _IECreate(0)
Sleep(1000)
_IENavigate($oIE, "http://zerocool60544.t35.com/files/gmailcount.html")
sleep(1000)
_IELoadWait ($oIE)
$myNumber = $oIE.document.getElementByID("quota").innerText
MsgBox(0,"",$myNumber)
_IEQuit($oIE)
Interresting... please check this post and help with testing.

Odd that something that was nearly impossible to reproduce just a short time ago is suddenly cropping up so often...

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0