Gadget Currency Meter

Status
Not open for further replies.

BFG-9000

Respectable
Sep 17, 2016
167
0
2,010
65
5 years ago Microsoft found unsolvable security issues with Gadgets and discontinued them. It's probably perfectly safe to use the ones included with Windows but a currency gadget that has its own direct internet connection to a 3rd party sounds like bad news.

However even the included ones would occasionally malfunction, particularly the CPU meter. The fix was to remove them all and reboot, then re-enable them.
 

freebeerjkt

Prominent
Dec 23, 2017
12
0
560
0
There is no solution unless the developer updates. The currencies were based on Yahoo data but Yahoo changed their servers so no data anymore. If anyone comes up with a good alternative please post here.
 

81kab

Prominent
Jan 12, 2018
6
0
510
0
Hi there, I want to share my workaround for this issue.

First, when looking through the gadget code I noticed that it use 3rd-party service (Yahoo) to retrieve currency values. But unfortunately Yahoo has closed that service ( https://forums.yahoo.net/t5/Yahoo-Finance-help/http-download-finance-yahoo-com-d-quotes-csv-s-GOOG-amp-f/td-p/387096 ).

I decided to use Google Spreadsheets where it is possible to use GoogleFinance() function and export the spreadsheet to CSV file. In my case, I'm going to track USD/RUB and EUR/RUB pairs. I think you could easily replace them with yours.

Step 1.
Create a new google spreadsheet. First column should contain your currency pairs divided by "/" symbol. Second column will have results of GoogleFinance() calculation.

Step 2.
Fill the table. For example, this is my table:

Currencies will update automatically.

Step 3.
Go to menu and select "File" -> "Publish to Web". Next shoose CSV format and click "Publish".
You will get a URL, something like https://docs.google.com/spreadsheets/.../pub?gid=0&single=true&output=csv . Save it to a safe place.

Step 4.
Now we will need to change URL in the gadget's code.
Go to folder C:\Users\[your user name]\AppData\Local\Microsoft\Windows Sidebar\Gadgets\Currency_Meter.gadget\

Find a file called "gadget.js" and open it with a text editor, e.g. Notepad.
You will see a lot of minified code, copy all the code and paste it to http://unminify.com/ . Click "Unminify".
Next, replace all minified code with unminified one. Save the gadget.js file.

Step 5.
In the gadget.js file find definition of function getData() (line #1393 for me). Replace all the code inside the curly brackets with this code:
JavaScript:
getDataURL('YOUR URL FROM STEP 3');
Where you should paste URL from the Step 3 inside the brackets.

In my case:


Next, save the file.

Step 6.
Now you will need to disable the Currency Meter gadget and then enable it again. If everything goes well, you will see it is working again!



Feel free to ask any questions, I will try to help.
 

freebeerjkt

Prominent
Dec 23, 2017
12
0
560
0


Thanks so much for your kind help. I will give this a try.
Best regards.
 

freebeerjkt

Prominent
Dec 23, 2017
12
0
560
0


 

freebeerjkt

Prominent
Dec 23, 2017
12
0
560
0
OK, I looked at this but a few problems.
1) There is a cost to use Google Spreadsheets, subscription which I don't really want to do. A one time small fee would not be bad but subscription means forever. Is there any way that Microsoft Office Excel can be used ?.
2) I found the file called "gadget.js" and opened it with Windows 10 Notepad. But I just get a huge amount of text, too hard to work with and no line numbers. Also tried to open with NotePad++ but then I just get a very long single line of text. Line 1.
 

81kab

Prominent
Jan 12, 2018
6
0
510
0


1) Weird, I didn't pay anything for Google Spreadsheets. Just used my regular Google account and created a table here: https://docs.google.com/spreadsheets/u/0/ . MS Office Excel can't be used for that case.
2) Use unminify tool, as I descriibed on Step 4: http://unminify.com/ . This tool will make the code more readable.

 

freebeerjkt

Prominent
Dec 23, 2017
12
0
560
0


 

freebeerjkt

Prominent
Dec 23, 2017
12
0
560
0
OK, many thanks again and sorry that I previously overlooked the part about using the unminify tool. Now I got it working but in my case I live in Indonesia, currency is IDR (Indonesian Rupiah). There are other currencies in the region that I want to see too. Converting from USD to Singapore $ is working perfectly but for some unknown reason anything I try to convert using IDR the currency meter just shows NaN and I have no idea what that means. Using the Google sheet the currency IDR is working fine. I could show you a screen shot but I have no idea how to add a picture here ?.


 

81kab

Prominent
Jan 12, 2018
6
0
510
0


I just tried to add IDR to my list and it works for me:





Hope these screenshots would be useful.
 

freebeerjkt

Prominent
Dec 23, 2017
12
0
560
0


 

freebeerjkt

Prominent
Dec 23, 2017
12
0
560
0
How to add pictures to these pots and I can show you better. Manybe I need to uninstall and just start again with a fresh install ?.
Cheers,
Tony.
 

81kab

Prominent
Jan 12, 2018
6
0
510
0


Just upload your screenshot somewhere, copy the URL of the picture. When press Ctrl + P while typing a message and paste the URL. Press "OK".

 

81kab

Prominent
Jan 12, 2018
6
0
510
0


Ok I got it. You need to change numbers format. Should be dot "." instead of comma "," in the values.
E.g., 1.234 instead of 1,234

Open "File" -> "Table options". Under "Regional settings" choose United States and press "Save".

 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
R Apps General Discussion 1
C Apps General Discussion 12
P Apps General Discussion 3
M Apps General Discussion 1
S Apps General Discussion 4
apiltch Apps General Discussion 6
G Apps General Discussion 0
G Apps General Discussion 0
G Apps General Discussion 0
G Apps General Discussion 0
T Apps General Discussion 1
R Apps General Discussion 1
A Apps General Discussion 3
nimd4 Apps General Discussion 3
reynerd Apps General Discussion 2
T Apps General Discussion 1
T Apps General Discussion 2
thehiddenlotus Apps General Discussion 3
A Apps General Discussion 3
B Apps General Discussion 2

ASK THE COMMUNITY

TRENDING THREADS