It is currently June 24th, 2024, 1:13 am

Using PlugIn Process with PlugIn GetActiveTitle [solved]

Get help with creating, editing & fixing problems with skins
User avatar
CodeCode
Posts: 1370
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Using PlugIn Process with PlugIn GetActiveTitle [solved]

Post by CodeCode »

This is the code ;

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
SkinWidth=1920
OnRefreshAction=[!SetWindowPosition "-100%" "100%" "0%" "100%"][!Zpos -2][!Draggable 0][!KeepOnScreen 1]
DynamicWindowSize=1

[Variables]
@include=#@#Vars.inc
;---------------------------------------------------------------

[MeasureIsFullScreen]
Measure=Plugin
Plugin=IsFullScreen
IfCondition=((MeasureIsFullScreen = 1) && (MeasureOnlyVlc = 1) && (MeasureNotSWTOR <> 1) && (MeasureNotChrome <> 1))
IfTrueAction=[!ShowMeterGroup Movie][!UpdateMeter *][!Redraw]
IfFalseAction=[!HideMeterGroup Movie][!UpdateMeter *][!Redraw]
IfCondition2=((MeasureIsFullScreen <> 1) || (MeasureIsFullScreen <> -1))
IfTrueAction2=[!Log ""][!Update]

[MeasureOnlyVlc]
Measure=PlugIn
PlugIn=Process
ProcessName=vlc.exe
Substitute="-1":"","1":"[&MeasureActiveTitle]"
DynamicVariables=1
OnChangeAction=[!Update]

[MeasureNotSWTOR]
Measure=PlugIn
PlugIn=Process
ProcessName=swtor.exe
Substitute="-1":"","1":""
DynamicVariables=1
OnChangeAction=[!Update]

[MeasureNotChrome]
Measure=PlugIn
PlugIn=Process
ProcessName=Chrome.exe
Substitute="-1":"","1":""
DynamicVariables=1
OnChangeAction=[!Update]

[MeasureActiveTitle]
Measure=Plugin
Plugin=GetActiveTitle
Substitute=" - VLC media player":"","-GalaxyRG":"","GalaxyRG - ":"","WEBRip.":"","-GalaxyTV":"",".":" ","YIFY":"","mp4":"","torrentgalaxy to | ":"","-TORRENTGALAXY":"","GalaxyTV - ":"","RARBG":"","COM":"","AAC-":"","-":"","aqos":"","265":"","HQ":"","10bit":""," x":"","BluRay":"","NF":"","WEB":"","DL":"","  ":"","[":"","]":"","N1C":"","IINITY":"","TSV":"","Productions":"","GalaxyRG":""
DynamicVariables=1
OnChangeAction=[!Update]

---Meters---

[CentreText]
Meter=String
MeasureName=MeasureOnlyVlc
X=960
Y=45
StringAlign=Center
StringCase=Lower
Text=%1
StringEffect=Border
FontEffectColor=0,0,0,0
SolidColor=0,0,0,0
FontColor=0,0,0,0
FontFace=#SimpleFont#
FontSize=25
DynamicVariables=1
Group=Movie

[MovieTitle]
Meter=Image
ImageName=#@#02.png
ImageTint=#VolMain#
ImageAlpha=150
X=(([CentreText:X] - [ScrollL:W]) - 94)
Y=2
W=(([CentreText:W] + [ScrollL:W] + [ScrollR:W]) + 94 * 2)
H=110
DynamicVariables=1
Group=Movie

[CentreTextVisible]
Meter=String
MeasureName=MeasureOnlyVlc
X=960
Y=62
StringAlign=Center
StringCase=Lower
Text=%1
StringEffect=Border
FontEffectColor=0,0,0,255
SolidColor=0,0,0,1
FontColor=#CopperColor#
FontFace=#SimpleFont#
FontSize=25
DynamicVariables=1
Group=Movie

[ScrollL]
Meter=Image
ImageName=#@#Edge.png
ImageFlip=None
ImageTint=#OuterEdge#
X=([CentreText:X]-[ScrollL:W] - 10)
Y=68
W=165
H=38
DynamicVariables=1
Group=Movie
Hidden=0

[ScrollR]
Meter=Image
ImageName=#@#Edge.png
ImageFlip=Horizontal
ImageTint=#OuterEdge#
X=([CentreText:X]+[CentreText:W] + 10)
Y=r
W=165
H=38
DynamicVariables=1
Group=Movie
Hidden=0
This is the error I get when using search in a torrent site. If there is no search, then the error will not appear.

Measure: Invalid Substitute="-1":"","1":"TGx:Search results for "lost in space"Google Chrome" (Utopia Dynamic\Titles\Movie Title File.ini - [MeasureOnlyVlc])


The error stops when the search is not being used. TPB does not cause this.

Any Help would be appreciated.
I would like to stop this error since sometimes searching is all i am doing and thigs start to get 'choppy' after a while.
Last edited by CodeCode on May 23rd, 2024, 5:19 am, edited 2 times in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
Yincognito
Rainmeter Sage
Posts: 7492
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Using PlugIn Process with PlugIn GetActiveTitle

Post by Yincognito »

CodeCode wrote: May 22nd, 2024, 8:32 am Measure: Invalid Substitute="-1":"","1":"TGx:Search results for "lost in space"Google Chrome" (Utopia Dynamic\Titles\Movie Title File.ini - [MeasureOnlyVlc])


The error stops when the search is not being used. TPB does not cause this.

Any Help would be appreciated.
I would like to stop this error since sometimes searching is all i am doing and thigs start to get 'choppy' after a while.
By the look of the error, this might be related to having quotes inside your MeasureActiveTitle value, since those will mess up the parsing of the Substitute. Try something like:

Code: Select all

Substitute="-1":"","1":'[&MeasureActiveTitle]'
as a workaround... assuming you don't have apostrophes/ single quotes inside that measure value (I know, it's unlikely, but still). Alternatively, you could try duplicating the enclosing quotes, e.g.:

Code: Select all

Substitute="-1":"","1":""[&MeasureActiveTitle]""
and see if it works.

Overall, it's tricky to handle included quotes in such a situation, if that is indeed the issue... :???

P.S. Alternatively, for complex cases, you might consider using an intermediary measure to Substitute whatever quotes in the original measure's value with some unused characters, use that intermediary measure above, and then finally, add a Substitute part to the above that replaces back those unused characters with the corresponding quotes, to have the result as it originally was.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
CodeCode
Posts: 1370
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Using PlugIn Process with PlugIn GetActiveTitle

Post by CodeCode »

Thanks Yincognito

The single quotes did the trick.

If another snag arises, I add the current thread.

:Medal
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
Yincognito
Rainmeter Sage
Posts: 7492
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Using PlugIn Process with PlugIn GetActiveTitle

Post by Yincognito »

CodeCode wrote: May 22nd, 2024, 2:01 pm Thanks Yincognito

The single quotes did the trick.

If another snag arises, I add the current thread.

:Medal
Alrighty then. :thumbup:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
CodeCode
Posts: 1370
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Using PlugIn Process with PlugIn GetActiveTitle

Post by CodeCode »

Tested several times.
All good.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
Yincognito
Rainmeter Sage
Posts: 7492
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Using PlugIn Process with PlugIn GetActiveTitle

Post by Yincognito »

CodeCode wrote: May 23rd, 2024, 5:18 am Tested several times.
All good.
:great:
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth