Need Help with adding values to a function

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
cleetz
Posts: 30
Joined: 04 Feb 2023, 15:09

Need Help with adding values to a function

Post by cleetz » 07 Jan 2024, 03:16

Hello. Ive never set values to a function before and I'm looking for advice on how I would do the following :

Store a value at the start of my script, then when I find an image with imagesearch, it calls that value and does that sequence of events. I need this in my script so I can do a section of code everytime I find certain images, without going through my script and posting the entire code in every single part, which would make my script insanely long. Thanks alot

Rohwedder
Posts: 7774
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Need Help with adding values to a function

Post by Rohwedder » 07 Jan 2024, 03:58

Well,
pause your game and study this manual chapter!: https://www.autohotkey.com/docs/v1/Functions.htm#intro

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

Re: Need Help with adding values to a function

Post by mikeyww » 07 Jan 2024, 06:57

More ideas here:

1. ImageSearch example

2. Gosub:
Jumps to the specified label and continues execution until Return is encountered.

Post Reply

Return to “Ask for Help (v1)”