Jump to content

Incorrect number of parameters in function call on declaration line

Recommended Posts

#include <MsgBoxConstants.au3>
#include "AssocArrays.au3"

While 1
    Global $avToggled
    AssocArrayCreate($avToggled, 5)
    $hWnd = WinActive("[CLASS:Chrome_WidgetWin_1]")
    If $hWnd Then
        Local $aMousePos = MouseGetPos()
        Local $aBoundPos[4]
        $aBoundPos[0] = WinGetPos($hWnd)[1]
        $aBoundPos[1] = $aBoundPos[0] + (WinGetPos($hWnd)[3] - ControlGetPos($hWnd, "", "Chrome_RenderWidgetHostHWND1")[3])
        $aBoundPos[2] = WinGetPos($hWnd)[0]
        $aBoundPos[3] = $aBoundPos[2] + WinGetPos($hWnd)[2]
        If (Not AssocArrayExists($avToggled, $hWnd)) Then
            AssocArrayAssign($avToggled, $hWnd, 0) ;Assumes bookmarks are currently not expanded
        If ((IsInside($aMousePos, $aBoundPos) And AssocArrayGet($hWnd)) Or (Not (IsInside($aMousePos, $aBoundPos) Or AssocArrayGet($hWnd)))) Then
            AssocArrayAssign($avToggled, $hWnd, 1 - AssocArrayGet($hWnd))


Func IsInside($vMousePos, $vBoundPos)
    Return ($vMousePos[0] < $vBoundPos[3] And $vMousePos[0] > $vBoundPos[2] And $vMousePos[1] < $vBoundPos[1] And $vMousePos[1] > $vBoundPos[0])

Run, and when I switch to a Chrome window, it gives me an "Incorrect number of parameters in function call" error on line 40 (the Func IsInside declaration). Kinda confused how that's possible, and how to fix it.

Share this post

Link to post
Share on other sites

If AssocArrays.au3 is from Associative Array functions I can see, that AssocArrayGet is called with a wrong number of parameters.

If this doesn't help please post the complete error message from SciTE console.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.