It is currently March 9th, 2021, 11:13 am

Market Prices

RSS, ATOM and other feeds, GMail, Stocks, any information retrieved from the internet
User avatar
Mordasius
Posts: 1053
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Market Prices

Post by Mordasius »

Market Prices.jpg
This skin has been on Deviant Art for a couple of years. There has been an increase error reports and requests for modifications in recent times so I've decided to post it here where it is much easier to reply with suggestions and snippets.

To get the ball rolling here are some clarifications on the UserAgent string and Symbols

A) UserAgent string --- As of February 2021 it doesn't seem to matter what you have as the UserAgent string. Everything works just fine with whatever you put there but it is best to put something (even "") just to be sure.

B) Symbols --- Find Symbols by going to http://www.cnbc.com then entering the stock/index name you want in the search box. When the page opens look in the top-left of the address window and make a note of EXACTLY what comes after https://www.cnbc.com/quotes/ if there is a Period (.) after the backslash (/) you MUST include it. or it will not work.

eg. https://www.cnbc.com/quotes/.SPX --> Symbol3=.SPX

If there is no period (.) DO NOT add one or it will not work.

eg. https://www.cnbc.com/quotes/AAPL --> Symbol4=AAPL
You do not have the required permissions to view the files attached to this post.
jghojh
Posts: 3
Joined: February 14th, 2021, 7:28 am

Re: Market Prices

Post by jghojh »

Hi, I'm trying to edit the ini file so that the ticker fits in my taskbar and only include the price of the stock. To do this I would need a horizontal layout of 3 stocks max in a column. After some edits, I was able to get this setup, but unable to figure out how to split up the stocks to 3 columns and to delete the empty space on top after I removed the title/icon. Any advice/tips? Thank you.

Image

Here is my current .ini file:

Code: Select all

;  ######################################################
;  #    MarketPrices-showing eight stocks/indexes       #
;  #    Prices from CNBC.com                            #      
;  ######################################################

[Rainmeter]
MiddleMouseUpAction=!Refresh
AccurateText=1
ContextTitle="-> Edit Stocks/Labels"
ContextAction=["#@#CNBC-8.inc"]

[Metadata]
Author=Mordasius
Name=8quotes-Small
Version=18-01-2021
Information= Shows the price and change in price for eight stocks or market indexes. Prices are from http://www.CNBC.com | Right-click on the skin -> Edit Stocks/Labels - to change the stocks being shown

[Variables]
TableTitle=
UpdateQuotes=600
TextFont=Calibri
ColorPair-Quote=cccccc
ColorSteady=cccccccc
ColorUp=00FF00cc
ColorDown=FF0000
FontHeight=9
ExpQuote=(?siU).*Intangible/FinancialQuote.*"name":"(.*)".*"price":"(.*)".*"priceChange":"(\+|\-?.*)".*"priceChangePercent":"(\+|\-?.*)"
@Include=#@#CNBC-8.inc
PanelWidth=178
PanelHeight=133
Col1XPos=10
Col2XPos=172
Col3XPos=188
Col4XPos=244
Col5XPos=300
Row1YPos=31
Yspace=12r

;___________________________________________________
; STYLES
[sTextLeft]
FontFace=#TextFont#
StringAlign=LEFT
FontSize=#FontHeight#
StringStyle=BOLD
StringEffect=SHADOW
FontColor=#ColorPair-Quote#
FontEffectColor=1a1a1a
MouseOverAction=[!SetOption "#CURRENTSECTION#" FontColor 66ccff] [!Update]
MouseLeaveAction=[!SetOption "#CURRENTSECTION#" FontColor ""] [!Update]
y=r
W=138
ClipString=1
Antialias=1
Group=2

[sTextRight]
FontFace=#TextFont#
StringAlign=RIGHT
FontSize=#FontHeight#
StringStyle=BOLD
StringEffect=SHADOW
FontEffectColor=000000
DynamicVariables=1
y=r
Antialias=1
Group=2

[sColorSet1]
FontColor=#ColorPair-Quote#
;____________________________________________
[InfoIndex1]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol1#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
UpdateRate=#UpdateQuotes#

[mIndex1_Price]
Measure=WebParser
Url=[InfoIndex1]
StringIndex=2

[mIndex1_Change]
Measure=WebParser
Url=[InfoIndex1]
Substitute="UNCH":"0"
StringIndex=3

[mIndex1_ChangePer]
Measure=WebParser
Url=[InfoIndex1]
Substitute="UNCH":"0"
StringIndex=4

[mIndex1_UpDown]
Measure=WebParser
Url=[InfoIndex1]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________
[InfoIndex2]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol2#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
UpdateRate=#UpdateQuotes#

[mIndex2_Price]
Measure=WebParser
Url=[InfoIndex2]
StringIndex=2

[mIndex2_Change]
Measure=WebParser
Url=[InfoIndex2]
Substitute="UNCH":"0"
StringIndex=3

[mIndex2_ChangePer]
Measure=WebParser
Url=[InfoIndex2]
Substitute="UNCH":"0"
StringIndex=4

[mIndex2_UpDown]
Measure=WebParser
Url=[InfoIndex2]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________
[InfoIndex3]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol3#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
UpdateRate=#UpdateQuotes#

[mIndex3_Price]
Measure=WebParser
Url=[InfoIndex3]
StringIndex=2

[mIndex3_Change]
Measure=WebParser
Url=[InfoIndex3]
Substitute="UNCH":"0"
StringIndex=3

[mIndex3_ChangePer]
Measure=WebParser
Url=[InfoIndex3]
Substitute="UNCH":"0"
StringIndex=4

[mIndex3_UpDown]
Measure=WebParser
Url=[InfoIndex3]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________
[InfoIndex4]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol4#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
UpdateRate=#UpdateQuotes#

[mIndex4_Price]
Measure=WebParser
Url=[InfoIndex4]
StringIndex=2

[mIndex4_Change]
Measure=WebParser
Url=[InfoIndex4]
Substitute="UNCH":"0"
StringIndex=3

[mIndex4_ChangePer]
Measure=WebParser
Url=[InfoIndex4]
Substitute="UNCH":"0"
StringIndex=4

[mIndex4_UpDown]
Measure=WebParser
Url=[InfoIndex4]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________

[InfoIndex5]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol5#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
DynamicVariables=1
UpdateRate=#UpdateQuotes#

[mIndex5_Price]
Measure=WebParser
Url=[InfoIndex5]
StringIndex=2

[mIndex5_Change]
Measure=WebParser
Url=[InfoIndex5]
Substitute="UNCH":"0"
StringIndex=3

[mIndex5_ChangePer]
Measure=WebParser
Url=[InfoIndex5]
Substitute="UNCH":"0"
StringIndex=4

[mIndex5_UpDown]
Measure=WebParser
Url=[InfoIndex5]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________
[InfoIndex6]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol6#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
UpdateRate=#UpdateQuotes#

[mIndex6_Price]
Measure=WebParser
Url=[InfoIndex6]
StringIndex=2

[mIndex6_Change]
Measure=WebParser
Url=[InfoIndex6]
Substitute="UNCH":"0"
StringIndex=3

[mIndex6_ChangePer]
Measure=WebParser
Url=[InfoIndex6]
Substitute="UNCH":"0"
StringIndex=4

[mIndex6_UpDown]
Measure=WebParser
Url=[InfoIndex6]
Substitute="UNCH":"0"
StringIndex=3

;____________________________________________
[InfoIndex7]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol7#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
UpdateRate=#UpdateQuotes#

[mIndex7_Price]
Measure=WebParser
Url=[InfoIndex7]
StringIndex=2

[mIndex7_Change]
Measure=WebParser
Url=[InfoIndex7]
Substitute="UNCH":"0"
StringIndex=3

[mIndex7_ChangePer]
Measure=WebParser
Url=[InfoIndex7]
Substitute="UNCH":"0"
StringIndex=4

[mIndex7_UpDown]
Measure=WebParser
Url=[InfoIndex7]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________
[InfoIndex8]
Measure=WebParser
URL=https://www.cnbc.com/quotes/#Symbol8#
UserAgent=#MyUserAgent#
Header=Accept: text/html
Header2=Accept_Encoding: gzip, deflate, br
Header3=Accept_Language: en-US
Header4=Connection: close
Header5=Dnt: 1
Header6=Host: www.CNBC.com
Header7=Referer: https://wwww.google.com
RegExp=#ExpQuote#
StringIndex=1
DynamicVariables=1
UpdateRate=#UpdateQuotes#

[mIndex8_Price]
Measure=WebParser
Url=[InfoIndex8]
StringIndex=2

[mIndex8_Change]
Measure=WebParser
Url=[InfoIndex8]
Substitute="UNCH":"0"
StringIndex=3

[mIndex8_ChangePer]
Measure=WebParser
Url=[InfoIndex8]
Substitute="UNCH":"0"
StringIndex=4

[mIndex8_UpDown]
Measure=WebParser
Url=[InfoIndex8]
Substitute="UNCH":"0"
StringIndex=3
;____________________________________________
; 	METERS
[QuotesBackground]
Meter=Image
SolidColor=00000044
W=#PanelWidth#
H=#PanelHeight#
UpdateDivider=-1
Group=2

[InnerBackground]
Meter=IMAGE
X=3
Y=3
SolidColor=000000dd
W=(#PanelWidth#-6)
H=(#PanelHeight#-6)
UpdateDivider=-1
Group=2
;________________________________________
;---  Quote Meters
[LabelIndex1]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol1#
X=#Col1XPos#
y=#Row1YPos#
Text=#Nindex1#

[LabelPrice1]
Meter=STRING
MeasureName=mIndex1_Price
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;-------------------------
[LabelIndex2]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol2#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex2#

[LabelPrice2]
Meter=STRING
MeasureName=mIndex2_Price
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;----------------------------------
[LabelIndex3]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol3#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex3#

[LabelPrice3]
Meter=STRING
MeasureName=mIndex3_Price
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;----------------------------------
[LabelIndex4]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol4#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex4#

[LabelPrice4]
Meter=STRING
MeasureName=mIndex4_Price
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;----------------------------------
[LabelIndex5]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol5#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex5#

[LabelPrice5]
Meter=STRING
MeasureName=mIndex5_Price
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;-------------------------
[LabelIndex6]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol6#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex6#

[LabelIndex6_Price]
MeasureName=mIndex6_Price
Meter=STRING
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;-------------------------
[LabelIndex7]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol7#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex7#

[LabelIndex7_Price]
MeasureName=mIndex7_Price
Meter=STRING
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
;-------------------------
[LabelIndex8]
Meter=STRING
MeterStyle=sTextLeft
LeftMouseUpAction=https://www.cnbc.com/quotes/#Symbol8#
X=#Col1XPos#
Y=#Yspace#
Text=#Nindex8#

[LabelIndex8_Price]
MeasureName=mIndex8_Price
Meter=STRING
MeterStyle= sTextRight | sColorSet1
x=#Col2XPos#
Text=%1
User avatar
Mordasius
Posts: 1053
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

Horizontal-1.jpg
Is this the sort of thing you are looking for?
You do not have the required permissions to view the files attached to this post.
Last edited by Mordasius on February 15th, 2021, 1:53 am, edited 2 times in total.
jghojh
Posts: 3
Joined: February 14th, 2021, 7:28 am

Re: Market Prices

Post by jghojh »

Yep! Preferably I would have it set to the same text size and white font color as the regular style so it can fit 3 stocks in a column on the Windows 10 taskbar with the transculenttaskbar skin. Pardon my bad Microsoft paint skills, but this is the endgoal for me:
Image
User avatar
Mordasius
Posts: 1053
Joined: January 22nd, 2011, 4:23 pm
Location: GMT +8

Re: Market Prices

Post by Mordasius »

horizontal-2.jpg
How about this?

You can edit the font size, colours, spacings and a bunch of other stuff in the MarketPrices-Horizontal.ini file. Change HideColoredPrices=0 to HideColoredPrices=1 to toggle the up/down/steady colour for prices.

MarketPrices-Horizontal_150221.rmskin
You do not have the required permissions to view the files attached to this post.
jghojh
Posts: 3
Joined: February 14th, 2021, 7:28 am

Re: Market Prices

Post by jghojh »

Exactly what I was looking for, thank you so much for the help! :D