Jump to content

For $i = $ITEM0 to $ITEM14 possible ?


FireFox
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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]]

When the words fail... music speaks.

Link to comment
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
 Share

  • Recently Browsing   0 members

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