Closed marius-sucan closed 1 year ago
Just use built-in search tool's regex function.
Just use built-in search tool's regex function.
That is not how this works.
Search for variableName and put () at the end.
Search for variableName and put () at the end.
Uuuuuu, I am shocked. Sarcasm. Ya must be a l33t pro! uuuu... nais.
What if we have many functions and many variables, we do it one by one, right? what if we have variables that are not defined as varName := value , but in other ways ? what if the var is designating an object ? what if a variable name is a part of a larger/longer variable name?
The code I am working on has around 2000 functions and I do not know how many variables.
@CoffeeChaton is definitely going to understand why I requested this feature.
It doesn't make sense. I still recommend using it with the regex feature of the integrated search system, because this extension doesn't do anything different. And you want this nice coder to do your legwork for you. That's a very selfish and uncommon request.
I don't understand why you even post here... do you even use this extension? Any extension is meant to help users do repetitive tasks. For example , this extension allows users to easily identify unused declared variables. Now, what you are saying, is that people like me are selfish, because we want to a tool to easily identify these. You could select each variable name and check if it's used, using the search tool. Why have an extension that does the legwork for me? By your logic, the work done by this awesome guy is somehow pointless.
You are outlandish. I'll no longer reply to your messages.
Best regards, Marius.
Let me explain why I provide this diagnostic function, because when i want to use Higher-order function in ahk-v1, i always forget to need use func("funcName")
to set functionObject.
js
function fnName(){
return "A"
}
let fn = fnName; //
let fnResult = fn(); // call fn && fnResult === "A"
console.log(fnResult); // look like call MsgBox % "A"
ahk v2
fnName() {
return "A"
}
fn := fnName
fnResult := fn() ; // call func && fnResult === "A";
MsgBox(fnResult)
ahk v1
fnName() {
return "A"
}
fn := func("fnName") ; fn is funcObject
; ^ I always forget to use the `func()`
fnResult := fn() ; call function && fnResult === "A";
MsgBox % fnResult
I love ahk v2 and js, but when I switch back to ahk v1 from those languages, I always forget that I need to use func("fnName")
.
I've forgotten what running without func()
wrapping fn-name
would do, but I once wasted a weekend just trying to find a bug in 1500 lines of code
I always stumble on some common mistakes, such as the classic:
ahk v1
i := 5
loop, i {
; ^ forget to use `% i` or `%i%`
; === Loop 0
; ahk v2 fix this
MsgBox % A_Index
}
settings.json
{
"AhkNekoHelp.Diag.code511": 10, // default 0 max 999
"AhkNekoHelp.Diag.code512": 10, // default 0 max 999
"AhkNekoHelp.Diag.code513": 10, // default 0 max 999
}
diag msg look like:
var/param "fnA" is the same func-name "fnA()"
global-val "fnA" is the same func-name "fnA()"
label "fnA:" is the same func-name "fnA()"
exp code
any idea of exp code? or Better diag msg/ settings ?
I love ahk v2 and js, but when I switch back to ahk v1 from those languages, I always forget that I need to use
func("fnName")
. I've forgotten what running withoutfunc()
wrappingfn-name
would do, but I once wasted a weekend just trying to find a bug in 1500 lines of codeI always stumble on some common mistakes, such as the classic:
ahk v1
i := 5 loop, i { ; ^ forget to use `% i` or `%i%` ; === Loop 0 ; ahk v2 fix this MsgBox % A_Index }
You should ignore such cases. People don't use proper syntax. At least that's what I would do.
settings.json
{ "AhkNekoHelp.Diag.code511": 10, // default 0 max 999 "AhkNekoHelp.Diag.code512": 10, // default 0 max 999 "AhkNekoHelp.Diag.code513": 10, // default 0 max 999 }
diag msg look like:
var/param "fnA" is the same func-name "fnA()"
global-val "fnA" is the same func-name "fnA()"
label "fnA:" is the same func-name "fnA()"
exp code
any idea of exp code? or Better diag msg/ settings ?
I think it's perfect. Thank you for the work you are doing !
I don't have any better ideas...
Best regards, Marius.
Sorry @marius-sucan, I completely misunderstood the subject. Later, when I saw the examples, I understood better. I didn't even know that we can assign a function to a variable in AutoHotkey. I apologize for creating pollution on this subject.
You should ignore such cases. People don't use proper syntax. At least that's what I would do.
I just want to say that I often make mistakes in some classic problems, so I hope the IDE can provide the diagnosis immediately when I write the code to save the debug time.
Hello!
I would like to be able to detect if I have a variable name that is also a function. Is it possible? This would be very helpful for me.
Thank you .