What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Release] - Currency Converter

[Release] - Currency Converter
Author: Message:
Montago
Junior Member
**


Posts: 25
Joined: Sep 2006
O.P. [Release] - Currency Converter
This nifty script will let you convert currencies on the fly

the best part, is that the currencies are gotten from the danish national bank, that are updated each day (nice aint it ?)

however the long names of the currencies are therefore danish... but i think you can handle it :)

/Currency
^ this function takes 2 or 3 arguments: 1st the amount, 2nd The 'from' currency and the optional 3rd 'to' currency

all currency arguments are ISO (except that €, $ and £ also works)

examples:
/Currency 100 USD GBP <-- converts USD to Pound Sterling
/Currency 250 USD <-- note that the default output is Danish Kroner

the result are shown in a toast window

Also /Currency_Available will show what currencies are available

While typing a messege, you may write [250 USD] or [300 USD GBP] which then converts the 'boxed' expression... the first will output xx DKR, the second xxx GBP


download here: http://www.mdk-photo.com/MSNScripts/Currency.plsc

This post was edited on 10-03-2006 at 02:00 PM by Montago.
10-03-2006 12:03 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [Release] - Currency translator
nice idea for script...

But, the commands aren't reconized as commands!

Also, are you sure you use the correct convertions? They do not seem right to me, at least after cross referencing them with other currency converters. Make sure you do not use exchange units, but currency convertion units. They are different! Exchange units are the units that banks charge you (they always charge you more than the actual convertion)


Tip: add a GUI where you can select your default output currency (this can be even in the form of an submenu of the Plus! icon in the main contactlist (like a global setting) and convo window (like a temporary setting) where you simply tick the currency of your choice).

Tip: Use http://www.xe.com/ for all your currency converting, it contains every possible currency there is (more than 180 currencies in over 250 geographical locations) and is updated every minute!

Tip: for your symbols look at http://www.xe.com/symbols.htm

Tip: for(i=0;i<arr.length;i++) {} isn't needed with arrays you can simply do for(i in arr) {}


This post was edited on 10-03-2006 at 06:31 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-03-2006 06:00 AM
Profile PM Find Quote Report
Montago
Junior Member
**


Posts: 25
Joined: Sep 2006
O.P. RE: [Release] - Currency translator
xe.com charge for their Currency XML Table... so i dropped them as my reference...

i know im not using exhange rates, and instead bank rates... however, i could put on 5% on each currency, to make it more real...

How are the commands not recognized as a commad ??

Ill make the option for default output currency, ill make it not temporary, but saved in a file...

i need help on the GUI... however i believe that /Currency_output would be enough...


thanks for your tips :)
10-03-2006 09:29 AM
Profile E-Mail PM Find Quote Report
Underlord
Veteran Member
*****

Avatar

Posts: 1037
Reputation: 40
36 / Male / Flag
Joined: Jul 2003
RE: [Release] - Currency translator
It should be called currency converter. One cannot translate currency unless they are translating the text on the currency.
10-03-2006 10:08 AM
Profile E-Mail PM Find Quote Report
Montago
Junior Member
**


Posts: 25
Joined: Sep 2006
O.P. RE: [Release] - Currency Converter
*Renamed to Currency converter
10-03-2006 02:00 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: [Release] - Currency translator
quote:
Originally posted by Montago
xe.com charge for their Currency XML Table... so i dropped them as my reference...
you don't need to use the XML table though, you can use their (very easy to use) forms...

quote:
Originally posted by Montago
How are the commands not recognized as a commad ??
when you have entered the command the usuall "this isn't reconized as a command, if you meant to send text, put a double // in front of it" message appears. This is because you do not make it clear to the ChatWndSendMessage event that you have handled the text. In other words, return a value (in this case an empty string) if you have handled the command.

quote:
Originally posted by Montago
Ill make the option for default output currency, ill make it not temporary, but saved in a file...
No, I didn't meant that. Read carefully what I suggested ;) (or slap me for being not so clear instead :p your choice :D)

What I meant was: provide a way to set a default output option (you got that). But you do not need a full blown GUI for this. You can easly use the submenus for this, since it only will be a selection from a list anyways.

The way you could implement it is to let the user select his global default output via the contactlist Plus! menu.

And as a added feature, you can let the user select another temporary currency output via the plus! menu in a conversation window. But this selection would only be temporary for that specific convo window. Aka: it will overwrite the global default setting.

EDIT: forget about the above... You can't have menu items ticked with a tickmark in Plus! (something for Patchou to add? Will be used a lot if it was available I'd imagine). I assumed you could have menu items ticked...

---------------

Also, whatever you do, don't save it in a file, save it in the registry. Using a file for only 1 settings is a bit over the top.

This post was edited on 10-03-2006 at 06:19 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-03-2006 05:07 PM
Profile PM Find Quote Report
jameslives
Full Member
***

Avatar

Posts: 232
Reputation: 3
Joined: Aug 2004
RE: [Release] - Currency Converter
this sounds a nice idea for a script
but ill wait until improvements are made before i use it
[Image: jmzsigsmall3dd.gif]
10-04-2006 07:37 PM
Profile PM Find Quote Report
Montago
Junior Member
**


Posts: 25
Joined: Sep 2006
O.P. [Update]
/Currencies_Set_Default
will let you set the default global output... however you need to do this everytime you start messenger :( since i dont know how to adjust Registry values... maybe another day :)


The error message is gone


just download the script again from my first link

This post was edited on 10-10-2006 at 08:53 PM by Montago.
10-10-2006 08:51 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On