Jump to content

Recommended Posts

Posted

Hi,

I have this in my script :

Local $ITEM0[$WL[0][0]], $ITEM1[$WL[0][0]], $ITEM2[$WL[0][0]]
Local $ITEM3[$WL[0][0]], $ITEM4[$WL[0][0]], $ITEM5[$WL[0][0]], $ITEM6[$WL[0][0]]
Local $ITEM7[$WL[0][0]], $ITEM8[$WL[0][0]], $ITEM9[$WL[0][0]], $ITEM10[$WL[0][0]]
Local $ITEM11[$WL[0][0]], $ITEM12[$WL[0][0]], $ITEM13[$WL[0][0]], $ITEM14[$WL[0][0]]

But Its not very beautiful, so I'm wondering if there is a way to do it like this :

$WL = WinList()
For $nb = 1 to 14
Local $ITEM & $nb[$WL[0][0]]
Next

Cheers, FireFox.

Posted

Hi,

I have this in my script :

Local $ITEM0[$WL[0][0]], $ITEM1[$WL[0][0]], $ITEM2[$WL[0][0]]
Local $ITEM3[$WL[0][0]], $ITEM4[$WL[0][0]], $ITEM5[$WL[0][0]], $ITEM6[$WL[0][0]]
Local $ITEM7[$WL[0][0]], $ITEM8[$WL[0][0]], $ITEM9[$WL[0][0]], $ITEM10[$WL[0][0]]
Local $ITEM11[$WL[0][0]], $ITEM12[$WL[0][0]], $ITEM13[$WL[0][0]], $ITEM14[$WL[0][0]]

But Its not very beautiful, so I'm wondering if there is a way to do it like this :

$WL = WinList()
For $nb = 1 to 14
Local $ITEM & $nb[$WL[0][0]]
Next

Cheers, FireFox.

Use a bidimensional array and in this case is no need a loop and it`s easy to work:

$WL = WinList()
Local $ITEM[14][$WL[0][0]]
Posted

Use a bidimensional array and in this case is no need a loop and it`s easy to work:

$WL = WinList()
 Local $ITEM[14][$WL[0][0]]
ho...yes, Ive forgotten that :)

thanks :lmao:

Cheers, FireFox.

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
×
×
  • Create New...