46 posts in this topic
Hello, just stumbled across this behaviour while I was working on my project.
I am getting a "<function> called with wrong number of args" on a GUICtrlSetOnEvent line, the <function> as far as I can see accepts only 1 optional argument so it would just work fine with a GUICtrlSetOnEvent callback. The error surfaced when I add code which called the <function> with a single argument... it was working without any errors before that.
Here is the actual code (you can download the repository as zip and run it out of the box to get the error), the <function> is GUI_BridgeHandler and this is my SciTE Output:
>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "E:\Projects\AutoIt\ProxAllium\ProxAllium.au3" /UserParams +>18:53:37 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.188.8.131.52 Keyboard:00000409 OS:WIN_81/ CPU:X64 OS:X64 Environment(Language:0809) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\TheDcoder\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\TheDcoder\AppData\Local\AutoIt v3\SciTE >Running AU3Check (184.108.40.206) from:C:\Program Files (x86)\AutoIt3 input:E:\Projects\AutoIt\ProxAllium\ProxAllium.au3 "E:\Projects\AutoIt\ProxAllium\ProxAllium.au3"(127,43) : error: GUI_BridgeHandler() called with wrong number of args. GUICtrlSetOnEvent(-1, "GUI_BridgeHandler") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "E:\Projects\AutoIt\ProxAllium\ProxAllium.au3"(103,42) : REF: definition of GUI_BridgeHandler(). GUI_BridgeHandler($g_idTrayOptionBridges) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ E:\Projects\AutoIt\ProxAllium\ProxAllium.au3 - 1 error(s), 0 warning(s) !>18:53:37 AU3Check ended. Press F4 to jump to next error.rc:2 +>18:53:38 AutoIt3Wrapper Finished. >Exit code: 2 Time: 1.273 Needless to say it works fine when I run it directly without Au3Check
Thanks for the responses in advance!
P.S Sorry for the thread's title, couldn't think of anything else.
Hello, i'm trying to rename a variable to another variable name (not the value attached to the variable). This would save me TONS of coding.
Here is an example:
Local $clear1="$SATJ" ;sets the $clear1 variable to become $SATJ
GUICtrlSetState($clear1 & "3", $GUI_UNCHECKED) ;i want this to come out to be $SATJ3, it should look something like - GUICtrlSetState($SATJ3, $GUI_UNCHECKED)
I've already tried
any help is greatly appreciated!!!
Howdy, this is my first post, massive fan of autoit.
I've searched and tried and I would just like people who are better at this than me to let me know if this is even a thing.
I'd like to perform just a variable. For example, it would be. *see inserted code*
So what i'm wanting is, create the constant $test, and that variable would be what is followed after the = . Then perform the _FileCreate. Then perform the variable. Logically or in my head rather.. That variable is declared and is equal to what it is set to above, therefore just placing the variable plainly in the script, it should be equal to what it was declared as. So what am I doing wrong, and or how can I have autoit just perform the variable.
#include <File.au3> Const $test = FileWriteLine(@DesktopDir & "\Log.txt", @CRLF ) _FileCreate(@DesktopDir & "\Log.txt") $test
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.