Search for string on webpage, click if non-existent

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: 213
Joined: 25 Aug 2017, 08:48

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

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..
If the Code Worked click on the Arrow so all know it, its worked !!

Return to “Gaming”

Who is online

Users browsing this forum: burnskull and 9 guests