国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > VBScript > 正文

使用vbs獲取雅虎匯率

2020-07-26 11:45:27
字體:
來源:轉載
供稿:網友

使用vbs獲取雅虎匯率

Function bytes2bstr(vin)  strreturn = ""  for i = 1 to lenb(vin)    thischarcode = ascb(midb(vin,i,1))    if thischarcode < &h80 then      strreturn = strreturn & chr(thischarcode)    else      nextcharcode = ascb(midb(vin,i+1,1))      strreturn = strreturn & chr(clng(thischarcode) * &h100 + cint(nextcharcode))      i = i + 1    end if  next  bytes2bstr = strreturnEnd FunctionFunction GetURL(url)  Set Retrieval = CreateObject("Microsoft.XMLHTTP")  With Retrieval    .Open "GET", url, False    .Send    GetURL = bytes2bstr(.responsebody)    if len(.responsebody)<2 then      strContent = "遠程通訊故障!"      Call LogToFile(strContent,1)    response.end    end if  End With  Set Retrieval = NothingEnd Function'========以上為自定義函數======== s1 = INPUTBOX("原始貨幣代碼:","請輸入原始貨幣代碼","USD")s2 = INPUTBOX("目標貨幣代碼:","請輸入目標貨幣代碼","CNY")s = s1&s2url = "http://download.finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s="&s&"=x"if s1<>"" and s2<>"" Then  huilv = GetURL(url)  MsgBox huilvEnd if

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 平舆县| 沁阳市| 龙陵县| 定结县| 峨山| 成武县| 武山县| 恩施市| 额济纳旗| 来凤县| 绥阳县| 津南区| 旌德县| 祁门县| 海安县| 富川| 达孜县| 武胜县| 龙口市| 新民市| 乌鲁木齐县| 汉沽区| 张家港市| 小金县| 松溪县| 开平市| 罗甸县| 淄博市| 平果县| 修文县| 雅安市| 将乐县| 衢州市| 蚌埠市| 赫章县| 余姚市| 宜丰县| 清丰县| 唐河县| 甘洛县| 鹤壁市|