If/then statements?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JimmyDee
Posts: 2
Joined: 28 May 2022, 01:41

If/then statements?

Post by JimmyDee » 28 May 2022, 01:50

I have an ahk that does a repetitive task on a webpage.

I want to make it detect if a specific button is available in the page before it starts performing the task, otherwise it has to just close the tab.

How can I do that?

AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: If/then statements?

Post by AHKStudent » 28 May 2022, 02:00

JimmyDee wrote:
28 May 2022, 01:50
I have an ahk that does a repetitive task on a webpage.

I want to make it detect if a specific button is available in the page before it starts performing the task, otherwise it has to just close the tab.

How can I do that?
how are you loading the webpage? comobj ie? win http? just running regular chrome?

JimmyDee
Posts: 2
Joined: 28 May 2022, 01:41

Re: If/then statements?

Post by JimmyDee » 28 May 2022, 13:23

AHKStudent wrote:
28 May 2022, 02:00
JimmyDee wrote:
28 May 2022, 01:50
I have an ahk that does a repetitive task on a webpage.

I want to make it detect if a specific button is available in the page before it starts performing the task, otherwise it has to just close the tab.

How can I do that?
how are you loading the webpage? comobj ie? win http? just running regular chrome?
I just start chrome, open up 100-200 tabs and let the script run. I just can't use the pc while the script runs but for now I am okay with that.

AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: If/then statements?

Post by AHKStudent » 28 May 2022, 16:34

JimmyDee wrote:
28 May 2022, 13:23
AHKStudent wrote:
28 May 2022, 02:00
JimmyDee wrote:
28 May 2022, 01:50
I have an ahk that does a repetitive task on a webpage.

I want to make it detect if a specific button is available in the page before it starts performing the task, otherwise it has to just close the tab.

How can I do that?
how are you loading the webpage? comobj ie? win http? just running regular chrome?
I just start chrome, open up 100-200 tabs and let the script run. I just can't use the pc while the script runs but for now I am okay with that.
in that case I would use imagesearch for the button https://www.autohotkey.com/docs/commands/ImageSearch.htm

gregster
Posts: 8989
Joined: 30 Sep 2013, 06:48

Re: If/then statements?

Post by gregster » 28 May 2022, 18:21

JimmyDee wrote:
28 May 2022, 13:23
I just start chrome, open up 100-200 tabs and let the script run.
That's a lot of tabs. What is this for?

Post Reply

Return to “Ask for Help (v1)”