Jump to content

Text from a site


Recommended Posts

I can't for the life of me seem to figure out what the function is for having an invisible internet explorer page go to a certain url and retrieve the text and place it in a specific area of the program. I also need some help with having it refresh ever so many seconds. Any help on this or if someone could point me in the right direction or show me an example, it would be greatly appreciated.

Thank You!

Link to comment
Share on other sites

I can't for the life of me seem to figure out what the function is for having an invisible internet explorer page go to a certain url and retrieve the text and place it in a specific area of the program. I also need some help with having it refresh ever so many seconds. Any help on this or if someone could point me in the right direction or show me an example, it would be greatly appreciated.

Thank You!

Like Björn Kaiser I like the INet.au3 functions over the IE.au3 functions, but there are some things that are easier to do with IE.au3. So to answer your specific question the function is _IECreate("http://www....... ", 0, 0, 1). For an example use the search feature, its great! Or you can read the following topic I just updated for LukeJrs.

stopping a loop

Good luck, hope this helped.

Link to comment
Share on other sites

I can't for the life of me seem to figure out what the function is for having an invisible internet explorer page go to a certain url and retrieve the text and place it in a specific area of the program. I also need some help with having it refresh ever so many seconds. Any help on this or if someone could point me in the right direction or show me an example, it would be greatly appreciated.

Thank You!

Are you using the IE.au3 UDF? Look up _IECreate() in the help file, and check out the $f_visible parameter. Then go on to read up on _IEBodyReadText().

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Well, I haven't quite got it right. So far I just have this but it's not getting me what I need.

#include <IE.au3>
$oIE = _IECreate ("http://69.41.179.98:9980/online.js")
$sText = _IEBodyReadText ($oIE)
MsgBox(0, "Body Text", $sText)

this is the site:

http://69.41.179.98:9980/online.js

example:

document.write('128');

I would also like to know if it's possible to have it just read between the ' ', so basically just the 128 is shown.

Thank you!

Link to comment
Share on other sites

Well, I haven't quite got it right. So far I just have this but it's not getting me what I need.

#include <IE.au3>
$oIE = _IECreate ("http://69.41.179.98:9980/online.js")
$sText = _IEBodyReadText ($oIE)
MsgBox(0, "Body Text", $sText)

this is the site:

http://69.41.179.98:9980/online.js

example:

document.write('128');

I would also like to know if it's possible to have it just read between the ' ', so basically just the 128 is shown.

Thank you!

considering your first post i give you this:

#include <INet.au3>
$src = _INetGetSource('http://69.41.179.98:9980/online.js')
$trm = StringTrimLeft($src, 17)
$trm2 = StringTrimRight($trm, 4)
MsgBox(0, "Text", $trm2)
Exit

you can also use _StringBetween() but that works perfect too

Edited by Gif
Link to comment
Share on other sites

Well, I compiled the script and ran the exe but the message box popped up without a number. It does the same thing with picture files so I guess it did it to the url.

you are doing something wrong, i just compiled this:

#include <INet.au3>
$src = _INetGetSource('http://69.41.179.98:9980/online.js')
$trm = StringTrimLeft($src, 17)
$trm2 = StringTrimRight($trm, 4)
MsgBox(0, "Text", $trm2)
Exit

and it works

Edited by Gif
Link to comment
Share on other sites

I tried it, compiled that, I doubt I did anything different, I tried it a few times, I might be doing something wrong but is there anything different you're doing?

I opened up SciTe and pasted what you wrote and saved it and compiled it.

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