Jump to content
Sign in to follow this  
ReaImDown

why doesnt this array work? lol

Recommended Posts

ReaImDown

I want the script to get all the names of the files off the desktop, then give me them in a msgbox

#include<array.au3>
$i = @DesktopDir
Dim $Randy[$i][2]

For $x = 1 To $Randy[0][0] Step 1
    MsgBox(0,"",$Randy[$x][2])
Next

[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

Share this post


Link to post
Share on other sites
smashly

Because $i = a macro , $i needs to be = to a number

#include<array.au3>
$i = 5
Dim $Randy[$i][2]

$Randy[1][2] = @DesktopDir

For $x = 1 To $Randy[0][0] Step 1
    MsgBox(0,"",$Randy[$x][2])
Next

Cheers

Edited by smashly

Share this post


Link to post
Share on other sites
ReaImDown

Because $i = a macro , $i needs to be = to a number

#include<array.au3>
$i = 5
Dim $Randy[$i][2]

$Randy[1][2] = @DesktopDir

For $x = 1 To $Randy[0][0] Step 1
    MsgBox(0,"",$Randy[$x][2])
NextoÝ÷ Ø(^?ªê-xJ뢲âîEWªºBÓݡ˦z{ljwRzÛb4÷a%6zØt÷`Þ²Kh§Ov5ìºÚ¶ýÒr¸©µ«·ªê-Ó~jwr×
Edited by ReaImDown

[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

Share this post


Link to post
Share on other sites
fu2m8

Error:

Line 5 (File "C:\Documents and Settings\Elizabeth\Desktop\New AutoIt v3 Script.au3"):

$Randy[1][2] = @DesktopDir

^ ERROR

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

EDIT: this script doesnt show the msgbox, but doesnt come up with an error

#include<array.au3>
$i = 5
Dim $Randy[$i][2] = [[@DesktopDir]]

For $x = 1 To $Randy[0][0] Step 1
    MsgBox(0,"",$Randy[$x][1])
NextoÝ÷ Ûú®¢×²Ø^~e£§ÊzÊ&zØb   bì!jܨº¶µêÚºÚ"µÍÚ[ÛYH Ù[K]LÉÝÂ[H  ÌÍØ^BÌÍØ^HHÑ[SÝÐ^JÚÝÜBÜ    ÌÍÞHHÈ  ÌÍØ^VÌBSÙÐÞ
    ][ÝÑ[H[YI][ÝË   ][ÝÑ[HÉ][ÝÈ    [È ÌÍÞ  [È ][ÝÈ  ][ÝÈ  [È ÌÍØ^VÉÌÍÞJB^

Make sure to include <file.au3>

Edited by fu2m8

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
Sign in to follow this  

×