Gumby, that is pretty much what I did. Just for a little explanation in case someone else comes across this....
First there is a for loop which iterates 1 through whatever value totalCount is set to... in my case it is 34. Each time through the loop, a local variable isSpecial is set to FALSE. Then a second (nested) for loop is triggered which loops through my specialCase array. In this case, there are currently 7 values stored in may array. Hence the reason I am telling it to loop 7 times. If at any point, the value stored in a specialCase slot matches the i (number of current iterations of outside for loop) then set the isSpecial to TRUE, otherwise it stays set at FALSE. So... now I know if the current value of i is in the Array of specialCase.
totalCount = 34
specialCase[7] = (4 5 15 19 20 23 26)
...
(for (= i 1) (<= i totalCount) (++i)
= isSpecial FALSE // resets at each iteration of outer loop
(for (= a 0) (< a 7) (++a)
(if(== specialCase[a] i)
= isSpecial TRUE
)
)// end special for loop
(if(not(isSpecial))
// do Something
)
(else
// do something else
)
)// end main for loop
Just to share some code, here is what happens in my script if it is not special... which is currently 27 times
(if(not(isSpecial))
(if((> (send pEvent:x)(send thisItem:nsLeft))and // item ###
(< (send pEvent:x)(send thisItem:nsRight))and
(> (send pEvent:y)(send thisItem:nsTop))and
(< (send pEvent:y)(send thisItem:nsBottom)))
(switch(send thisItem:cel)
(case 0 )// cel 0, probly been dropped
(case i // its there and waiting
(switch(gCurrentCursor)
(case 998 Print(500 i #title thisTitle #icon 950 4 i #time 15 ))// look
(case 995 SetCursor(i HaveMouse())// get
= itemIcon i
= gCurrentCursor i)
(case i Print(501 0)) // itself
(default Print(501 10)) // other items
)// end current cursor switch
)// end cel case
)// end inventory cel switch
)// ends click on view
)// ends not special...
So now in my pnc inventory, I only need to add the click interactions for the 7 special ones, and not the other 27 items. Considering this to be a good day.