Sign in to follow this  
Followers 0
DNnlee

need help simplifying an array

3 posts in this topic

i have this long code which is almost similar, and want to click ;)

just want to simply if so i don't have a long list of $slot[][], if you notice every 4 is almost the same

$S = 5 ;;;;;;; <= this is the variable i will change

Dim $Slot[8][2]         
$Slot[1][0] = "50"   
$Slot[1][1] = "10"
$Slot[2][0] = "150"
$Slot[2][1] = "10"
$Slot[3][0] = "50"
$Slot[3][1] = "25"
$Slot[4][0] = "150"
$Slot[4][1] = "25"
$Slot[5][0] = "50"
$Slot[5][1] = "40"
$Slot[6][0] = "150"
$Slot[6][1] = "40"
$Slot[7][0] = "50"
$Slot[7][1] = "55"
$Slot[8][0] = "150"
$Slot[8][1] = "55"
$Slot[9][0] = "50"
$Slot[9][1] = "70"
$Slot[10][0] = "150"
$Slot[10][1] = "70"
$Slot[11][0] = "50"
$Slot[11][1] = "85"
$Slot[12][0] = "150"
$Slot[12][1] = "85"
        ControlClick ( "mozilla", "", "MozillaWindowClass8" , "left", 2 , $Slot[$S][0],$Slot[$S][1]);;;;;;;<= the click

Share this post


Link to post
Share on other sites



$b = 10
For $j = 1 to 12
    If Mod($j,2)= 0 Then
        $a = 150
    Else
        $a = 50
    EndIf
    $Slot[$j][0] = $a
    $Slot[$j][1] = $b
    $b += 15
Next


In the beginning there was nothing and then even that exploded - anonymous

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  
Followers 0