Re: Advanced Conditional Scripting
Posted: 12 Jul 2014 05:49
I see what you mean now ... seems the filter is set up to take the [trackField] and an argument. I tried to write something like this, where the system time condition comparison would be independent of the track characterstics (in itself)Note, that the script-line Filter effectively evaluates/applies to the tracks of the given library - so it filters 'certain' tracks out of all available!
In your example above ({$currentSystemTime}=<'hh:mm:ss(my upper threshold)'...) it sounds, that this wouldn't make sense to be used in a filter; as the system date/time isn't an attribute of a track such filter would either always fail or match for all tracks!
('${HH}${mm}${ss}'<120000 And [dayPartCode] = 'morning') OR ('${HH}${mm}${ss}'>=120000 And [dayPartCode] = 'afternoon') //on second thought that MADE NO SENSE
I guess what i'm looking for is to be able to write the following in the filter:
if (${HH}${mm}${ss}<120000) {
[dayPartCode] = 'morning'
} else {
[dayPartCode] = 'evening'
}
The idea behind this, is that I generally have the same clockwheel structure for each program, for argument's sake lets say PowerHit/Gold/PowerHit/New/Break (repeat to fill hour). However, I might consider a particular PowerHit track to not be appropriate for the morning (so I'd add a respective flag to the track). Then the filter logic based on system time comparisons would allow me to run the same script throughout the day, but also daypart the clockwheel.
Yes this alternative solution would definitely result in the same outcome. The only drawback to me, is that i would have to enter each scripted track twice (i.e. once to pick morning track, then pick afternoon track - with mutually exclusive filters). This makes the script somewhat harder to read. But I will be happy with whatever implementation you choose - if it accomplishes the same goal at the end.So that example more sounds like a real script-line condition, e.g. do not use this script-line during morning hours...?