Support
All support resources for our products. Here you can find answers to frequently asked questions, discuss with other users, recover a lost license code or file a support request.
Forum closed
This forum was closed and turned into an archive effective April 21, 2018. It is no longer possible to create new topics or reply to existing topics.

Thanks everyone for all the great questions and contributions over the years.

Please use the Contact form to get in touch.

Remote Buddy Forum

Overview 

AuthorThread
User

20.09.2010 04:07:28
Re: Index through an array of channels

This posting is older than 6 months and can contain outdated information.
The following script increments the index and displays the correct channel data when I compile and execute it using the Applescript Editor, i.e. the 'index' property is persistent and survives each execution of the script, but when I run the same script in RB it always displays the first channel and it looks like the index property is not persistent in RB ?

[code] 
set chans to {441, 447, 501, 502} 
set chCount to count chans 
property index : 0 
set index to index + 1 
if index > chCount then set index to 1 
set chan to item index of chans 
set x100 to round chan / 100 rounding down 
set x10 to round (chan - x100 * 100) / 10 rounding down 
set x1 to round chan mod 10

--display dialog x100 
--display dialog x10 
--display dialog x1 
[/code] 

Thread-display::