Weather Update [SOLVED]

For all your scripting needs. You can share bat/cmd/js/vba files here.
User avatar
ANeon20
EGG
Posts: 36
Joined: April 28th, 2020, 3:26 pm

Weather Update [SOLVED]

Postby ANeon20 » May 20th, 2020, 5:10 am

Since the weather option for LINKS stopped working recently, I made a python script to fetch the weather from OpenWeatherMap. You will require a key for it to work which you can get from OpenWeatherMap for free. I mostly am a C# programmer and this is my first time trying a pythin script, so the code might be a tad bit inefficient and I still can't figure out how to make the system speak the result.
Last edited by ANeon20 on May 24th, 2020, 11:37 am, edited 3 times in total.
ANeon.Peter :geek:

danbrad
TADPOLE
Posts: 55
Joined: October 7th, 2018, 11:27 am

Re: Weather Update

Postby danbrad » May 21st, 2020, 1:07 pm

thanks for this, if you suss it out let us know about it. Much appreciated

User avatar
ANeon20
EGG
Posts: 36
Joined: April 28th, 2020, 3:26 pm

Re: Weather Update

Postby ANeon20 » May 21st, 2020, 1:29 pm

So I found a solution and it works! Python would have caused too much of hassle and problem so I shifted to VBS and found a solution. AND IT TOTALLY WORKS!

So I will just properly step by step write down the things one would need to do to make this work.

1) Go to https://openweathermap.org and create an account and generate an API key.
NOTE (important) : The API key will take a couple of minutes to activate, and the script won't work unless your API key works.

2)Put in your API key in the text file

3) Enter your city name

4) Choose your desired temperature unit (metric for Celcius and imperial for Fahrenheit)

5) Save the file as "whateveryouwant.VBS". The .VBS extension is important for it to work

6) Enjoy!
Attachments
Weather.txt
(1.2 KiB) Downloaded 19 times
Last edited by ANeon20 on May 21st, 2020, 1:47 pm, edited 1 time in total.
ANeon.Peter :geek:

User avatar
ANeon20
EGG
Posts: 36
Joined: April 28th, 2020, 3:26 pm

Re: Weather Update

Postby ANeon20 » May 21st, 2020, 1:44 pm

I have left an API key for you guys to test the script. Don't worry I don't personally use it. Just a test key.

BUT DON'T GET TOO COMFORTABLE AND KEEP IT AS YOURS! MAKE A KEY, IT'S TOTALLY FREE
ANeon.Peter :geek:

danbrad
TADPOLE
Posts: 55
Joined: October 7th, 2018, 11:27 am

Re: Weather Update [SOLVED]

Postby danbrad » May 23rd, 2020, 12:37 pm

This is excellent progress, will this work with same commands and where will we need to save the weather.txt file too?

Regards
Dan

danbrad
TADPOLE
Posts: 55
Joined: October 7th, 2018, 11:27 am

Re: Weather Update [SOLVED]

Postby danbrad » May 23rd, 2020, 12:39 pm

I dont suppose you could help users of rainmeter skins too? As the weather skins are broken too! Thanks for your work.

User avatar
ANeon20
EGG
Posts: 36
Joined: April 28th, 2020, 3:26 pm

Re: Weather Update [SOLVED]

Postby ANeon20 » May 24th, 2020, 4:11 am

danbrad wrote:This is excellent progress, will this work with same commands and where will we need to save the weather.txt file too?

Regards
Dan

The default weather command will not work no matter what. The services it uses no longer exists. So I would suggest you delete those commands. You need to create a shell command to run this vbs file. So basically you can save the file anywhere on your computer. You just have to provide the proper path of the file.
ANeon.Peter :geek:

User avatar
ANeon20
EGG
Posts: 36
Joined: April 28th, 2020, 3:26 pm

Re: Weather Update [SOLVED]

Postby ANeon20 » May 24th, 2020, 4:12 am

danbrad wrote:I dont suppose you could help users of rainmeter skins too? As the weather skins are broken too! Thanks for your work.

I can give it a look. Can you tell me which skin you are using?
ANeon.Peter :geek:

MrniceAngel74
EGG
Posts: 10
Joined: May 24th, 2020, 10:42 am

Re: Weather Update [SOLVED]

Postby MrniceAngel74 » May 24th, 2020, 11:28 am

already tried this created an account on website you provided got a api key replaced relevant info. re-opened txt file in notecard++ and saved as a VBS added command line to Mark 2 and I get no reply.

If helps sent email to woied creator to check his database for weather codes. if he restarts it let you lot know

User avatar
ANeon20
EGG
Posts: 36
Joined: April 28th, 2020, 3:26 pm

Re: Weather Update [SOLVED]

Postby ANeon20 » May 24th, 2020, 11:31 am

MrniceAngel74 wrote:already tried this created an account on website you provided got a api key replaced relevant info. re-opened txt file in notecard++ and saved as a VBS added command line to Mark 2 and I get no reply.

If helps sent email to woied creator to check his database for weather codes. if he restarts it let you lot know

Does the script show any error?
Also are you sure your key has been activated?
ANeon.Peter :geek:


Return to “Scripting”

Who is online

Users browsing this forum: No registered users and 2 guests