Jump to content

Recommended Posts

Posted (edited)

There is a error, and I dont know where he is (because the output will only show this:)

C:\PROGRA~1\AutoIt3\Include\array.au3 (496) : ==> Array variable subscript badly formatted.: 
$iResult = StringInStr($avArray[$iCurrentPos], $vWhat2Find, $iCaseSense) 
$iResult = StringInStr($avArray[^ ERROR

This is the function where the error must be:

Func CreateEverythingForDesign()
    For $i = 0 to $Forms Step +1
        $SplittedScript = StringSplit(SCI_GETTEXT($Sci), @CRLF, 1)
        GUISetState(@SW_RESTORE,$ScriptGUI)
        $Pos = _ArraySearch ($SplittedScript, "%;Form&Start&"&$i&";%", 0, 0, 0, True)
        $Pos1 = _ArraySearch ($SplittedScript, "%;Form&Created&"&$i&";%", 0, 0, 0, True)
        
        For $ii = $Pos To $Pos1 Step +1
            $Pos2 = _ArraySearch ($SplittedScript, "GUICreate(", $ii, $ii, 0, True)
            If @error = 6 Then
            Else
                $GUICtrlFunctions = StringSplit($SplittedScript[$Pos2], ",")
                MsgBox(0,"dddd",$GUICtrlFunctions[1])
            EndIf
        Next
    Next
    
EndFunc

Thnx, Kip

Edited by kip
Posted

1

This tells you the error was made/found in the array.au3 include ( you included at the top of your script )

C:\PROGRA~1\AutoIt3\Include\array.au3 (496)

2

The 496 tells you what line the error was found on

3

With "Array variable subscript badly formatted" and

"$iResult = StringInStr($avArray[$iCurrentPos], $vWhat2Find, $iCaseSense)

$iResult = StringInStr($avArray[^ ERROR"

You use StringSplit() here

$SplittedScript = StringSplit(SCI_GETTEXT($Sci), @CRLF, 1)

maybe you could test that array

If Not IsArray($SplittedScript) Then MsgBox()

Lastly I cant help with the array search in the reg-express style you used... but if the above doesn't help, its most likely there

8)

NEWHeader1.png

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...