Sign in to follow this  
Followers 0

Compile Bug;Error: Array variable has incorrect number of subscripts or subscri...

33 posts in this topic

Posted

Error: Array variable has incorrect number of subscripts or subscript dimension range exceeded.

This error have got who don't have AutoIT(beta) and works for me, but when send to someone who don't have AutoIT, but when remove Beta commands like:_GUICtrlTreeView_SelectItem,_GUICtrlTreeView_FindItemEx...

Look for the script but ist not bugged for comps who have AutoIT....

this is bug in autoit not in my script and i want to know how to fix that bug, is possible to make same stuff but on other way...

n3a_with_finditem.au3

Share this post


Link to post
Share on other sites



Posted

And what Operating System do the others have?

GetFileNameFromBrowse

Remarks

Note This function is available through Microsoft Windows XP Service Pack 2 (SP2) and Windows Server 2003. It might be altered or unavailable in subsequent versions of Windows.

Share this post


Link to post
Share on other sites

Posted

xp pro verison 2002 service pack 1

How to works on all xp sp's ? What is GetFileNameFromBrowse ? :|

Share this post


Link to post
Share on other sites

Posted

xp pro verison 2002 service pack 1

How to works on all xp sp's ? What is GetFileNameFromBrowse ? :|

It's API call you have in the code.

BTW I'm not going to debug a script with over a 1000 lines of code.

You need to make it as small as possible and still be able to produce the bug.

Share this post


Link to post
Share on other sites

Posted

ok, i will do that tomorow... but one i know, when remove beta comands and compile with release compiler than works.... :)

Share this post


Link to post
Share on other sites

Posted

ok, i will do that tomorow... but one i know, when remove beta comands and compile with release compiler than works.... :)

Have you tried it with 3.2.10.0 release?

Share this post


Link to post
Share on other sites

Posted

No,is 3.2.10.0 like beta in 3.2.8.1 ? i mean for command, it is same beta 3.2.9.24 and 3.2.10.0 commands? sorry for bad english :/

Share this post


Link to post
Share on other sites

Posted

No,is 3.2.10.0 like beta in 3.2.8.1 ? i mean for command, it is same beta 3.2.9.24 and 3.2.10.0 commands? sorry for bad english :/

3.2.9.14 yes

Share this post


Link to post
Share on other sites

Posted

again same thing... same error :)

Share this post


Link to post
Share on other sites

Posted

again same thing... same error :)

Still need a short reproducer script with data.

Share this post


Link to post
Share on other sites

Posted

I close it as no reproduction script is given :)

Share this post


Link to post
Share on other sites

Posted

WAit, i will add a little script with bug when test on other computers who don't have AutoIt !!!

Share this post


Link to post
Share on other sites

Posted

WAit, i will add a little script with bug when test on other computers who don't have AutoIt !!!

True 4 days with Chrismas inside was not too much time to write a repro script. :)

Share this post


Link to post
Share on other sites

Posted

I am not in my house with my computer.. i must download autoit and to make little script.. for 1-2 hour will be finished :)

Share this post


Link to post
Share on other sites

Posted

Here is a smaller script with bug but on my computer works and like script and like compiled- on other computer without AutoIT not work:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_Comment=n3 Downloader by n3nE
#AutoIt3Wrapper_Res_Description=n3 Downloader
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstants.au3>
#include <String.au3>

$download = False
Dim $a,$a2,$name
$gui = "n3 Downloader"

$Form1 = GUICreate($gui, 546, 258, -1, -1)
$Progress1 = GUICtrlCreateProgress(16, 200, 513, 17)
$Button1 = GUICtrlCreateButton("Cancel", 432, 224, 97, 25, 0)
$Button2 = GUICtrlCreateButton("Download", 328, 224, 97, 25, 0)
$Button4 = GUICtrlCreateButton("Open file", 328, 224, 97, 25, 0)
GUICtrlSetState($Button4, $GUI_HIDE)
$Button3 = GUICtrlCreateButton("Check link", 224, 224, 97, 25, 0)
$edit = GUICtrlCreateEdit("",16,227,201,19,$ES_AUTOHSCROLL)
$Group1 = GUICtrlCreateGroup("Status", 16, 144, 513, 41)
$Label3 = GUICtrlCreateLabel("Please insert link...", 32, 160, 492, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("File", 16, 72, 513, 65)
$Label1 = GUICtrlCreateLabel("Link:", 32, 96, 491, 17,$SS_LEFTNOWORDWRAP)
$Label2 = GUICtrlCreateLabel("Size:", 32, 112, 491, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label4 = GUICtrlCreateLabel("Welcome to n3 Downloader!", 16, 16, 516, 44, BitOR($SS_CENTER,$SS_CENTERIMAGE,$SS_RIGHTJUST,$WS_BORDER,$WS_CLIPSIBLINGS), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE,$GUI_WS_EX_PARENTDRAG))
GUICtrlSetFont(-1, 20, 400, 0, "Arial")
GUICtrlSetState($Button2, $GUI_DISABLE)
GUISetState(@SW_SHOW)
AdlibEnable("check", 100)

While 1
    If $download Then
        $Percent = Int((@InetGetBytesRead * 100) / $a)
        $Remain = StringSplit(@InetGetBytesRead, ".")
        GUICtrlSetData($Progress1, $Percent)
    EndIf
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            Exit
        Case $Button3
            GUICtrlSetState($Button2, $GUI_SHOW)
            GUICtrlSetState($Button4, $GUI_HIDE)
            $link = GUICtrlRead($edit)
            $a = InetGetSize($link)
            $a2 = StringSplit($a/1024, ".")
            If $a2[1] <> 0 Then
            GUICtrlSetData($Label2,"Size: " & $a2[1] & " KB")
            GUICtrlSetData($Label1,"Link: " & $link)
            GUICtrlSetState($Button2, $GUI_ENABLE)
            GUICtrlSetData($Progress1,"0")
            GUICtrlSetData($Label3,"Click on 'Download' button do start with downloading file...")
            $name = StringMid($link, StringInStr($link, "/", 0, -1)+1)
        Else
            GUICtrlSetData($Progress1,"0")
            EndIf
        Case $Button2
            GUICtrlSetState($edit, $GUI_DISABLE)
            GUICtrlSetState($Button2, $GUI_DISABLE)
            GUICtrlSetState($Button3, $GUI_DISABLE)
            $download = True
            If $a2[1] <> 0 Then
            InetGet($link,@DesktopDir & "\" & $name, 1, 1)
        EndIf
    Case $Button4
        If FileExists(@DesktopDir & "\" & $name) = 1 Then
        _Start('"' & $name & '" /S')
        Guictrlsetdata($label3,$name & " is downloaded!")
        ElseIf FileExists(@DesktopDir & "\" & $name) = 0 Then
        Guictrlsetdata($label3,"File not exist")
        EndIf
    EndSwitch
WEnd

Func check()
    If $download = True Then
        If $Percent < 100 Then
        WinSetTitle($Form1,"",$gui & " - " & $Percent & "% Downloaded")
        GUICtrlSetData($Label3,"Downloading " & $name & ",downloaded: " & $Percent & "%," & "(" & $Remain[1]/1024 & "/"& $a2[1] & "Kb" & ")")
    Else
        WinSetTitle($Form1,"",$gui & " - " & $name & " is downloaded!")
        GUICtrlSetData($Label3, $name & " is downloaded!")
        GUICtrlSetState($edit, $GUI_ENABLE)
        ;GUICtrlSetState($Button2, $GUI_ENABLE)
        GUICtrlSetState($Button2, $GUI_HIDE)
        GUICtrlSetState($Button4, $GUI_SHOW)
        GUICtrlSetState($Button3, $GUI_ENABLE)
        ;GUICtrlSetState($Button3, $GUI_ENABLE)
        $download = False
        EndIf
    EndIf
EndFunc   ;==>check

Func _Start($s_StartPath)
    If @OSTYPE = 'WIN32_NT' Then
        $s_StartStr = @ComSpec & ' /c start "" '
    Else
        $s_StartStr = @ComSpec & ' /c start '
    EndIf
    Run($s_StartStr & $s_StartPath, '', @SW_HIDE)
EndFunc   ;==>_Start

Share this post


Link to post
Share on other sites

Posted

I still can't reproduce any errors.

Share this post


Link to post
Share on other sites

Posted

SCRIPT WORKS but send to someone compiled version and see bug... when send compiled file to someone who don't have AutoIT then not works for that computer who don't have auotit :S ...but for me works :S

Share this post


Link to post
Share on other sites

Posted

I assume on the other computer without AutoIt you execute a compile version of this script.

What I don't understand is how you produce the error?

Please describe the different steps.

I run a compile script on Win2000 without any AutoIt and At least it popup and close properly

Share this post


Link to post
Share on other sites

Posted

Probably is error in "AutoIt3Wrapper GUI to Compile (ver 1.9.2)"

is there the only one compiler ?

when compile script without options then is file bigger then 600kb but with options is 343kb :S

maybe i bad set options or .. ..

Share this post


Link to post
Share on other sites

Posted

Given that AutoIt3Wrapper isn't even the compiler. Use Aut2Exe. It's in your Start Menu.

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.