ConsultingJoe Posted March 8, 2006 Share Posted March 8, 2006 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.htmlThere are pop-ups and a logoI just want the number set to a variableThanks 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] Link to comment Share on other sites More sharing options...
litlmike Posted March 8, 2006 Share Posted March 8, 2006 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.htmlThere are pop-ups and a logoI just want the number set to a variableThanks A LotI 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? _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
DaleHohm Posted March 8, 2006 Share Posted March 8, 2006 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 LotThe 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 Link to comment Share on other sites More sharing options...
ConsultingJoe Posted March 8, 2006 Author Share Posted March 8, 2006 (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 DaleI 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 March 8, 2006 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] Link to comment Share on other sites More sharing options...
greenmachine Posted March 8, 2006 Share Posted March 8, 2006 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) Link to comment Share on other sites More sharing options...
DaleHohm Posted March 8, 2006 Share Posted March 8, 2006 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 Link to comment Share on other sites More sharing options...
ConsultingJoe Posted March 9, 2006 Author Share Posted March 9, 2006 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] Link to comment Share on other sites More sharing options...
greenmachine Posted March 9, 2006 Share Posted March 9, 2006 @greenmachineThanks 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.DaleOf 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. Link to comment Share on other sites More sharing options...
ConsultingJoe Posted March 9, 2006 Author Share Posted March 9, 2006 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] Link to comment Share on other sites More sharing options...
DaleHohm Posted March 9, 2006 Share Posted March 9, 2006 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^ ERRORwhat 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 Link to comment Share on other sites More sharing options...
ConsultingJoe Posted March 9, 2006 Author Share Posted March 9, 2006 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.Daleyeah 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] Link to comment Share on other sites More sharing options...
DaleHohm Posted March 9, 2006 Share Posted March 9, 2006 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-uppost 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 Link to comment Share on other sites More sharing options...
ConsultingJoe Posted March 9, 2006 Author Share Posted March 9, 2006 (edited) post your code please. DaleIt'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 March 9, 2006 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] Link to comment Share on other sites More sharing options...
DaleHohm Posted March 9, 2006 Share Posted March 9, 2006 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 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