notice when text on site appears then open program

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Sam77899
Posts: 8
Joined: 01 Oct 2021, 12:35

notice when text on site appears then open program

Post by Sam77899 » 24 Oct 2021, 17:23

hi im new to this and have been browsing this forum trying to figure out how to do this and i just cant
i would like to make a script that checks a website that i either have open or just a site in general, then when certain words or sentence appears on the site
have it open a specific program on my computer, not even sure how to write this or how it would start tbh any help is appreciaed

User avatar
mikeyww
Posts: 27042
Joined: 09 Sep 2014, 18:38

Re: notice when text on site appears then open program

Post by mikeyww » 24 Oct 2021, 17:51

Code: Select all

#Persistent
url  = https://www.autohotkey.com/boards/viewtopic.php?f=76&t=95970
text = notice when text on site appears then open program
SetTimer, Download, 30000
Download:
SoundBeep, 1500
WinHttp := ComObjCreate("WinHttp.WinHttpRequest.5.1"), WinHttp.Open("GET", url, False), WinHttp.Send()
If !Instr(WinHttp.ResponseText, text)
 Return
SetTimer, Download, Off
MsgBox, 64, Text was found, %text%
Run, notepad
ExitApp
Be careful, because your IP address could get banned if you flood a Web site.

Sam77899
Posts: 8
Joined: 01 Oct 2021, 12:35

Re: notice when text on site appears then open program

Post by Sam77899 » 24 Oct 2021, 17:56

so does that code download the page because i just want it to look on the website and whenever certain words or text appears on the site then open a specific program on my computer, like is their a way todo it without downloading thanks

Sam77899
Posts: 8
Joined: 01 Oct 2021, 12:35

Re: notice when text on site appears then open program

Post by Sam77899 » 24 Oct 2021, 18:12

is there a way to make it so like say i open a site instead of it constantly flooding the site to check can it like just open the site once and make it wait till the new specified text appears then after that open another program
help is very much appreciated

User avatar
mikeyww
Posts: 27042
Joined: 09 Sep 2014, 18:38

Re: notice when text on site appears then open program

Post by mikeyww » 24 Oct 2021, 18:29

You may need another technique for that. I do not use the Chrome.ahk library, but others have found it useful for many browser manipulations (on this forum). Others may be able to comment here with additional solutions for you. You may want to search the forum, too, as there could be some JavaScript or HTML techniques for what you need.

Post Reply

Return to “Ask for Help (v1)”