Search for string on webpage, click if non-existent Topic is solved

Ask gaming related questions
suomy

Search for string on webpage, click if non-existent

23 Nov 2017, 17:06

I'm trying to write a script will search for a specific string on a webpage, and if the string is not found, the mouse left clicks once, repeated until the string is found. So far, I've tried to use WinGetText and search within its output, but I can't seem to be able to get the function to retrieve the contents of the page. Another solution I've seen on the forums is to have a script select all and copy the webpage, then search for the string within the clipboard, but I can't get that to work either.

The purpose of the script is an automatic reroller for an online text based RPG called Sryth, in which you can click a reroll button until you get the character stats you want. The specific string I'm searching for is either 'Avg. Stat: 20' or 'Avg. Stat: 19'.

Any help would be appreciated, will try to give more information if needed.
User avatar
Reloaded
Posts: 267
Joined: 25 Aug 2017, 08:48

Re: Search for string on webpage, click if non-existent  Topic is solved

24 Nov 2017, 14:35

suomy wrote:I'm trying to write a script will search for a specific string on a webpage, and if the string is not found, the mouse left clicks once, repeated until the string is found. So far, I've tried to use WinGetText and search within its output, but I can't seem to be able to get the function to retrieve the contents of the page. Another solution I've seen on the forums is to have a script select all and copy the webpage, then search for the string within the clipboard, but I can't get that to work either.

The purpose of the script is an automatic reroller for an online text based RPG called Sryth, in which you can click a reroll button until you get the character stats you want. The specific string I'm searching for is either 'Avg. Stat: 20' or 'Avg. Stat: 19'.

Any help would be appreciated, will try to give more information if needed.
I think AHK is the wrong Language for this, try

* Python
* C++
* C#
* Java Script

Or, or, or..

Return to “Gaming”

Who is online

Users browsing this forum: chrisb, Evil-e, Gonzalo94 and 9 guests