It is currently April 27th, 2024, 2:21 pm

Problems with using URLs

Get help with installing and using Rainmeter.
Gene
Posts: 1
Joined: October 8th, 2023, 10:45 pm

Problems with using URLs

Post by Gene »

hi, I just downloaded Rainmaker 2 days ago. I found a SCP Skin, but the problem is its outdated, I think. buttons don't work and text isn't on the screen properly. I tried asking chat gtp to help me edit the file so I can press a button and it open the default browser. unfortunately, all the attempts have failed and it's getting more and more complicated. how can I have rainmaker open a URL to the systems default browser without having to tell it which one is?
You do not have the required permissions to view the files attached to this post.
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Problems with using URLs

Post by Yincognito »

Gene wrote: October 9th, 2023, 9:43 pm hi, I just downloaded Rainmaker 2 days ago. I found a SCP Skin, but the problem is its outdated, I think. buttons don't work and text isn't on the screen properly. I tried asking chat gtp to help me edit the file so I can press a button and it open the default browser. unfortunately, all the attempts have failed and it's getting more and more complicated. how can I have rainmaker open a URL to the systems default browser without having to tell it which one is?
Yeah, ChatGPT can't do the thinking for people, its "intelligence" is just typical hype. Obviously...

I have no idea what SCP is or what skin you're using, but you can open an URL in your default browser by simply enclosing it between quotes and using it in a bang. Such a bang can be added to an action option. The said option can be placed in a section (measure or meter) from your skin. A typical usage would be a bang in a mouse action from the desired meter, something along the lines of:

Code: Select all

[YourMeter]
...
LeftMouseUpAction=["www.google.com"]
If one the other hand you specifically want to find the path to your default browser and maybe use it to open a new window in that browser that goes to the desired URL, the elements from this sample skin would do that:

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1

[ProgId]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.html\UserChoice
RegValue=Progid
UpdateDivider=-1

[Command]
Measure=Registry
RegHKey=HKEY_CLASSES_ROOT
RegKey=[ProgId]\shell\open\command
UpdateDivider=-1
RegExpSubstitute=1
Substitute='(?siU)^.*"(.*)".*$':"\1","^\\1$":""
DynamicVariables=1

[DefaultBrowser]
Meter=String
SolidColor=0,255,0,255
AntiAlias=1
MeasureName=Command
Text=%1
LeftMouseUpAction=["[Command]"]
UpdateDivider=-1
DynamicVariables=1
Basically, it's 2 Registry measures that get the relevant data from the Windows registry, followed by a meter that displays the browser's path and runs that path in a bang just like above.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
balala
Rainmeter Sage
Posts: 16176
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Problems with using URLs

Post by balala »

Gene wrote: October 9th, 2023, 9:43 pm buttons don't work and text isn't on the screen properly.
Aside form the not-working buttons, not sure what you mean by "text isn't on the screen properly", because the elements of the skins seem to be properly placed. Definitely not outside of the screen. However this might be a screen resolution problem as well. Maybe this is the explanation why the text seems to go outside of the screen.
Gene wrote: October 9th, 2023, 9:43 pm how can I have rainmaker open a URL to the systems default browser without having to tell it which one is?
Not sure where would you like to add the link, however Yincognito specified a solution on how to add the desired link.
Yincognito wrote: October 10th, 2023, 4:42 am I have no idea what SCP is or what skin you're using,
SCP is the linked skin in OPs post. Its installer is attached above (scp_c_com_terminal_1_by_maxcorpindustries_ddd2ls2.rmskin).
User avatar
Yincognito
Rainmeter Sage
Posts: 7175
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Problems with using URLs

Post by Yincognito »

balala wrote: October 10th, 2023, 3:31 pm SCP is the linked skin in OPs post. Its installer is attached above (scp_c_com_terminal_1_by_maxcorpindustries_ddd2ls2.rmskin).
Oh, yes, indeed - my bad. I actually downloaded that skin from the said link at the time of posting, but didn't understand what was about (not to mention that I didn't want to change my wallpaper like in the skin and was terrified by the amount of conditions there in the code).

I was so affected by it that I apparently forgot that I downloaded it in the first place, hence the part about having no idea about it, haha. Like I said, my bad - but I still have no clue of what it does since I didn't try it yet, just looked at the code and was ... well, amazed by it, to put it this way. :D
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth