Sign in to follow this  
Followers 0
jacobspierce

AutoIt html text finder

1 post in this topic

complete noob to AutoIt so sorry in advance

well basically i heard of this program from a friend, and i worked out that i could use it for when im writing out html and what not

i didn't realize that it would be this difficult. Ive tried many different things, and ive included my latest try. found this off AutoIt wiki. The plan was to ctrl+F for which ever terms i needed to find in the document and have the script automatically go to the color of the found term and right click, to copy links or what have you.

0xFF9632 is the highlight color of Google Chrome's find function

it only left clicked, i dont know how to change that either

i guess my question is: Is there anyway to make AutoIt find every term in webpage, and then click on all of them?

by which i mean using a text finder or something?

Dim $ClickMouse, $MousePrimary, $MouseSecondary, $ExitKey
Dim $Color, $Left, $Top, $Right, $Bottom, $SearchResult, $CheckSwap
$CheckSwap = RegRead("HKEY_CURRENT_USER\Control Panel\Mouse", "SwapMouseButtons")
If $CheckSwap = 1 Then
$MousePrimary = "right"
$MouseSecondary = "left"
Else
$MousePrimary = "left"
$MouseSecondary = "right"
EndIf
; ************************************************* ;
; Change your settings here                      ;
; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ;
$ExitKey = "{ESC}"
$Color = 0xFF9632
$Left = 0
$Top = 0
$Right = 0
$Bottom = 0
$ClickMouse = $MousePrimary
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ;
; Change your settings here                      ;
; ************************************************* ;
HotKeySet($ExitKey, '_Exit')
While 1
$SearchResult = PixelSearch($Left, $Top, $Right, $Bottom, $Color)
If Not @error Then
  MouseClick($ClickMouse, $SearchResult[0], $SearchResult[1], 1, 0)
EndIf
WEnd
Func _Exit()
Exit
EndFunc

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