炒股用的脚本 我上班作业时用的脚本 无保留

2019-11-07 12:52:07王冬梅

# 在此定义全局变量
dim DigitImgs[10], DigitImgs1[10], DigitImgs2[10]
function main
while true //无限循环执行以下代码
# 在此添加由向导创建或录制的代码
MouseLeftClick(917, 665)
Wait(300)
MouseLeftClick(836, 293)
Wait(3000)
//①开始复制股票名字
//取窗口原点坐标
GetActiveWindowXY(WinX0, WinY0)
//在窗口坐标(143, 156)按下鼠标左键
MouseMove(WinX0+143, WinY0+156)
MouseLeftDown()
Wait(300)
//在窗口坐标(81, 160)放开鼠标左键
MouseMove(WinX0+81, WinY0+158)
MouseLeftUp()
Wait(200)
//在窗口坐标(109, 155)单击鼠标右键
MouseMove(WinX0+109, WinY0+155)
MouseRightClick()
Wait(200)
KeyPress("c")
Wait(200)
//在屏幕坐标(101, 647)单击鼠标左键
MouseLeftClick(101, 647)
Wait(200)
//在屏幕坐标(331, 345)单击鼠标右键
MouseRightClick(331, 345)
Wait(200)
KeyPress("p")
Wait(200)
//在窗口坐标(602, 512)单击鼠标左键
mouseMove(WinX0+318, WinY0+249)
MouseLeftClick()
Wait(200)
//②开始复制股票代码
//在窗口坐标(109, 106)双击鼠标左键
MouseMove(WinX0+109, WinY0+106)
MouseLeftClick()
Wait(200)
MouseMove(WinX0+109, WinY0+106)
MouseLeftClick()
Wait(200)
//在窗口坐标(111, 105)单击鼠标右键
MouseMove(WinX0+111, WinY0+105)
MouseRightClick()
Wait(100)
KeyPress("c")
Wait(100)
//在屏幕坐标(109, 645)单击鼠标左键
MouseLeftClick(109, 645)
Wait(100)
//在屏幕坐标(351, 380)单击鼠标右键
MouseRightClick(351, 380)
Wait(100)
KeyPress("p")
//③开始复制诊断
Wait(100)
//在窗口坐标(528, 300)按下鼠标左键
MouseMove(WinX0+528, WinY0+300)
MouseLeftDown()
Wait(100)
//在窗口坐标(520, 263)放开鼠标左键
MouseMove(WinX0+520, WinY0+263)
MouseLeftUp()
Wait(100)
//如果窗口坐标(111, 290)的颜色等于(49, 106, 197) 那么
if CheckColor(WinX0+111, WinY0+290, Color(51, 94, 168), 5) then
Wait(100)
MouseMove(WinX0+111, WinY0+290)
MouseRightClick()
KeyPress("c")
else //否则
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)
//④在文本修改诊断符号
//在屏幕坐标(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")