Giáo Trình How To Use AutoIt A Professional Manner part 118
lượt xem 12
download
Tham khảo tài liệu 'giáo trình how to use autoit a professional manner part 118', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Bình luận(0) Đăng nhập để gửi bình luận!
Nội dung Text: Giáo Trình How To Use AutoIt A Professional Manner part 118
- Extend the behaviour of the script tray icon/menu. This can be done with a combination (adding) of the following values. 0 = default menu items (Script Paused/Exit) are appended to the usercreated menu; usercreated checked items will automatically unchecked; if you double click the tray icon then the controlid is returned which has the "Default"-style TrayMenuMode (default). 1 = no default menu 2 = user created checked items will not automatically unchecked if you click it 4 = don't return the menuitemID which has the "default"- style in the main contextmenu if you double click the tray icon 8 = turn off auto check of radio item groups Enable/disable OnEvent functions notifications for the tray. TrayOnEventMode 0 = (default) disable 1 = enable Specifies if hidden window text can be "seen" by the window matching functions. WinDetectHiddenText 0 = Do not detect hidden text (default) 1 = Detect hidden text Allows the window search routines to search child windows as well as top-level windows. WinSearchChildren 0 = Only search top-level windows (default) 1 = Search top-level and child windows Alters the method that is used to match window text during search operations. 1 = Complete / Slow mode (default) 2 = Quick mode In quick mode AutoIt can usually only "see" dialog text, WinTextMatchMode button text and the captions of some controls. In the default mode much more text can be seen (for instance the contents of the Notepad window). If you are having performance problems when performing many window searches then changing to the "quick" mode may help.
- Alters the method that is used to match window titles during search operations. 1 = Match the title from the start (default) 2 = Match any substring in the title WinTitleMatchMode 3 = Exact title match 4 = Advanced mode, see Window Titles & Text (Advanced) -1 to -4 = force lower case match according to other type of match. Alters how long a script should briefly pause after a WinWaitDelay successful window-related operation. Time in milliseconds to pause (default=250). Related Many! Example ; copy any you want to change ;default value is listed first Opt("CaretCoordMode", 1) ;1=absolute, 0=relative, 2=client Opt("ExpandEnvStrings", 0) ;0=don't expand, 1=do expand Opt("ExpandVarStrings", 0) ;0=don't expand, 1=do expand Opt("FtpBinaryMode", 1) ;1=binary, 0=ASCII Opt("GUICloseOnESC", 1) ;1=ESC closes, 0=ESC won't close Opt("GUICoordMode", 1) ;1=absolute, 0=relative, 2=cell Opt("GUIDataSeparatorChar","|") ;"|" is the default Opt("GUIOnEventMode", 0) ;0=disabled, 1=OnEvent mode enabled Opt("GUIResizeMode", 0) ;0=no resizing,
- Opt("OnExitFunc","OnAutoItExit");"OnAutoItExit" called Opt("PixelCoordMode", 1) ;1=absolute, 0=relative, 2=client Opt("SendAttachMode", 0) ;0=don't attach, 1=do attach Opt("SendCapslockMode", 1) ;1=store and restore, 0=don't Opt("SendKeyDelay", 5) ;5 milliseconds Opt("SendKeyDownDelay", 1) ;1 millisecond Opt("TCPTimeout",100) ;100 milliseconds Opt("TrayAutoPause",1) ;0=no pause, 1=Pause Opt("TrayIconDebug", 0) ;0=no info, 1=debug line info Opt("TrayIconHide", 0) ;0=show, 1=hide tray icon Opt("TrayMenuMode",0) ;0=append, 1=no default menu, 2=no automatic check, 4=menuitemID not return Opt("TrayOnEventMode",0) ;0=disable, 1=enable Opt("WinDetectHiddenText", 0) ;0=don't detect, 1=do detect Opt("WinSearchChildren", 1) ;0=no, 1=search children also Opt("WinTextMatchMode", 1) ;1=complete, 2=quick Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to - 4=Nocase Opt("WinWaitDelay", 250) ;250 milliseconds Function Reference WinExists Checks to see if a specified window exists. WinExists ( "title" [, "text"] ) Parameters title The title of the window to check. See Title special definition. text [optional] The text of the window to check.
- Return Value Success: Returns 1 if the window exists. Failure: Returns 0 otherwise. Remarks WinExists will return 1 even if the window is hidden. Related WinActive, WinWait, WinWaitActive, WinWaitClose, WinWaitNotActive, WinTitleMatchMode (Option) Example If WinExists("Untitled -") Then MsgBox(0, "", "Window exists") EndIf Function Reference WinFlash Flashes a window in the taskbar. WinFlash ( "title" [,"text" [,flashes [,delay ]]]) Parameters title The title of the window to read. See Title special definition. text [optional] The text of the window to read.
- flashes [optional] The amount of times to flash the window. Default 4. [optional] The time in milliseconds to sleep between each flash. delay Default 500 ms. Return Value None. Remarks This function is very useful for catching the user's eye! Related WinSetState Example ; flashes the window 4 times with a break in between each one of 1/2 second WinFlash("[CLASS:Notepad]","", 4, 500) Function Reference WinGetCaretPos Returns the coordinates of the caret in the foreground window WinGetCaretPos ( ) Parameters None. Return Value
- Success: Returns a 2-element array containing the following information: $array[0] = X coordinate $array[1] = Y coordinate Failure: Sets @error to 1. Remarks WinGetCaretPos might not return accurate values for Multiple Document Interface (MDI) applications if absolute CaretCoordMode is used. See example for a workaround. Note: Some applications report static coordinates regardless of caret position! Related CaretCoordMode (Option) Example $a = WinGetCaretPos() If Not @error Then ToolTip("First Method Pos", $a[0], $a[1]) sleep(2000) $b = _CaretPos() If Not @error Then ToolTip("Second Method Pos", $b[0], $b[1]) sleep(2000) ; More reliable method to get caret coords in MDI text editors. Func _CaretPos() Local $x_adjust = 5 Local $y_adjust = 40 Opt("CaretCoordMode", 0) ;relative mode Local $c = WinGetCaretPos() ;relative caret coords Local $w = WinGetPos("") ;window's coords
- Local $f = ControlGetFocus("","") ;text region "handle" Local $e = ControlGetPos("", "", $f) ;text region coords
CÓ THỂ BẠN MUỐN DOWNLOAD
-
Giáo Trình How To Use AutoIt A Professional Manner part 1
5 p | 274 | 90
-
Giáo Trình How To Use AutoIt A Professional Manner part 2
5 p | 190 | 62
-
Giáo Trình How To Use AutoIt A Professional Manner part 3
5 p | 151 | 52
-
Giáo Trình How To Use AutoIt A Professional Manner part 4
5 p | 148 | 41
-
Giáo Trình How To Use AutoIt A Professional Manner part 5
6 p | 118 | 34
-
Giáo Trình How To Use AutoIt A Professional Manner part 6
6 p | 143 | 31
-
Giáo Trình How To Use AutoIt A Professional Manner part 8
6 p | 127 | 31
-
Giáo Trình How To Use AutoIt A Professional Manner part 15
10 p | 110 | 29
-
Giáo Trình How To Use AutoIt A Professional Manner part 9
6 p | 123 | 29
-
Giáo Trình How To Use AutoIt A Professional Manner part 7
6 p | 107 | 29
-
Giáo Trình How To Use AutoIt A Professional Manner part 11
5 p | 120 | 28
-
Giáo Trình How To Use AutoIt A Professional Manner part 14
6 p | 103 | 27
-
Giáo Trình How To Use AutoIt A Professional Manner part 13
6 p | 118 | 27
-
Giáo Trình How To Use AutoIt A Professional Manner part 12
6 p | 117 | 27
-
Giáo Trình How To Use AutoIt A Professional Manner part 10
6 p | 114 | 27
-
Giáo Trình How To Use AutoIt A Professional Manner part 18
8 p | 90 | 19
-
Giáo Trình How To Use AutoIt A Professional Manner part 16
8 p | 99 | 17
-
Giáo Trình How To Use AutoIt A Professional Manner part 17
8 p | 102 | 17
Chịu trách nhiệm nội dung:
Nguyễn Công Hà - Giám đốc Công ty TNHH TÀI LIỆU TRỰC TUYẾN VI NA
LIÊN HỆ
Địa chỉ: P402, 54A Nơ Trang Long, Phường 14, Q.Bình Thạnh, TP.HCM
Hotline: 093 303 0098
Email: support@tailieu.vn