This posting is older than 6 months and can contain outdated information.
Anyway, I managed to use the RB read & store and hopefully this will prove useful for someone else who is looking to do the same thing.
[code]
set chans to {146, 403, 404, 407, 411, 412, 413, 422, 423, 424, 425, 426, 427, 432, 435, 441, 447, 501, 502, 503, 511, 512, 515, 521, 522, 523, 525, 531, 532, 533, 615, 616}
set chCount to count chans
tell application "Remote Buddy"
read value for key "com.pac.chno" in domain "temporary"
if (result is missing value) then
store value "0" for key "com.pac.chno" in domain "temporary"
set chno to "0"
else
set chno to result
end if
set chno to chno + 1
if chno > chCount then set chno to 1
store value chno for key "com.pac.chno" in domain "temporary"
end tell
--property chno : 0
set chan to item chno of chans
set x100 to round chan / 100 rounding down
set x10 to round (chan mod 100) / 10 rounding down
set x1 to round chan mod 10
set x100 to x100 + 4
set x10 to x10 + 4
set x1 to x1 + 4
tell application "iRed.app" to «event IRDaIRsc» given «class IRsC»:«class IRAA» x100 of «class IRAC» "SCV"
--display dialog x100
delay 0.25
tell application "iRed.app" to «event IRDaIRsc» given «class IRsC»:«class IRAA» x10 of «class IRAC» "SCV"
--display dialog x10
delay 0.25
tell application "iRed.app" to «event IRDaIRsc» given «class IRsC»:«class IRAA» x1 of «class IRAC» "SCV"
--display dialog x1
[/code]