Author Topic: Using task scheduler to enable/disable Text Source  (Read 380 times)

South Coast FM Tech

  • Newbie
  • *
  • Posts: 29
Using task scheduler to enable/disable Text Source
« on: February 27, 2024, 05:42:26 am »
Hi Jan,

I have a 'PRIORITY message' text source (ID:6). It's an empty txt file. I'd like to turn it on/off via the task scheduler. 
The priority message text itself is stored in the 'N/A text' attribute of Text Source ID:6.
At the same time, when the 'PRIORITY message' is enabled, I'm looking to disable the less important ID3 & ID4 to increase ID6 visibility.
While the 'N/A text' attribute changes as expected, the text source ID6 and others don't enable/disable automatically as expected.
(The text source selection ticks don't change).

thanks, Rod

Jan

  • Hero Member
  • *****
  • Posts: 1071
Re: Using task scheduler to enable/disable Text Source
« Reply #1 on: February 27, 2024, 10:01:25 am »
Hi Rod, nice pictures showing the problem.

Since version 4.1.0 the user can create multiple text Outputs. Due to this, the script commands have been expanded, to distinguish between the Outputs. Complete reference can be found in extsrc.pdf, section 'Dynamic configuration of the External Text Sources'.

Your Output ID is 1, so in your case, correct commands would be

Code: [Select]
set Output1.SrcSequenceItem3Checked:"0"
set Output1.SrcSequenceItem4Checked:"0"
set Output1.SrcSequenceItem5Checked:"1"
etc.

For example, the SrcSequenceItem5 is the fifth item in the sequence, from the top of the box. It is not the ID:5 because you may insert each source several times to the output sequence and you can still control each item separately.

Also the workaround with the NAText is no longer required. If you create a Source as Internal channel type, then you can set the text content directly from the Task Scheduler

Code: [Select]
set Source6.InternalChannelText:"TOTAL FIRE BAN"

The 'Tasks' box contains a set of button presets where the commands mentioned above are included, so you don't need to remember them.

South Coast FM Tech

  • Newbie
  • *
  • Posts: 29
Re: Using task scheduler to enable/disable Text Source
« Reply #2 on: February 27, 2024, 12:32:31 pm »
Thanks Jan. Works perfectly now!