Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to change the code to QM code
#3
Hi Gintaras, thanks for your quickly support,
but I fail on other step.
the VB source code is as below:

VERSION 5.00
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "VB調用例子"
ClientHeight = 3090
ClientLeft = 45
ClientTop = 330
ClientWidth = 4905
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3090
ScaleWidth = 4905
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command6
Caption = "Send"
Height = 375
Left = 2640
TabIndex = 8
Top = 2280
Width = 975
End
Begin VB.CommandButton Command5
Caption = "Command5"
Height = 375
Left = 3840
TabIndex = 7
Top = 2400
Width = 975
End
Begin VB.CommandButton Command4
Caption = "Command4"
Height = 375
Left = 3840
TabIndex = 6
Top = 2040
Width = 975
End
Begin VB.CommandButton Command3
Caption = "Command3"
Height = 375
Left = 3840
TabIndex = 5
Top = 1680
Width = 975
End
Begin VB.CommandButton Command2
Caption = "Command2"
Height = 375
Left = 3840
TabIndex = 4
Top = 1320
Width = 975
End
Begin VB.CommandButton Command1
Caption = "截圖發送題目"
Height = 360
Left = 720
TabIndex = 3
Top = 2280
Width = 1320
End
Begin VB.TextBox Text1
Height = 300
Left = 840
TabIndex = 1
Text = "13663496867HHMGG5FLQ3N5LUBQ100"
Top = 120
Width = 3960
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 100
Left = 120
Top = 2640
End
Begin VB.ListBox List1
Height = 1500
Left = 120
TabIndex = 0
Top = 600
Width = 4695
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "驗證串:"
Height = 195
Left = 120
TabIndex = 2
Top = 180
Width = 585
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'可以改成API調用,見 Command6_Click
'順逸代答QQ技術群:210412674
Private Declare Function Send Lib "sydt.dll" (ByVal c1 As String, Optional ByVal c2 As String = "gif") As String
Dim sydt As Object
Dim TID As Variant

Private Sub Command2_Click()
MsgBox sydt.Send("charge/username/324166166/password/000000/cards/1366698708OXGULUXXXXXXZWVL0NJF")
End Sub

Private Sub Command3_Click()
MsgBox sydt.Send("register/username/324166166/password/000000/author/324166166/xtime/3/note/備註信息")
End Sub

Private Sub Command4_Click()
MsgBox sydt.Send("login/myapi/1366698708OXGULUXXXXXXZWVL0NJF/mode/1")
End Sub

Private Sub Command5_Click()
MsgBox sydt.Send("getpoints/username/324166166/password/000000")
End Sub

Private Sub Form_Load()
' Shell "regsvr32 /s sydt.dll"
' Set sydt = CreateObject("sy.dt")
End Sub

Private Sub Form_Unload(Cancel As Integer)
Set sydt = Nothing
End Sub

Private Sub Command1_Click() '發送截圖
'sydt.CaptureGif 0, 0, 200, 200, "C:\1.gif"
TID = sydt.Send("sendvcode/myapi/" + Text1.Text + "/type/10001/timeout/30/note/備註", App.Path + "\驗證截圖.jpg")
List1.AddItem TID
If Left(TID, 1) <> "E" Then
Timer1.Enabled = True
End If
List1.ListIndex = List1.ListCount - 1
End Sub

Private Sub Command6_Click()
MsgBox Send("sendvcode/myapi/" + Text1.Text + "/type/10001/timeout/30/note/備註", App.Path + "\驗證截圖.jpg")
End Sub

Private Sub Timer1_Timer() '獲取答案
Dim Answer As String
Answer = sydt.Send("getanswer/id/" & TID)
List1.AddItem Answer
If Left(Answer, 7) <> "WAITING" Then
List1.ListIndex = List1.ListCount - 1
Timer1.Enabled = False
End If
End Sub


I have modified QM code, I encountered the problem, it occurs in "left(ID, 1)", it show the error message is that "unknown identifier".
Could you show me about your advice on my complete QM code and my error, because I am a novice on QM, thanks. I still have a lot to learn about QM...


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)