I want to make a custom Function that allows you to clear a Variable.
But I want to be sure that the Parameter in the Function is a Variable.
Is it possible?
Is it possible to check a Value if it's a Variable?
-
- Posts: 28
- Joined: 15 Sep 2020, 03:51
- Location: Germany
- Contact:
Re: Is it possible to check a Value if it's a Variable?
Code: Select all
#Requires AutoHotkey v2.0
varName := 'x'
x := 4
MsgBox x
clear(varName)
MsgBox x
clear(varName) {
Global
%varName% := ''
}
Re: Is it possible to check a Value if it's a Variable?
GamesOfFreak wrote: ↑25 May 2023, 15:19But I want to be sure that the Parameter in the Function is a Variable.
Code: Select all
if !IsSet(%varName%) {
MsgBox varName " is not set."
return
}