home *** CD-ROM | disk | FTP | other *** search
/ PC World 1999 February / PCWorld_1999-02_cd.bin / software / Zkuste / WinBat98 / DOLLARS.WB_ < prev    next >
Text File  |  1996-01-05  |  3KB  |  94 lines

  1. goto doit
  2. [buckdata]
  3. Argentina(Pesos)=1.01
  4. Australia(Dollars)=0.7145
  5. Austria(Shilling)=0.0808
  6. Belgium(Franc)=0.02755
  7. Brazil(Cruzeiro Real)=0.002
  8. England(Pound)=1.4825
  9. Canada(Dollar)=0.7439
  10. France(Franc)=0.16764
  11. German(Mark)=0.5682
  12. HongKong(Dollar)=0.12932
  13. Italy(Lira)=0.0005894
  14. Japan(Yen)=0.009195
  15. Mexico(Peso)=0.322165
  16. Netherlands(Guilder)=0.5072
  17. NewZealand(Dollar)=0.573
  18. Norway(Krone)=0.1325
  19. Singapore(Dollar)=0.6288
  20. SouthAfrica(Rand)=0.22
  21. Spain(Peseta)=0.007033
  22. Sweden(Krona)=0.1253
  23. Switzerland(Franc)=0.6803
  24. Taiwan(Dollar)=0.037836
  25.  
  26.  
  27. [dummy]
  28. ; NOTE:  This is an example of a self-referencing WBT file that CANNOT BE COMPILED
  29. ; with the WinBatch Compiler.  To be able to compile something like this, the currency
  30. ; exchange table must be moved to another file.
  31. :doit
  32. Message("Currency Converter","This file converts between US and International Currencies.%@CRLF%It is only as accurate as the table embedded in the WBT file.%@CRLF%Review table and update from time to time from your local newspaper.")
  33.  
  34. Decimals(2)
  35. tab=num2char(9)
  36. OrigDir=DirGet()
  37. IniFile=strcat(OrigDir,"Intl Money Conversions.wbt")
  38. if WinMetrics(-4)<4 then IniFile=strcat(Origdir,"DOLLARS.WBT")
  39. MucksFormat=`WWWDLGED,5.0`
  40.  
  41. MucksCaption=`Buck Basher`
  42. MucksX=67
  43. MucksY=66
  44. MucksWidth=247
  45. MucksHeight=130
  46. MucksNumControls=8
  47.  
  48. Mucks01=`4,2,90,122,ITEMBOX,Countries,DEFAULT`
  49. Mucks02=`170,10,64,DEFAULT,EDITBOX,Bucks,""`
  50. Mucks03=`110,10,60,DEFAULT,STATICTEXT,DEFAULT,"Enter Amount"`
  51. Mucks04=`100,108,124,DEFAULT,PUSHBUTTON,DEFAULT,"&Quit",0`
  52. Mucks05=`100,90,124,DEFAULT,PUSHBUTTON,DEFAULT,"Foreign currency to US $",2`
  53. Mucks06=`100,72,124,DEFAULT,PUSHBUTTON,DEFAULT,"US $ to Foreign currency",1`
  54. Mucks07=`100,32,130,DEFAULT,VARYTEXT,stat1,"Da France money is worth"`
  55. Mucks08=`100,46,132,DEFAULT,VARYTEXT,stat2,"us buck two 95"`
  56.  
  57. BigList=IniItemizePvt("buckdata",IniFile)
  58. stat1=""
  59. stat2=""
  60.  
  61. :top
  62.  
  63. Countries=BigList
  64.  
  65.  
  66. ButtonPushed=Dialog("Mucks")
  67. ;i=strtrim(ItemCount("Countries",tab))
  68. where=ItemExtract(1,Countries,tab)
  69. if where==""
  70.     Message("Bucks","Must just choose one country at a time")
  71.     goto top
  72. endif
  73.  
  74. if !IsNumber(Bucks)             
  75.      Message("Bucks","No value entered")
  76.      goto top
  77. endif
  78.  
  79. DaRate=IniReadPvt("buckdata",where,99999,IniFile)
  80.  
  81. switch ButtonPushed
  82.     case 1     ;US$ to foreign
  83.        Ducks=Bucks/DaRate          
  84.        stat1="US$ %Bucks% is worth"
  85.        stat2="%Ducks% in %where%"  
  86.        break                       
  87.     case 2     ; Foreign to US$
  88.        Ducks=Bucks*DaRate
  89.        stat1="%where% %Bucks% is worth"
  90.        stat2="%Ducks% in US Dollars"
  91.        break
  92. endswitch       
  93. goto top
  94.