Help with two symbols in this toggle func

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Asserio
Posts: 2
Joined: 15 Dec 2017, 15:55

Help with two symbols in this toggle func

15 Dec 2017, 16:03

Hello community. So first things first I am new at autohotkey, I am reading documentation to know a thing or another etc... and to help me out on building my scripts. Now I do like to see how a guy that know what he's doing codes, then I try to learn from it so I can apply it on my scripts later on with no help. Now this part of a code is a source that I found of a script, and there are two things that I do not know what it means in that func. One is what does the sign " ? " means there and the other one is the " : ".
Here is the code

Code: Select all

*Numpad1::(AutoFire = 0 ? (AutoFire := 1,ToolTip("AutoFire ON")) : (AutoFire := 0,ToolTip("AutoFire OFF")))
I do understand that if AutoFire its at 0 and I press Numpad1, AutoFire will be 1 and if I press again 0. But I would like to understand the purpose of those symbols there.
Hope I can get some help, thanks for your time!
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Help with two simbols in this toggle func

15 Dec 2017, 17:07

Welcome to the wonderful world of AHK scripting! :thumbup:
The best source, bc at your service 24/7, is AHK's manual which tells us :arrow: [this] regarding your question ...
Asserio
Posts: 2
Joined: 15 Dec 2017, 15:55

Re: Help with two simbols in this toggle func

15 Dec 2017, 18:58

BoBo wrote:Welcome to the wonderful world of AHK scripting! :thumbup:
The best source, bc at your service 24/7, is AHK's manual which tells us :arrow: [this] regarding your question ...
Thanks!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 252 guests