gnokiiを使用してSMSを送信しています。
私のVBコード:
Dim xCmd As String
xCmd = "cmd.exe /c echo msgcontent "| c:\gnokii\gnokii.exe --sendsms 12345678"
Shell(xCmd)
注意点:
出力を.txtファイルにリダイレクトしようとしましたが、.txtファイルが空のようです。さらに、プログラムは毎秒複数のSMSを送信する必要がある場合があるため、.txtを作成することはできません。
gnokii.exeが実行されているかどうかを確認する必要があるため、Process.Start()は実行できません。
SMSが正常に送信されたかどうかを確認するための出力が必要です。
(以下のコード)を使用してみましたが、どちらも機能しませんでした。出力は表示されませんでした。
関数exe(ByVal fileName、ByVal args)
Dim p As Process = New Process Dim output As String With p .StartInfo.CreateNoWindow = True .StartInfo.UseShellExecute = False .StartInfo.RedirectStandardOutput = True .StartInfo.FileName = fileName .StartInfo.Arguments = args .Start() output = .StandardOutput.ReadToEnd End With Return output
終了機能