' EUR-USD Rate on a Sticky Note
' Using Vbsedit's free Toolkit

Set http = CreateObject("Msxml2.XMLHTTP")
http.open"GET", "https://www.bloomberg.com/quote/EURUSD:CUR", FALSE
http.send""

data = http.responseText

pos1=InStr(data,"<span class=""priceText_")

If pos1>0Then
  pos2=InStr(pos1,data,""">")
  pos3=InStr(pos2,data,"</span>")
  If pos2>0And pos3>0Then
    rate = "1€=$" & Mid(data,pos2+2,pos3-pos2-2)
    
    Dim img
    Set img = WScript.CreateObject("Vbsedit.ImageProcessor")

    Set objShell = CreateObject( "WScript.Shell" )
    resourceLocation=objShell.ExpandEnvironmentStrings("%LOCALAPPDATA%") & "\Vbsedit\Resources\"
    
    img.Load resourceLocation & "dollar.png"
    'img.Resize 0.5
    img.FontFamily="Courier New"
    img.FontSize = 20
    h=img.TextHeight(rate)
    w=img.TextWidth(rate)
        
    x=(img.Width-w)/2
    y=(img.Height-h)/2
    img.Transparency=0.7
    img.Color="Black"
    img.DrawRectangle x,y,w,h

    img.Transparency=0
    img.Color="White"
    img.DrawText rate,x,y
    
   
    path = resourceLocation & "\currencyrate.png"
    img.Save path

    Set note = img.CreateStickyNote("eurusd",path)
    note.AddMenuOption"Refresh","wscript.exe //B """ & WScript.ScriptFullName & """"

  EndIf
EndIf



search for scripts

VbsEdit contains all these sample scripts!


Download Now!



Download   Home   Scripts

Copyright © 2001-2024 adersοft