Can A Script Do Something Depending On Whether it Finds Something?
Can A Script Do Something Depending On Whether it Finds Something?
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
Oh also try and explain stuff well if I need it
Re: Can A Script Do Something Depending On Whether it Finds Something?
Look in the Commands documentation (https://autohotkey.com/docs/commands/index.htm) for both If and Else for explanations and examples of program flow.
Re: Can A Script Do Something Depending On Whether it Finds Something?
Reasons this doesn't help me:RickC wrote: ↑20 Dec 2018, 13:34Look in the Commands documentation (https://autohotkey.com/docs/commands/index.htm) for both If and Else for explanations and examples of program flow.
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
Oh also try and explain stuff well if I need it
Re: Can A Script Do Something Depending On Whether it Finds Something?
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!
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!
Re: Can A Script Do Something Depending On Whether it Finds Something?
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.
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.
Who is online
Users browsing this forum: Aqualest, Darkmaster006 and 313 guests