It is currently June 23rd, 2024, 11:46 pm

Mlb Live Scores

Get help with creating, editing & fixing problems with skins
jake2456
Posts: 87
Joined: June 8th, 2015, 10:39 pm

Re: Mlb Live Scores

Post by jake2456 »

balala wrote:1. The !SetOption bang in the IfMatchAction option of the [MeasureBatterF] lost a bracket: IfMatchAction=[!SetOption mBatter Text "AB: [MeasureBatterF] [MeasureBatterL[color=#FF0000]][/color]"].
2. The value of the [MeasureBatterF] measure will always match [MeasureBatterF]. So, in fact the IfMatchAction will always be executed. Maybe you wanted to use the IfMatch=[MeasureBatterL], instead of IfMatch=[MeasureBatterF]?
3. Instead of [!SetOption mBatter Text "AB: [MeasureBatterF] [MeasureBatterL]"] bang, you could try this: [!SetOption mBatter Text "AB: %1 %2"], because you anyway have set the MeasureName=MeasureBatterF and the MeasureName2=MeasureBatterL options on the [mBatter] meter. The DynamicVariables=1 option of this last meter also could be removed, because it looks to be useless.
1. I ended up figuring out.
2. That measure is a lookahead so i was trying to figure out how to set it if theres a value and not a blank. i ended up taking a guess and using IfMatch=[A-Z] and it seems to work.
3. I didnt know that so thanks for that info. By Removing the measure names from the meter id have to have it set the way i had it with [MeasureBatterF] instead of %1, correct?
User avatar
balala
Rainmeter Sage
Posts: 16325
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Mlb Live Scores

Post by balala »

jake2456 wrote:1. I ended up figuring out.
It's happening sometimes.
jake2456 wrote:2. That measure is a lookahead so i was trying to figure out how to set it if theres a value and not a blank. i ended up taking a guess and using IfMatch=[A-Z] and it seems to work.
I'm glad if you could make it to work.
jake2456 wrote:3. I didnt know that so thanks for that info. By Removing the measure names from the meter id have to have it set the way i had it with [MeasureBatterF] instead of %1, correct?
You don't have to remove the measure names from the string meter, but from the IfMatchAction option of the [MeasureBatterF] measure. The MeasureName=MeasureBatterF and the MeasureName2=MeasureBatterL options remain in the [mBatter] meter.
jake2456
Posts: 87
Joined: June 8th, 2015, 10:39 pm

Re: Mlb Live Scores

Post by jake2456 »

Well i was asking about removing them from the string meter because I have to 2 different meters in the same location. And at a certain point (when game status gets a value of Pre-Game and Warmup) it displays both meters at the same time. So i set up ifmatch's for those status values and it was still displaying them both. So i tryed removing the measurenames from the meter and it worked i think. Im just wondering if by removing the measurenames from the meter if it will cause an error in the log or if its ok not to have those there and use an IfMatchAction=[!SetOption mBatter Text "AB: [MeasureBatterF] [MeasureBatterL"] to display them instead.
jake2456
Posts: 87
Joined: June 8th, 2015, 10:39 pm

Re: Mlb Live Scores

Post by jake2456 »

balala you've been a great help so far. I really appreciate it. I just have one more thing I cant figure out im hoping you can help me with.

If a team has a double header it has 2 seperate pages for game 1 and game 2. I've set that up correctly with regexp and webparsing. My problem is a button to switch between the 2 games, but is only to appear if a team has 2 games on that day.
So i have this set.

Code: Select all

[MeasureGame2]
Measure=Plugin
Plugin=WebParser
Url=[MeasureTeam]
StringIndex=6
IfMatch=2
IfMatchAction=[!ShowMeter mGame1]
IfNotMatchAction=[!HideMeter mGame1]
IfMatchMode=1
DynamicVariables=1
Then i have my meters with left mouse down actions

Code: Select all

[mGame1]
Meter=String
MeterStyle=OddStyle
StringAlign=Right
X=245
Y=127
Text=>
LeftMouseDownAction=[!SetVariable Game "2"][!CommandMeasure [MeasureLinescore2] Update][!ShowMeter mGame2][!HideMeter mGame1][!Redraw]
Hidden=1

[mGame2]
Meter=String
MeterStyle=OddStyle
StringAlign=Right
X=235
Y=127
Text=<
LeftMouseDownAction=[!SetVariable Game "1"][!CommandMeasure [MeasureLinescore1] Update][!ShowMeter mGame1][!HideMeter mGame2][!Redraw]
Hidden=1
Whats happening is if a game 2 is found it shows mGame1 for you to click on to switch to the 2nd game. Once Clicked the info loads right, though takes a minute, it shows mGame2 but wont hide mGame1 and when you click on < to go back to game 1 it wont hide mGame2. This is just confusing the crap out of me.
User avatar
balala
Rainmeter Sage
Posts: 16325
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Mlb Live Scores

Post by balala »

jake2456 wrote:Well i was asking about removing them from the string meter because I have to 2 different meters in the same location. And at a certain point (when game status gets a value of Pre-Game and Warmup) it displays both meters at the same time. So i set up ifmatch's for those status values and it was still displaying them both. So i tryed removing the measurenames from the meter and it worked i think. Im just wondering if by removing the measurenames from the meter if it will cause an error in the log or if its ok not to have those there and use an IfMatchAction=[!SetOption mBatter Text "AB: [MeasureBatterF] [MeasureBatterL"] to display them instead.
both methods are as good. I personally prefer to use the MeasureName option, but it's just a personal opinion. But be careful, because if you use "your" method, you'll probably have to add the DynamicVariables=1 option to the meter.
User avatar
balala
Rainmeter Sage
Posts: 16325
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Mlb Live Scores

Post by balala »

jake2456 wrote:Whats happening is if a game 2 is found it shows mGame1 for you to click on to switch to the 2nd game. Once Clicked the info loads right, though takes a minute, it shows mGame2 but wont hide mGame1 and when you click on < to go back to game 1 it wont hide mGame2. This is just confusing the crap out of me.
The problem is caused by the IfMatchMode=1 option of the [MeasureGame2] measure. Simply remove it. If you have it there, the appropriate bangs are executed on each update of the measure. This means that when you click to the [mGame1] meter (wanting to switch to [mGame2]), [mGame2] is shown, but because the value returned by the [MeasureGame2] measure is still 2, at next update of the measure, the IfMatchAction is executed, so the [mGame1] meter is shown, near [mGame2]. That's why after you click to [mGame1], both of them become visible.
On the other hand, on the LeftMouseDownAction options of the [mGame1] and [mGame2] meters, the !CommandMeasure bangs are used in a wrong form: eg instead of [!CommandMeasure [color=#FF0000][[/color]MeasureLinescore2[color=#FF0000]][/color] Update], you should try them without the brackets: [!CommandMeasure MeasureLinescore2 Update] (or even better, with quotation marks, but that's not the point: [!CommandMeasure "MeasureLinescore2" "Update"]).
Also note that usually the LeftMouseDownAction option is an undesired option. If there's nothing else, we use the LeftMouseUpAction. Here you can find out why.
jake2456
Posts: 87
Joined: June 8th, 2015, 10:39 pm

Re: Mlb Live Scores

Post by jake2456 »

That would explain the problem. I didnt know i had the option to remove IfMatchMode=1. Everything works great now. I think that was the last bug. Thank you for all the help.
User avatar
balala
Rainmeter Sage
Posts: 16325
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Mlb Live Scores

Post by balala »

Glad to help. In some cases IfMatchMode can be a useful option, but not here.
RMBill
Posts: 5
Joined: June 10th, 2020, 2:33 am

Re: Mlb Live Scores

Post by RMBill »

Any update to the MLB app? Seems to have stopped updating the other day.

Thanks much
User avatar
Yincognito
Rainmeter Sage
Posts: 7491
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Mlb Live Scores

Post by Yincognito »

RMBill wrote: June 28th, 2023, 3:14 pm Any update to the MLB app? Seems to have stopped updating the other day.

Thanks much
Only the other day? The end of this thread seems to point out to an even earlier dismissal. The address mentioned here doesn't work for me (access denied and such). Not that I was a baseball fan or even remotely knowing anything about it. Probably some changes in that site require a slightly different address to parse, and most likely a different regex pattern. :???:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth