VB 修改一个股票行情监测脚本 到了预定的股价就启动程序a.exe

2023-01-28 17:36:26 发布:网友投稿 作者:网友投稿
热度:26

Dim file1, file2 As String

Private Sub Command1_Click()

If Val(Text1.Text) Val(Text2.Text) Then Shell (file1)

'text2.text为大于这个值时 执行

If Val(Text1.Text) Val(Text3.Text) Then Shell (file2)

'text3.text为小于这个值时 执行

End Sub

Private Sub Command2_Click()

WebBrowser1.Navigate "" Text4.Text

End Sub

Private Sub Command3_Click()

CommonDialog1.DialogTitle = "选择路径"

CommonDialog1.ShowOpen

file1 = CommonDialog1.FileName

End Sub

Private Sub Command4_Click()

CommonDialog1.DialogTitle = "选择路径"

CommonDialog1.ShowOpen

file2 = CommonDialog1.FileName

End Sub

Private Sub Form_Load()

Timer1.Interval = 6000

End Sub

Private Sub Timer1_Timer()

WebBrowser1.Refresh

End Sub

Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)

If Not (pDisp Is WebBrowser1.object) Then Exit Sub

Dim wenben As String

Dim a() As String

wenben = Me.WebBrowser1.Document.Body.innerText

a = Split(wenben, vbCrLf)

Text1.Text = wenben

For i = 0 To UBound(a)

If InStr(a(i), "代码:") 0 And InStr(a(i), ".s") 0 Then

Text1.Text = Right(a(i), (Len(a(i)) - InStr(a(i), ".s")) - 2)

Text5.Text = Mid(a(i), InStr(a(i), ".s") + 1, 2)

Exit For

End If

Next i

End Sub

关于vb价格今日行情的内容到此结束,希望对大家有所帮助。

下一篇:java、c、c++、vc、vc++、vb 正版软件价格
上一篇:方便面如何做好吃(炒方便面怎么做视频)