Hello everybody and happy new year !
I’m managing a student internet radio station and I often have to enable/disable shows events. The only way to do it is by being present in the studio or by taking a remote control to the studio.
I’m looking for being able to enable or disable an event by checking a variable online.
By example, a script would look if “http://www.mywebsite.com/onair.php” returns me 1 or 0. If 1 is returned, then mAirlist would launch an event (or any other stuff), if not, do nothing.
I’ve got no clue to where I should look or start to do this.
Thanks for your help,
Here’s a script which fetches the content of a web page and checks if it’s “1”. It then scans the event list for an event named “My Event” and checks or unchecks “Run in Automation” accordingly.
enabled := HTTPGet('http://someurl') = '1';
for i := 0 to CurrentPlaybackControl.GetEventList.GetCount - 1 do
if CurrentPlaybackControl.GetEventList.GetItem(i).GetDescription = 'My Event' then
Save this script as a text file (extension .mls) and run it from the event scheduler as needed.
Torben, thank you so much for this one. It works like a charm.
I could never say thank you enough for all the dedication you give us.
Maybe i have a strange question about this script, but I have been posting a question about enable/disable a specific event.
this is quite the same… but this script is sort of the script I would like to use.
Unfortunattely I am not very familiar in writing scripts, so that is why i ask the expertise of the people who can help me:)
The script torben wrote is looking for a 1 or 0 on a website to enable a specific event…
Would it be posible to modify the script so an specific event will be enabled at a specific date and time?
and offcourse could the same script disable an specific event at a specific date and time?
For instance… Event “Test event” will be enabled at 1 juli at 12 am and will be disabled at 31 juli at 11 pm?