I've been using Rainmeter for a while, but I'm just now getting back into it. I'm looking to use a variable string in a URL, and I'm running into a brick wall. Here's what I've got...
I'm looking to make whatever string [MeasureArtistSearch] comes out with is used in the search function on LeftMouseUpAction, but I'm unsure if I can use variables in URLs in such a way... Is this possible?
SneakyPiglet wrote:I'm looking to make whatever string [MeasureArtistSearch] comes out with is used in the search function on LeftMouseUpAction, but I'm unsure if I can use variables in URLs in such a way... Is this possible?
It is, but in a bit different way: don't use the %1 expression in the URL, replace it with [MeasureArtistSearch]. And although it's not always absolutely needed, usually it's a good idea to include the URL into quotation marks: LeftMouseUpAction=["https://rateyourmusic.com/search?searchtype=a&searchterm=[MeasureArtistSearch]"].
balala wrote:It is, but in a bit different way: don't use the %1 expression in the URL, replace it with [MeasureArtistSearch]. And although it's not always absolutely needed, usually it's a good idea to include the URL into quotation marks: LeftMouseUpAction=["https://rateyourmusic.com/search?searchtype=a&searchterm=[MeasureArtistSearch]"].
Awesome, thank you! I wasn't exactly sure what I was missing there, but it's good to see that it works. One more question for you, if you would -- upon playing with it a bit further, I realized I'd like to make the string lower-case rather than proper; do you know if there's any way I can apply StringCase=Lower to either [MeasureArtistSearch] or [MeterArtistBackground]? The main issue is that the meter is an image rather than a string, although I'm sure I could make a workaround for that.
The StringCase option can be used only on string meters, nor on image meters, nor on measures, of any kind. But, at least as far as I can tell, there's no need to convert the string to lowercase. Or is it, for any reason?
In my experience, oddly enough, URLs on the site are case-sensitive - I'm currently trying to see if I can directly access an artist's page at https://rateyourmusic.com/artist/artist_name. However, artist_name works, while Artist_Name does not -- and that's what I was getting.
As I was writing this post, I realized that I could use Substitute for the roman alphabet, so I tried that out and it worked -- thank you so much for your help.
SneakyPiglet wrote:As I was writing this post, I realized that I could use Substitute for the roman alphabet, so I tried that out and it worked -- thank you so much for your help.
Maybe a much simpler solution could exist, to not have to substitute each letter one by one, but this would require using regular expressions (and the appropriate RegExpSubstitute option). For now, this is beyond me, maybe someone else, who knows much more about this workaround, will help.