Can A Script Do Something Depending On Whether it Finds Something?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Hampoon
Posts: 25
Joined: 19 Oct 2018, 22:04

Can A Script Do Something Depending On Whether it Finds Something?

20 Dec 2018, 12:45

Hey there, I'm pretty new to this language. I was wondering if I could make a script do something like ctrl+f on a webpage and then if it does find something do something, and then if it doesn't do something else. Is this possible? Thanks!
I'm pretty new to this language and barely know what I'm doing. Please excuse any stupidity lol.
Oh also try and explain stuff well if I need it :P
RickC
Posts: 299
Joined: 27 Oct 2013, 08:32

Re: Can A Script Do Something Depending On Whether it Finds Something?

20 Dec 2018, 13:34

Look in the Commands documentation (https://autohotkey.com/docs/commands/index.htm) for both If and Else for explanations and examples of program flow.
Hampoon
Posts: 25
Joined: 19 Oct 2018, 22:04

Re: Can A Script Do Something Depending On Whether it Finds Something?

20 Dec 2018, 14:25

RickC wrote:
20 Dec 2018, 13:34
Look in the Commands documentation (https://autohotkey.com/docs/commands/index.htm) for both If and Else for explanations and examples of program flow.
Reasons this doesn't help me:
1. I am trying to find text, not a color.
2. I have barely any idea how anything works and most of the tutorial makes no sense whatsoever to me because I'm new.
I'm pretty new to this language and barely know what I'm doing. Please excuse any stupidity lol.
Oh also try and explain stuff well if I need it :P
oif2003
Posts: 214
Joined: 17 Oct 2018, 11:43
Contact:

Re: Can A Script Do Something Depending On Whether it Finds Something?

20 Dec 2018, 14:44

Hi,
Being new is more the reason to check out the tutorials! Here's the official one: https://www.autohotkey.com/docs/Tutorial.htm
Good luck!
ManaUser
Posts: 4
Joined: 25 Nov 2018, 23:53

Re: Can A Script Do Something Depending On Whether it Finds Something?

20 Dec 2018, 17:01

Short answer: Yes scripts can certainly do that.

Long answer: It depends on a whole bunch of things, so this is kinda hard to answer. Web browsers in particular are not the most friendly things to extract text from, for instance. Simple programs like notepad are much easier. On the other hand, looking at the title of any window is easy. There's just a bunch of factors to consider. Chances are what you want to do is possible. But depending on the details it could be anything from "one line of code" easy to "is this really worth the effort?" hard. You'll probably get more helpful answers if you ask a more specific question about a certain thing you're trying to accomplish.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Aqualest, Darkmaster006 and 313 guests