国产探花免费观看_亚洲丰满少妇自慰呻吟_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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 阳东县| 洛南县| 会泽县| 沁源县| 海门市| 新巴尔虎右旗| 阳春市| 铁岭市| 澄城县| 黄龙县| 全椒县| 韶关市| 柳州市| 区。| 崇文区| 七台河市| 厦门市| 宣城市| 庆阳市| 武强县| 定结县| 安吉县| 神木县| 鄂托克前旗| 台湾省| 平阳县| 陆河县| 海晏县| 阿瓦提县| 乌拉特后旗| 崇阳县| 荔浦县| 德钦县| 丽水市| 铁岭市| 海南省| 南江县| 固安县| 上饶市| 平江县| 内江市|