**EDIT**
The zip file has now been updated with this info.
A couple of necessary additions until the documentation in the file can be updated. First, here's the code to populate the variables automatically:
- Code: Select all
tell application "IndigoServer"
set acount to 1
repeat 10 times
make new variable with properties {name:"WHA_AM_Preset_" & acount, value:acount}
set acount to acount + 1
end repeat
end tell
tell application "IndigoServer"
set acount to 1
repeat 10 times
make new variable with properties {name:"WHA_FM_Preset_" & acount, value:acount}
set acount to acount + 1
end repeat
end tell
tell application "IndigoServer"
set acount to 1
repeat 10 times
make new variable with properties {name:"WHA_Button_" & acount, value:acount}
set acount to acount + 1
end repeat
end tell
tell application "IndigoServer"
make new variable with properties {name:"WHA_Radio_Display" & acount, value:acount}
make new variable with properties {name:"WHA_Radio_Preset" & acount, value:acount}
make new variable with properties {name:"WHA_Radio_AMFM" & acount, value:acount}
end tell
Second (and most important): the trigger that is set up to toggle the tuner between AM and FM needs a further action to switch the band on the tuner.
This trigger will fire when the "WHA_Radio_AMFM" variable changes. The condition is "always". The actions are TWO "execute applescript" and are separate. The first is the following:
- Code: Select all
RemoteControl("Sony Tuner", "Sony/Tuner", "Band")
This will actually send the signal to the tuner to change the band.
The second is the control code listed in the write up. I am keeping them separate so that the code can be corrected in one of the trigger actions and simply copied/pasted into the other without having to worry about the toggle.