Q Figure sort of language to find my command library "to find a common map" before the source station turn back to find a map coordinate function

'A --- --------------------- front turn back to find the coordinates of FIG ------------------ ----------------
Function FIG Get A (pictname)
// find FIG front, back transfer coordinates
FindPic client_X, client_Y, getclient_X (Hwnd1 ) + getwindow_X (Hwnd) - 1 - 1 , getclient_Y (Hwnd1) + getwindow_Y ( Hwnd) - 1, pic_path & pictname, 0.9, find FIG _intX, FIG _intY find
find FIG _intX = Get FIG _intX - client_X
find FIG _intY = Get FIG _intY - client_Y
If looking for Figure _intx> = 0 and find a map _inty> = 0 Then
log run content = V_ current program & "A ----------> pictures found:" & pictname & find a map _intX & "," & find a map _intY
Call Lib common output log (journal content is running):.. TracePrint run log contents
to find Figure 1 = A
Else
log run content = V_ current program & "A picture is not found:" & pictname
. Call Lib common output log (log contents run):. TracePrint content operation log
looking for FIG 0 = A
End the If
End Function
'-------------------------------------------------
Function Get FIG click A (pictname, offset X, offset the Y)
Dim return value
to find the A = 0 FIG click
return value = Get FIG. A (pictname)
the If the return value> 0 the Then
Call Plugin.Bkgnd.MoveTo (Hwnd, find FIG _intX + cint (offset X), looking FIG _intY + cint (offset the Y))
Delay 50
Call Plugin.Bkgnd.LeftClick (Hwnd, find FIG _intX + cint (offset X), looking _intY FIG. + cint (offset Y))
log the current program run content = V_ & "A -------------> click on image:" & pictname
. Call Lib common output log (log operation content). : TracePrint run log contents
to find the chart click = 1 A
End the If
End Function
'---------------------------------- ---------------
Function Get FIG multi A (pictname)
Dim the I, return values, images
to find more map A = 0
to find the multi FIG _intX = -1
find plurality FIG _intY = -1
picture = split (pictname, "|")
For i = 0 To ubound(图片)-1
FIG find Return Value = A (Photo (i))
the If the return value> 0 Then
log operation content of the current program & V_ = "Found: first" & cstr (i + 1) & " images:" & Pictures (i)
. Call Lib common output log (log contents run):. TracePrint content operation log
looking plurality FIG _intX FIG _intX = find
find find FIG plurality FIG _intY = _intY
find multi FIG. 1 + I = A
the Exit the For
End the If
log run content = "on not found" & cstr (i + 1) & " pictures:"
Call Lib common output log (journal content is running):.. TracePrint log content is running
the Next
End Function
'-------- -----------------------------------------
Function looking for multi-image click A (pictname, offset X, offset the Y)
Dim return value
to find multiple image click A = 0
return value = Get FIG multi A (pictname)
the If the return value> 0 the Then
Call Plugin.Bkgnd.MoveTo (Hwnd, looking plurality FIG _intX + cint (offset X), to find a multi FIG _intY + cint (offset the Y))
Delay 50
Call Plugin.Bkgnd.LeftClick (Hwnd,Get Multi FIG _intX + cint (Offset X), to find a multi FIG _intY + cint (Offset Y))
Log run content = V_ current program & "A -------------> Click the picture:" & pictname
Call Lib common output log (journal content is running):.. TracePrint run log contents
to find more map click A = return value
End the If
End Function
'---------------------------------------- ---------
Function FIG et A (pictname)
Dim return value
log operation content = "B picture waiting ....:" & pictname
Call Lib common output log (log contents run):.. TracePrint logging the operation content
, etc. FIG. A = 0
, etc. FIG _intX = -1
etc. FIG -1 = _intY
the For 10000
return value = Get FIG. A (pictname)
the If the return value> 0 Then
log current program run content = V_ & "A ------------> until the picture: "& pictname
Call Lib common output log (journal content is running).:TracePrint log the operation content
, etc. FIG _intX FIG _intX = looking
like FIG _intY FIG _intY = looking
like FIG. 1 = A
the Exit the For
End the If
Delay 500
the Next
End Function
'-------------------------------------------------
FIG other click Function A (pictname, offset X, offset the Y)
Dim return value
log operation content = "waiting click on image ....:" & pictname
Call Lib common output log (log contents run):.. TracePrint logging the operation content
, etc. FIG click A = 0
, etc. FIG _intX = -1
etc. FIG -1 = _intY
the For 100000
return value = Get FIG. A (pictname)
the If the return value> 0 Then
etc. FIG _intX FIG _intX = looking
like FIG _intY = Get FIG _intY
Call Plugin.Bkgnd.MoveTo (Hwnd, etc. FIG _intX + cint (offset X), etc. FIG _intY + cint (offset the Y))
Delay 50
Call Plugin.Bkgnd.LeftClick ( Hwnd, etc. FIG _intX + cint (offset X), etc. FIG _intY + cint (offset Y))
log the current program run content = V_ & "A ------------- ---> click on the image: "& pictname
Call Lib common output log (journal content is running):.. TracePrint run log contents
, etc. Figure 1 click = A
Exit the For
End the If
Delay 500
The Next
End Function
'---------------------------------------------- ---
Function FIG other multi A (pictname)
Dim return values
, and other A = 0 FIG
other multi FIG _intX = -1
and other -1 = FIG _intY
the For 10000
return value = Get FIG multi A (pictname)
the If returns value> 0 Then
log the operation content = "until the multi-picture:" return value &
Call Lib common output log (log contents run):.. TracePrint content operation log
and other return values A = FIG
other multi FIG looking plurality FIG _intX = _intX
and other map _intY = find more map _intY
Exit the For
End the If
the log run content = "traversed once, not wait until all the pictures"
Call Lib common output log (journal content is running):.. TracePrint run log contents
Delay 500
the Next
Function End
'----------------------------------------------- -

// Note:.. Lib common output log (log run content) function in the command library "universal" in the same
/ *
Output Sub log (journal content)
the If V_ output run logs the Then 1 =
Call Plugin.File.WriteFileEx (V_sPath & "script log .txt", Now () & " :" & contents of the log) // here are plus execution time of the corresponding system command
End the If
End Sub

*/

// Note: the following variables as global variables
/
V_ output run logs, define whether the output log file
logs run content, log contents
V_sPath, program startup path
pic_path, drawing file path
Hwnd, window handle
Hwnd1, page window handle
client_X, top left window angular coordinate X-
client_Y, window upper-left coordinates the Y
V_ current program, the identification name // recording module, to facilitate log output, debugging
/
// NOTE: the following functions in the upload command library with the special topic "universal" in the following
/
getclient_X (Hwnd1),
getwindow_X (Hwnd),
getclient_Y (Hwnd1),
getwindow_Y (Hwnd),
/

Guess you like

Origin blog.51cto.com/12815848/2440936