It is currently May 3rd, 2024, 3:14 am

IfEqualValue / IFEqualAction (new Omnimo style skin)

Get help with creating, editing & fixing problems with skins
SteveJohnSteele
Posts: 1
Joined: December 4th, 2011, 3:57 pm

IfEqualValue / IFEqualAction (new Omnimo style skin)

Post by SteveJohnSteele »

Hi all

My skin gets information (in the form of text) from a website and displays it.

This bit works fine

Code: Select all

[MeasureAlarm1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWebsite]
StringIndex=1

[TitleAlarm1]
Meter=STRING
MeterStyle=myTitle
Text=Alarm1
DynamicVariables=1
X=(5+(#PX#*5))
Y=(#PX#*10)

[MeterAlarm1]
MeasureName=MeasureAlarm1
MeterStyle=myAlarm
Meter=STRING
X=(5+(#PX#*145))
Y=(#PX#*10)
Prefix='
Postfix='
Output something like ...
Alarm1 '5.30'
Alarm2 '6.45'
Alarm3 '7.30'

Time '5.30'

The next stage is to check the current time against each alarm and play a sound ...
This bit I'm having problems with

Code: Select all

; =============================================================================================
; CHECK ALARMS

[MeasureClockHM]
Measure=Time
Format="%#I:%M"

[MeterTime]
MeasureName=MeasureClockHM
MeterStyle=myTime
Meter=STRING
X=(5+(#height#/2))
Y=(#PX#*110)
Prefix='
Postfix='

[MeasureExecuteAlarm1] 
Measure=Time
Format="%#I:%M"
IfEqualValue=MeasureAlarm1
IfEqualAction=!Execute [PLAY #Alarmsound#]
I can see from my display (with some debug stuff) that MeasureAlarm1 and Time are identical, yet the Action doesn't get triggered.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: IfEqualValue / IFEqualAction (new Omnimo style skin)

Post by smurfier »

You need to use Dynamic Variables for what you're attempting.

Code: Select all

[MeasureExecuteAlarm1]
Measure=Time
Format="%#I:%M"
IfEqualValue=[MeasureAlarm1]
IfEqualAction=PLAY #Alarmsound#
DynamicVariables=1
Also, if you're actually returning 1.10 and not 1:10 you need to use a decimal. If you're returning a colon, you need to substitute it out for a decimal since IfActions only support numbers and not strings.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .