46 posts in this topic
I have a script , during compilation and test execution, it worked perfectly but sometimes I am getting error as "Variable used without being declared."
I understood somewhere in the branching logic this is happening.
But not able to find it exactly.
As I am using multiple include statements.the line number is also not giving accurately.
Can anyone suggest what is the approach to resolve this?
WinSetState ("[CLASS:OpusApp]", "", @SW_SHOWMAXIMIZED) and WinSetState ("[CLASS:OpusApp]", "", @SW_MAXIMIZE) don't maximize the window. Using WinSetState("[CLASS:OpusApp]","",@SW_RESTORE) allows me to maximize it about 15% of the time. I've tried using WinMove("[active]",0,0,@Desktopwidth,@Desktopheight), but that only makes it worse. I've also tried putting in a sleep and maximizing it again. Does anyone have a solution?
Here's my code:
The startup script is intentionally commented, because I'm not testing it right now. The other comment is just for debugging when I need it.
UPDATE: When I run two instances of the program, it works almost all the time, but if I copy the code inside the else statement twice it doesn't work at all (despite the fact that it's running the same code just in one program vs two). I also noticed that when I run two instances of it, about 50% of the time when it opens both the windows, it also hits the windows button and types the letter d into the search box. Neither of these actions are in my code. I'm not really sure what's going on.
_ArrayDisplay($aArray, "Window Title", "1:", 0, Default, "Column") ; Expected results are rows 1 to the end of the array, all columns. The result is rows 0-1, all columns. The API reference is here:
Am I doing something wrong?
Is this possible:
Executing a function from an include, but taking the function name from a gui input and then executing that function using the include:
#include <Something.au3> ;input reads "Tree" $functionName = GuiCtrlRead($input1) $functionName(1) And the include is gonna have
Func Tree($x) If $x = 1 Then $this = "text" MsgBox(0,$this,"whatever") EndFunc is it possible?
Sorry for such an innocent question .....
It is possible to delete all Au3Check error messages with a hot key when they appear with F5 and you can continue editing the code without seeing the red lines. For now my only solution is to reload the script but it is a bit annoying.
Thank's to all