Sign in to follow this  
Followers 0
Falc0

Question about text on a page

6 posts in this topic

#1 ·  Posted (edited)

Hey I looked through the help file and I didn't turn up any results for this.

But at this site(the one I made my autoposter for) it sometimes says Topic/Post cannot be found and you have to refresh I was wondering if the AutoPoster could detect that text on the screen and automatically refresh untill the page is at the right one.

lol sorry for asking so many questions but I am a curious fellow :D

Edited by Falc0

RK-DemonSpawned

Share this post


Link to post
Share on other sites



I was wondering if the AutoPoster could detect that text on the screen and automatically refresh untill the page is at the right one.

See the UrlDownloadToFile() function in the helpfile. It will allow you to download the web page HTML source to a file. From there, parse the page to see if the text you are looking for exists. If it does, you can refresh the page.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

Alright. I thank you once again Pekster :D


RK-DemonSpawned

Share this post


Link to post
Share on other sites

It occurs to me that this may fail. The reason I see is that you may be asked to refresh this page when you sent the text to the browser's input box, but downloading the HTML source with UrlDownloadToFile() may get the page again, preventing you from being aware of this.

As a way around this, you can open the "View Source" window with keystrokes. I don't know how you would do it in IE (since I hate that browser and refuse to use it) but in Firefox you would press Ctrl-u to open the box, Ctrl-a to select it all, Ctrl-c to copy it, and Alt-F4 to close it. You can then parse the clipboard to see the HTML that the web browser used to deliver it to your screen.

Note: In my testing with Firefox, the "View Source" with Ctrl-u may lag a bit when opening. However, you should be able to send the select all, copy, and close to the window before it is done showing all the text. Once it does apear, it will just execute the proper commands.


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

It occurs to me that this may fail.  The reason I see is that you may be asked to refresh this page when you sent the text to the browser's input box, but downloading the HTML source with UrlDownloadToFile() may get the page again, preventing you from being aware of this.

As a way around this, you can open the "View Source" window with keystrokes.  I don't know how you would do it in IE (since I hate that browser and refuse to use it) but in Firefox you would press Ctrl-u to open the box, Ctrl-a to select it all, Ctrl-c to copy it, and Alt-F4 to close it.  You can then parse the clipboard to see the HTML that the web browser used to deliver it to your screen.

Note: In my testing with Firefox, the "View Source" with Ctrl-u may lag a bit when opening.  However, you should be able to send the select all, copy, and close to the window before it is done showing all the text.  Once it does apear, it will just execute the proper commands.

Not as fancy but can't you just copy the screen to the clipboard and look for your text that way?

Rick


Only $2.00 with Resale Rights How to Block Better for Martial Artists and NonMartial Artistshttp://kirkhamsebooks.com/MartialArts/Bloc...tterEbook_m.htm

Share this post


Link to post
Share on other sites

...can't you just copy the screen to the clipboard and look for your text that way?

I suppose so :D . I have to use the source myslf since I often require specific information between HTML tags, which I couldn't detect with the display text. Sounds like this will work great for you. You'll probably have to figure out the control for the main window with the AutoIt Spy so that you send the select and copy keys to the right one.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

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