最后
enter code here
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim arg As String
arg = " -X POST -H ""Authorization: Bearer LINE TOKEN HERE"" -F ""message=TEST"" -F ""imageFile=@C:\charts\PIC.png"" https://notify-api.line.me/api/notify"
ShellandWait("curl.exe", arg)
End Sub
Public Sub ShellandWait(ByVal ProcessPath As String, ByVal Arguments As String)
Dim objProcess As System.Diagnostics.Process
Try
objProcess = New System.Diagnostics.Process()
objProcess.StartInfo.Arguments = Arguments
objProcess.StartInfo.FileName = ProcessPath
objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
objProcess.Start()
Application.DoEvents()
objProcess.WaitForExit()
Application.DoEvents()
Console.WriteLine(objProcess.ExitCode.ToString())
objProcess.Close()
Catch ex As Exception
MsgBox("Could not start process " & ProcessPath & " " & ex.StackTrace.ToString)
End Try`
End Sub
答案 0 :(得分:1)
这不是答案,但是由于我目前的声誉,我无法发表评论。我感到有必要通知您,链接的图像中被遮挡的代码未正确隐藏。有可能阅读前一篇。我建议您始终使用完全不透明的笔刷隐藏重要信息。
我知道这不是通常在StackOverflow上发送信息的方式,但是在这种情况下,这个人的隐私比常规的更为重要。
答案 1 :(得分:0)
您是否尝试过以下方法:
for activity in activities
{
if activity.actions != nil
{
for action in activity.actions
{
if action.date == today
{
// add activity to filtered array
}
}
}
}
或者,您也可以尝试以下操作:
Dim prc as Process
prc = New Process
prc = Process.Start([YourBatchFileLocation])
prc = Nothing