Trying to set tooltip depending on a measure

Help with creating, editing & fixing problems with skins

Trying to set tooltip depending on a measure

May 16th, 2018, 12:53 am
DavidFw1960
   [27 posts]

Really sorry to be such a nuisance!

I am trying to modify https://github.com/DavidFW1960/Aussie-B ... ge/ABB.ini so that if it's an unlimited plan, the tooltip text is different. Here's my mods:

Code: Select all

[Popup]
Meter=Image
X=12
Y=10
W=200
H=95
LeftMouseDoubleClickAction=["https://my.aussiebroadband.com.au/"]
ToolTipTitle=Aussie Broadband Usage
ToolTipType=1
ToolTipIcon=#@#Images\Abbicon.ico
;ToolTipText="Allowance: [MeasureAllowanceGB] GB every [MeasureRollover]#CRLF#Down: [MeasureDownloadedGB] GB Up: [MeasureUploadedGB] GB#CRLF#Total: [MeasureTotalUsedGB] GB Remaining: [MeasureQuotaLeftGB] GB#CRLF#Data used: [PercentUsedData]% Left: [PercentRemainingData]%#CRLF#Today is day [MeasureToday] #CRLF#Used: [MeasureDaysUsedPart] days, [MeasureUsedPerDay] GB/Day#CRLF#Month used: [PercentMonthUsed]% Left: [PercentMonthLeft]%#CRLF#Per Day Start: [MeasureQuotaPerDayStart] GB Remaining: [MeasureQuotaPerDayRemaining] GB#CRLF#Quota Remaining Today: [AvailableDataToday] GB"
DynamicVariables=1
MouseActionCursor=0

[MeasureToolTipText]
Measure=String
IfCondition=(MeasureAllowanceGB >= 100000)
IfTrueAction=[!SetOption Popup ToolTipText "Allowance: Unlimited GB every [MeasureRollover]#CRLF#Down: [MeasureDownloadedGB] GB Up: [MeasureUploadedGB] GB#CRLF#Total: [MeasureTotalUsedGB] GB #CRLF#Today is day [MeasureToday] #CRLF#Used: [MeasureDaysUsedPart] days, [MeasureUsedPerDay] GB/Day#CRLF#Month used: [PercentMonthUsed]% Left: [PercentMonthLeft]%#CRLF#"]
IfFalseAction=[!SetOption Popup ToolTipText "Allowance: [MeasureAllowanceGB] GB every [MeasureRollover]#CRLF#Down: [MeasureDownloadedGB] GB Up: [MeasureUploadedGB] GB#CRLF#Total: [MeasureTotalUsedGB] GB Remaining: [MeasureQuotaLeftGB] GB#CRLF#Data used: [PercentUsedData]% Left: [PercentRemainingData]%#CRLF#Today is day [MeasureToday] #CRLF#Used: [MeasureDaysUsedPart] days, [MeasureUsedPerDay] GB/Day#CRLF#Month used: [PercentMonthUsed]% Left: [PercentMonthLeft]%#CRLF#Per Day Start: [MeasureQuotaPerDayStart] GB Remaining: [MeasureQuotaPerDayRemaining] GB#CRLF#Quota Remaining Today: [AvailableDataToday] GB"]
OnUpdateAction=[!UpdateMeter "Popup"][!Redraw]


If I uncomment the tooltiptext in [popup] and comment out the [measuretooltiptext] section, it is exactly right display for a plan with a quota:

Untitled.png


But if I try and use the [measuretooltiptext] section it looks like this:

Untitled1.png


I have no idea what I am doing wrong.
User avatar

Re: Trying to set tooltip depending on a measure

May 16th, 2018, 1:15 am
jsmorley
Developer   [17493 posts]

Try DynamicVariables=1 on the String measure.

Re: Trying to set tooltip depending on a measure

May 16th, 2018, 4:44 am
DavidFw1960
   [27 posts]

Tried dynamicvariables as suggested. Same result.
User avatar

Re: Trying to set tooltip depending on a measure

May 16th, 2018, 8:52 am
ikarus1969
   [255 posts]

Strange thing is that not all Measures are missing when set by if If-conditions; just the measures that gives you GB-usage and/or percentage.
For example the "[MeasureDaysUsedPart]" gives you a value.

If have no specific hint for you but could you please list the measures that are contained in the If-Conditions in the "[MeasureToolTipText]" measure? Just to have a look.

Re: Trying to set tooltip depending on a measure

May 16th, 2018, 9:14 am
DavidFw1960
   [27 posts]

Thing is the only number that is right is the 6th - the rollover date.
You can see the full .ini file if you click on the link in my first post (it’s all on github including the rmskin file)
User avatar

Re: Trying to set tooltip depending on a measure

May 16th, 2018, 12:45 pm
balala
Rainmeter Sage   [6087 posts]

DavidFw1960 wrote:If I uncomment the tooltiptext in [popup] and comment out the [measuretooltiptext] section, it is exactly right display for a plan with a quota:

Untitled.png

But if I try and use the [measuretooltiptext] section it looks like this:

Untitled1.png

Try to "escape" the measure names in the !SetOption bangs of the IfTrueAction and IfFalseAction options of the [MeasureToolTipText] measure:

Code: Select all

[MeasureToolTipText]
Measure=String
IfCondition=(MeasureAllowanceGB >= 100000)
IfTrueAction=[!SetOption Popup ToolTipText "Allowance: Unlimited GB every [*MeasureRollover*]#CRLF#Down: [*MeasureDownloadedGB*] GB Up: [*MeasureUploadedGB*] GB#CRLF#Total: [*MeasureTotalUsedGB*] GB #CRLF#Today is day [*MeasureToday*] #CRLF#Used: [*MeasureDaysUsedPart*] days, [*MeasureUsedPerDay*] GB/Day#CRLF#Month used: [*PercentMonthUsed*]% Left: [*PercentMonthLeft*]%#CRLF#"]
IfFalseAction=[!SetOption Popup ToolTipText "Allowance: [*MeasureAllowanceGB*] GB every [*MeasureRollover*]#CRLF#Down: [*MeasureDownloadedGB*] GB Up: [*MeasureUploadedGB*] GB#CRLF#Total: [*MeasureTotalUsedGB*] GB Remaining: [*MeasureQuotaLeftGB*] GB#CRLF#Data used: [*PercentUsedData*]% Left: [*PercentRemainingData*]%#CRLF#Today is day [*MeasureToday*] #CRLF#Used: [*MeasureDaysUsedPart*] days, [*MeasureUsedPerDay*] GB/Day#CRLF#Month used: [*PercentMonthUsed*]% Left: [*PercentMonthLeft*]%#CRLF#Per Day Start: [*MeasureQuotaPerDayStart*] GB Remaining: [*MeasureQuotaPerDayRemaining*] GB#CRLF#Quota Remaining Today: [*AvailableDataToday*] GB"]
OnUpdateAction=[!UpdateMeter "Popup"][!Redraw]

(See the * characters around the names of the measures above)

Re: Trying to set tooltip depending on a measure

May 17th, 2018, 12:00 am
DavidFw1960
   [27 posts]

Yes!!!!!

That worked. Thanks very much. :17good

Any idea why it worked in the first instance without the escaping? So weird. I was going crazy!

Thanks again.
User avatar

Re: Trying to set tooltip depending on a measure

May 17th, 2018, 12:02 pm
balala
Rainmeter Sage   [6087 posts]

DavidFw1960 wrote:Any idea why it worked in the first instance without the escaping? So weird. I was going crazy!

I can't say precisely, but I suppose first time the options are set properly, but later when the value of the measures are changing, they are not any more.
Glad you got it working.

Re: Trying to set tooltip depending on a measure

May 17th, 2018, 10:30 pm
DavidFw1960
   [27 posts]

Should I include the line:
DynamicVariables=1 on the String measure.
at the end of the string measure? It's working without that but JSmorley suggested that in the first instance and it made no difference so I removed it. It's working without it anyway.
User avatar

Re: Trying to set tooltip depending on a measure

May 18th, 2018, 12:34 pm
balala
Rainmeter Sage   [6087 posts]

DavidFw1960 wrote:Should I include the line:
DynamicVariables=1 on the String measure.
at the end of the string measure?

If it does work even without the option, I'd renounce to it (just additionally I'd say that it's not necessary to add that option to the end, you can add it anywhere in the measure).

Return to “Help: Rainmeter Skins”



Who is online

Users browsing this forum: No registered users and 7 guests