求助:vb 与网页,快捷方式,  API

bestcoolyang 2010-05-06 02:04:52
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Dim nfile As Integer

Private Sub Command1_Click()
Call SMS("1111111111", "你好")
End Sub

Private Sub Form_Load()
nfile = FreeFile
Open App.Path & "\FetionAPI.url" For Output As #nfile
Print #nfile, "[internetshortcut]"


End Sub
'//////////////////////FetionApi功能函数
Private Function SMS(ByVal recnumb As String, ByVal message As String)
Print #nfile, "url=https://fetionAPI.appspot.com/apifrom=22222222222&pw=fetion2010" & "to=" & " '" & recnumb & "' " & "msg =" & " ' " & message & " '"
appurl = App.Path & "\https://fetionAPI.appspot.com/apifrom=& 222222222222 & pw = fetion2010" & "to=" & " '" & recnumb & " ' " & "msg=" & " ' " & message & " '"
appurl = App.Path & "\appurl = FetionAPI"
lr = ShellExecute(hwnd, "post", appurl, "", "", vbNormalFocus)
If (lr < 0) Or (lr > 32) Then
MsgBox "成功打开"
Else
MsgBox "无法打开链接", vbinfomation
End If
End Function

我想在 建立的快捷方式的名字里用参数,用来给不同的号码发送信息。在运行后生成的快捷方式打开后地址栏里的内容是https://fetionapi.appspot.com/apifrom=22222222222&pw=fetion2010to=%20'15225918247'%20msg%20=%20'%20你好%20'


我不知道是不是建立快捷方式时的 & 用错了 导致在地址栏中出现 %20' 这个符号。用的是Fetion的API,网页返回信息是:系统不知道你要做什么


大家帮我看看
...全文
32 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复

1,502

社区成员

发帖
与我相关
我的任务
社区描述
VB 网络编程
社区管理员
  • 网络编程
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧