A script for stocks I used to work with a script that was not reserved _seraphzone

Source: Internet
Author: User
Tags reserved
Copy Code code as follows:

# define global variables here
Dim digitimgs[10], Digitimgs1[10], digitimgs2[10]
Function Main
While true//infinite loop executes the following code
# Add code created or recorded by the wizard here
Mouseleftclick (917, 665)
Wait (300)
Mouseleftclick (836, 293)
Wait (3000)
① began copying stock names
Take the window origin coordinates
Getactivewindowxy (WinX0, WinY0)
Press the left mouse button at the window coordinates (143, 156)
MouseMove (winx0+143, winy0+156)
Mouseleftdown ()
Wait (300)
Release the left mouse button at the window coordinates (81, 160)
MouseMove (winx0+81, winy0+158)
Mouseleftup ()
Wait (200)
Right-click in window coordinates (109, 155)
MouseMove (winx0+109, winy0+155)
Mouserightclick ()
Wait (200)
KeyPress ("C")
Wait (200)
Click the left mouse button in screen coordinates (101, 647)
Mouseleftclick (101, 647)
Wait (200)
Right-click in screen coordinates (331, 345)
Mouserightclick (331, 345)
Wait (200)
KeyPress ("P")
Wait (200)
Click the left mouse button at the window coordinates (602, 512)
MouseMove (winx0+318, winy0+249)
Mouseleftclick ()
Wait (200)
② Start copying Stock code
In window coordinates (109, 106) Double-click the left mouse button
MouseMove (winx0+109, winy0+106)
Mouseleftclick ()
Wait (200)
MouseMove (winx0+109, winy0+106)
Mouseleftclick ()
Wait (200)
Right-click in window coordinates (111, 105)
MouseMove (winx0+111, winy0+105)
Mouserightclick ()
Wait (100)
KeyPress ("C")
Wait (100)
Click the left mouse button in screen coordinates (109, 645)
Mouseleftclick (109, 645)
Wait (100)
Right-click in screen coordinates (351, 380)
Mouserightclick (351, 380)
Wait (100)
KeyPress ("P")
③ Start Replication Diagnostics
Wait (100)
Press the left mouse button at the window coordinates (528, 300)
MouseMove (winx0+528, winy0+300)
Mouseleftdown ()
Wait (100)
Release the left mouse button at the window coordinates (520, 263)
MouseMove (winx0+520, winy0+263)
Mouseleftup ()
Wait (100)
If the color of the window coordinates (111, 290) is equal to (49, 106, 197) Then
If Checkcolor (winx0+111, winy0+290, Color (Wuyi,), 5) Then
Wait (100)
MouseMove (winx0+111, winy0+290)
Mouserightclick ()
KeyPress ("C")
else//otherwise
Beep (784,0319)
Beep (784,0160)
Beep (880,0284)
Beep (578,0421)
Beep (523,0478)
Beep (523,0239)
Beep (440,0142)
Beep (578,0421)
Beep (784,0319)
Beep (784,0319)
Beep (880,0142)
Beep (1046,0120)
Beep (880,0142)
Beep (784,0160)
Beep (523,0239)
Beep (440,0284)
Beep (578,0421)
End If
Wait (100)
④ in text modification diagnostics symbol
Click the left mouse button in screen coordinates (802, 77)
Mouseleftclick (802, 77)
Wait (100)
KeyDown ("CTRL")
KeyPress ("V")
KeyPress ("H")
KeyPress ("Space")
KeyUp ("CTRL")
KeyPress (";")
KeyPress ("tab")
KeyDown ("CTRL")
KeyPress ("Space")
KeyUp ("CTRL")
KeyPress (";")
KeyDown ("alt")
KeyPress ("a")
KeyUp ("alt")
KeyPress ("ESC")
KeyDown ("CTRL")
KeyPress ("H")
KeyPress ("Space")
KeyUp ("CTRL")
KeyPress (",")
KeyPress ("tab")
KeyDown ("CTRL")
KeyPress ("Space")
KeyUp ("CTRL")
KeyPress (",")
KeyDown ("alt")
KeyPress ("a")
KeyUp ("alt")
KeyPress ("ESC")
KeyDown ("Ctrl")
KeyPress ("a")
KeyPress ("x")
KeyUp ("CTRL")
Click the left mouse button in screen coordinates (106, 630)
Mouseleftclick (106, 630)
Wait (100)
Right-click in screen coordinates (381, 492)
Mouserightclick (381, 492)
KeyPress ("P")
Wait (100)
Read the image file of the number 0-9 to the array
LoadImage ("H1.") Sel ", Digitimgs[1])
LoadImage ("H2.") Sel ", digitimgs[2])
LoadImage ("H3.") Sel ", Digitimgs[3])
LoadImage ("H4.") Sel ", Digitimgs[4])
LoadImage ("H5.") Sel ", Digitimgs[5])
LoadImage ("h6.") Sel ", Digitimgs[6])
LoadImage ("H7.") Sel ", Digitimgs[7])
LoadImage ("H8.") Sel ", Digitimgs[8])
LoadImage ("H9.") Sel ", digitimgs[9])
LoadImage ("H0.") Sel ", digitimgs[10])

LoadImage ("1.Sel", Digitimgs1[1])
LoadImage ("2.Sel", digitimgs1[2])
LoadImage ("3.Sel", Digitimgs1[3])
LoadImage ("4.Sel", Digitimgs1[4])
LoadImage ("5.Sel", Digitimgs1[5])
LoadImage ("6.Sel", Digitimgs1[6])
LoadImage ("7.Sel", Digitimgs1[7])
LoadImage ("8.Sel", Digitimgs1[8])
LoadImage ("9.Sel", Digitimgs1[9])
LoadImage ("0.Sel", digitimgs1[10])

LoadImage ("B1.") Sel ", digitimgs2[1])
LoadImage ("B2.") Sel ", digitimgs2[2])
LoadImage ("B3.") Sel ", Digitimgs2[3])
LoadImage ("B4.") Sel ", Digitimgs2[4])
LoadImage ("B5.") Sel ", Digitimgs2[5])
LoadImage ("B6.") Sel ", Digitimgs2[6])
LoadImage ("B7.") Sel ", Digitimgs2[7])
LoadImage ("B8.") Sel ", Digitimgs2[8])
LoadImage ("B9.") Sel ", digitimgs2[9])
LoadImage ("B0.") Sel ", digitimgs2[10])

A function can only be defined outside of a function, and then use the calling statement, and the order in which the function is defined does not matter:
MyFunc ()//Call MyFunc
Wait (100)
Run the program "D:\Seraph Practice \x.txt"
RunApp ("D:\Seraph Practice \1\x.txt")
Wait (800)

KeyDown ("CTRL")
KeyPress ("a")
Wait (100)
KeyPress ("x")
KeyPress ("s")
KeyUp ("CTRL")
If the image "output text icon. Sel" appears at this time
If Findimageex (output text icon. Sel, Color (Ten, ten), 372, 356, 928, 710, True, Foundx, Foundy) Then
Click the mouse on the image (5, 5) position
Mouseleftclick (foundx+5, foundy+5)
End If
Wait (100)
Click the left mouse button in screen coordinates (109, 640)
Mouseleftclick (109, 640)
Right-click in screen coordinates (343, 443)
Mouserightclick (343, 443)
Wait (600)
KeyPress ("P")
Wait (100)
KeyPress ("left")
KeyPress ("left")
KeyPress (".")
KeyPress ("return")
Wait 2 milliseconds
Wait (2000)
KeyPress ("return")
Wait 5 milliseconds
Wait (2000)
Click the left mouse button in screen coordinates (910, 654)
Mouseleftclick (910, 654)
Wait (100)
KeyPress ("Down")
Click the left mouse button at the window coordinates (546, 57)
Mouseleftclick (winx0+546, winy0+57)


wend//Unlimited loop execution of the above code
End Function
function MyFunc
If Readnumber (Digitimgs, 974, 523, 1017, 540, True, Num) then
At this point, if the read succeeds, the number is saved in the variable Num
Print ("Find image" &num)
Writetexttofile ("X.txt", CStr (Num), true)
Exit Function//exit functions, run the following script go to the
End If

Continue to recognize green numbers if you fail
If Readnumber (DIGITIMGS1, 974, 523, 1017, 540, True, Num) then
At this point, if the read succeeds, the number is saved in the variable Num
Print ("Find image" &num)
Writetexttofile ("X.txt", CStr (Num), true)
Exit Function//exit functions, run the following script go to the
End If

The white number continues to be recognized as a failure
If Readnumber (DIGITIMGS2, 974, 523, 1017, 540, True, Num) then
At this point, if the read succeeds, the number is saved in the variable Num
Print ("Find image" &num)
Writetexttofile ("X.txt", CStr (Num), true)
Exit Function//exit functions, run the following script go to the
End If
Todo
Call the police if you fail
Beep (784,0319)
Beep (784,0160)
Beep (880,0284)
Beep (578,0421)
Loop

End Function
# Add child functions here

This script has helped me for nearly half a year hahaha
I don't need this now, but I still keep it. haha haha haha

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.