![]() |
在這個頁面顯示本主題全部的 6 個文章 |
奇狐社區論壇 (http://www.chiefox.com.tw/bbs/index.php)
- 問題交流 (http://www.chiefox.com.tw/bbs/forumdisplay.php?forumid=28)
-- [問題]關於第一個程式語法。 (http://www.chiefox.com.tw/bbs/showthread.php?threadid=19765)
[問題]關於第一個程式語法。
如題,要寫第一個程式語法,這個語法主要是傳送 http req。
想請問如何把下面這段寫進奇狐,因為我貼上去然後編譯,出現如圖(附件)的錯誤。
Dim strURL As String = ""
Dim user As String = "*??*"
Dim password As String = "*??*"
Dim m_num As String = "*????*"
Dim message As String = "*????*"
strURL = "http://api.twsms.com/send_sms.php?username=" & user _
& "&password=" & password & "&type=now&encoding=big5&mobile=" & m_num _
& "&message=" & message & "&vldtme=3600"
Dim myHttpWebRequest As HttpWebRequest
Dim myHttpWebResponse As HttpWebResponse
Try
myHttpWebRequest = CType(WebRequest.Create(strURL), HttpWebRequest)
myHttpWebResponse = CType(myHttpWebRequest.GetResponse(), HttpWebResponse)
GetResponseData(myHttpWebResponse.GetResponseStream())
myHttpWebResponse.Close()
Catch ex As Exception
End Try
程式 : https://gist.github.com/anonymous/37f285cd13fcfa43d85b
另外,有沒有考慮使用 javascript vm? 比 vbs 好寫多了。
奇狐的 api 應該都開好了,應該可以拆出來接 js ?
感謝。
回覆: [問題]關於第一個程式語法。
引用:
最初由 kvh 發表
如題,要寫第一個程式語法,這個語法主要是傳送 http req。
想請問如何把下面這段寫進奇狐,因為我貼上去然後編譯,出現如圖(附件)的錯誤。
Dim strURL As String = ""
Dim user As String = "*??*"
Dim password As String = "*??*"
Dim m_num As String = "*????*"
Dim message As String = "*????*"
strURL = "http://api.twsms.com/send_sms.php?username=" & user _
& "&password=" & password & "&type=now&encoding=big5&mobile=" & m_num _
& "&message=" & message & "&vldtme=3600"
Dim myHttpWebRequest As HttpWebRequest
Dim myHttpWebResponse As HttpWebResponse
Try
myHttpWebRequest = CType(WebRequest.Create(strURL), HttpWebRequest)
myHttpWebResponse = CType(myHttpWebRequest.GetResponse(), HttpWebResponse)
GetResponseData(myHttpWebResponse.GetResponseStream())
myHttpWebResponse.Close()
Catch ex As Exception
End Try
程式 : https://gist.github.com/anonymous/37f285cd13fcfa43d85b
另外,有沒有考慮使用 javascript vm? 比 vbs 好寫多了。
奇狐的 api 應該都開好了,應該可以拆出來接 js ?
感謝。
那如果要做到上述程式,在 vbs 裡如何處理呢?
有沒有可以用其他語法寫? 比如 vb, js?
引用:
最初由 kvh 發表
那如果要做到上述程式,在 vbs 裡如何處理呢?
有沒有可以用其他語法寫? 比如 vb, js?
那有奇狐 vbs reference 嗎?
你說 vbs, 這應該是 vbs 了?
http://stackoverflow.com/questions/...lines-to-a-file
但一樣是無法編譯的。
引用:
最初由 kvh 發表
那有奇狐 vbs reference 嗎?
你說 vbs, 這應該是 vbs 了?
http://stackoverflow.com/questions/...lines-to-a-file
但一樣是無法編譯的。
| 全部時間均為台灣時間, 現在時間為08:57 | 在這個頁面顯示本主題全部的 6 個文章 |
Powered by: vBulletin Version 2.3.0 - Copyright©2000-, Jelsoft Enterprises Limited.
簡愛洋行 製作 Copyright 2003-. All Rights Reserved.