请多多指教。画板请默认最大化。
//启动画板
RunApp "mspaint.exe"
Hwnd = Plugin.Window.Find("MSPaintApp", "未命名 - 画图")
TracePrint Hwnd
Delay 1000
Call Plugin.Window.Max(Hwnd)
Call Plugin.Window.Size(Hwnd, 1280, 800)
Delay 1000
//画布尺寸
KeyDown 17, 1
KeyPress 69, 1
KeyUp 17, 1
Delay 1000
SayString "320"
KeyPress "Tab", 1
SayString "200"
KeyPress "Enter", 1
Delay 1000
//画板画笔取蓝色
MoveTo 17, 135
LeftClick 1
MoveTo 198,712
LeftClick 1
Delay 1000
PI = 3.1415926
圆半径R = 20
圆心X = 100
圆心Y = 100
Delay 1000
//画圆环
For i = 0 To 360
MoveTo 圆心X + 圆半径R * sin(2 * PI * i / 360), 圆心Y + 圆半径R * cos(2 * PI * i / 360)
LeftDown 1
Next
LeftUp 1
圆半径R2 = 23
For i = 0 To 360
MoveTo 圆心X + 圆半径R2 * sin(2 * PI * i / 360), 圆心Y + 圆半径R2 * cos(2 * PI * i / 360)
LeftDown 1
Next
LeftUp 1
Delay 1000
//MoveTo 198, 712
//填充蓝环
MoveTo 39,86
LeftClick 1
MoveTo 103,79
LeftClick 1
//画板画笔取黑色
MoveTo 17, 135
LeftClick 1
MoveTo 41,712
LeftClick 1
Delay 1000
PI = 3.1415926
圆半径R = 20
圆心X = 150
圆心Y = 100
Delay 1000
//画圆环
For i = 0 To 360
MoveTo 圆心X + 圆半径R * sin(2 * PI * i / 360), 圆心Y + 圆半径R * cos(2 * PI * i / 360)
LeftDown 1
Next
LeftUp 1
圆半径R2 = 23
For i = 0 To 360
MoveTo 圆心X + 圆半径R2 * sin(2 * PI * i / 360), 圆心Y + 圆半径R2 * cos(2 * PI * i / 360)
LeftDown 1
Next
LeftUp 1
Delay 1000
//填充黑环
MoveTo 39,86
LeftClick 1
MoveTo 150,78
LeftClick 1
//画板画笔取红色
MoveTo 17, 135
LeftClick 1
MoveTo 68,731
LeftClick 1
Delay 1000
PI = 3.1415926
圆半径R = 20
圆心X = 200
圆心Y = 100
Delay 1000
//画圆环
For i = 0 To 360
MoveTo 圆心X + 圆半径R * sin(2 * PI * i / 360), 圆心Y + 圆半径R * cos(2 * PI * i / 360)
LeftDown 1
Next
LeftUp 1
圆半径R2 = 23
For i = 0 To 360
MoveTo 圆心X + 圆半径R2 * sin(2 * PI * i / 360), 圆心Y + 圆半径R2 * cos(2 * PI * i / 360)
LeftDown 1
Next
LeftUp 1
Delay 1000
//填充红环
MoveTo 39,86
LeftClick 1
MoveTo 200,78
LeftClick 1
//画板画笔取黄色
MoveTo 17, 135
LeftClick 1
MoveTo 85,731
LeftClick 1
Delay 1000
PI = 3.1415926
圆半径R = 20
圆心X = 125
圆心Y = 120
Delay 1000
//画圆环
For i = 0 To 360
MoveTo 圆心X + 圆半径R * sin(2 * PI * i / 360), 圆心Y + 圆半径R * cos(2 * PI * i / 360)
LeftDown 1
Next
LeftUp 1
圆半径R2 = 23
For i = 0 To 360
MoveTo 圆心X + 圆半径R2 * sin(2 * PI * i / 360), 圆心Y + 圆半径R2 * cos(2 * PI * i / 360)
LeftDown 1
Next
LeftUp 1
Delay 1000
//填充黄环
MoveTo 39,86
LeftClick 1
MoveTo 125,99
LeftClick 1
MoveTo 125,141
LeftClick 1
MoveTo 103,121
LeftClick 1
MoveTo 103,118
LeftClick 1
MoveTo 130,99
LeftClick 1
MoveTo 131,99
LeftClick 1
//画板画笔取绿色
MoveTo 17, 135
LeftClick 1
MoveTo 102,712
LeftClick 1
Delay 1000
PI = 3.1415926
圆半径R = 20
圆心X = 175
圆心Y = 120
Delay 1000
//画圆环
For i = 0 To 360
MoveTo 圆心X + 圆半径R * sin(2 * PI * i / 360), 圆心Y + 圆半径R * cos(2 * PI * i / 360)
LeftDown 1
Next
LeftUp 1
圆半径R2 = 23
For i = 0 To 360
MoveTo 圆心X + 圆半径R2 * sin(2 * PI * i / 360), 圆心Y + 圆半径R2 * cos(2 * PI * i / 360)
LeftDown 1
Next
LeftUp 1
Delay 1000
//填充绿环
MoveTo 39,86
LeftClick 1
MoveTo 175,99
LeftClick 1
MoveTo 175,141
LeftClick 1
MoveTo 153,121
LeftClick 1
MoveTo 158, 107
LeftClick 1
MoveTo 180, 99
LeftClick 1
MoveTo 180, 101
LeftClick 1
MoveTo 182, 100
LeftClick 1
Delay 1000
//精细修改
//红
MoveTo 17, 135
LeftClick 1
MoveTo 70, 725
LeftClick 1
MoveTo 195, 119
LeftDown 1
MoveTo 195, 122
LeftUp 1
MoveTo 198, 120
LeftDown 1
MoveTo 198, 123
LeftUp 1
//黑
MoveTo 17, 135
LeftClick 1
MoveTo 39, 712
LeftClick 1
MoveTo 170, 97
LeftDown 1
MoveTo 173, 97
LeftUp 1
MoveTo 173, 98
LeftClick 1
MoveTo 170, 98
LeftClick 1
MoveTo 170, 100
LeftDown 1
MoveTo 173, 100
LeftUp 1
MoveTo 170, 101
LeftClick 1
MoveTo 171, 101
LeftClick 1
MoveTo 145, 119
LeftDown 1
MoveTo 145, 123
LeftUp 1
MoveTo 148, 120
LeftDown 1
MoveTo 148, 123
LeftUp 1
//蓝
MoveTo 17,135
LeftClick 1
MoveTo 197,712
LeftClick 1
MoveTo 120,97
LeftDown 1
MoveTo 120,101
LeftDown 1
MoveTo 121,101
LeftDown 1
MoveTo 121,100
LeftDown 1
MoveTo 123,100
LeftUp 1
MoveTo 121, 97
LeftDown 1
MoveTo 123, 97
LeftUp 1
//保存
KeyDown 17, 1
KeyPress 83, 1
KeyUp 17, 1
SayString "奥运五环旗"
KeyPress "Enter", 1
Delay 1000