Tham khảo tài liệu giáo trình how to use autoit a professional manner part 106, 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ả
Nội dung trích xuất từ tài liệu:
Giáo Trình How To Use AutoIt A Professional Manner part 106 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 titleWinTitleMatchMode 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 aWinWaitDelay successful window-related operation. Time in milliseconds to pause (default=250).RelatedMany!Example; copy any you want to change ;default value is listed firstOpt(CaretCoordMode, 1) ;1=absolute, 0=relative, 2=clientOpt(ExpandEnvStrings, 0) ;0=dont expand, 1=do expandOpt(ExpandVarStrings, 0) ;0=dont expand, 1=do expandOpt(FtpBinaryMode, 1) ;1=binary, 0=ASCIIOpt(GUICloseOnESC, 1) ;1=ESC closes, 0=ESC wont closeOpt(GUICoordMode, 1) ;1=absolute, 0=relative, 2=cellOpt(GUIDataSeparatorChar,|) ;| is the defaultOpt(GUIOnEventMode, 0) ;0=disabled, 1=OnEvent mode enabledOpt(GUIResizeMode, 0) ;0=no resizing, Opt(PixelCoordMode, 1) ;1=absolute, 0=relative, 2=clientOpt(SendAttachMode, 0) ;0=dont attach, 1=do attachOpt(SendCapslockMode, 1) ;1=store and restore, 0=dontOpt(SendKeyDelay, 5) ;5 millisecondsOpt(SendKeyDownDelay, 1) ;1 millisecondOpt(TCPTimeout,100) ;100 millisecondsOpt(TrayAutoPause,1) ;0=no pause, 1=PauseOpt(TrayIconDebug, 0) ;0=no info, 1=debug line infoOpt(TrayIconHide, 0) ;0=show, 1=hide tray iconOpt(TrayMenuMode,0) ;0=append, 1=no default menu, 2=no automaticcheck, 4=menuitemID not returnOpt(TrayOnEventMode,0) ;0=disable, 1=enableOpt(WinDetectHiddenText, 0) ;0=dont detect, 1=do detectOpt(WinSearchChildren, 1) ;0=no, 1=search children alsoOpt(WinTextMatchMode, 1) ;1=complete, 2=quickOpt(WinTitleMatchMode, 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=NocaseOpt(WinWaitDelay, 250) ;250 millisecondsFunction ReferenceSetErrorManually set the value of the @error macro.SetError ( code [, extended [, return value]] )Parameterscode The required value (integer) to set the @error macro to. The optional value (integer) to set the @extended macro to. This setsextended the same macro as the SetExtended() function.return Override the default return value and return this parameter.valueReturn ValueBy default, none, however if the optional return value argument is passed, then thefunction will return that value.RemarksWhen entering a function @error is set to 0. Unless SetError() is called, then@error will remain 0 after the function has ended. This means that in order for@error to be set after a function, it must be explicitly set. This also means you mayneed to backup the status of @error in a variable if you are testing it in a While-WEnd loop.The extended parameter is optional. It is only provided as a way to set both @errorand @extended at the same time. If only @extended needs set, then it isrecommended to use the SetExtended() function instead.RelatedSetExtendedExample$result = myDiv(5, 0)If @error Then MsgBox(4096,Error, Division by Zero)Else MsgBox(4096, Result, $result)EndIfExitFunc myDiv($dividend, $divisor) If $dividend = 0 And $divisor = 0 Then SetError(2) ;indeterminate form 0/0 ElseIf $divisor = 0 Then SetError(1) ;plain division by zero EndIf Return $dividend / $divisorEndFuncFunction ReferenceSetExtendedManually set the value of the @extended macro.SetExtended ( code [, return value] )Parameterscode The required value (integer) to set the @extended macro to.return Override the default return value and return this parameter.valueReturn ValueBy default, none, however, if the optional return value argument is passed, then thefunction will return that value.RemarksWhen entering a function @extended is set to 0. Unless SetExtended() is called,then @extended will remain 0 after the function has ended. This means that inorder for @extended to be set after a function, it must be explicitly set. This alsomeans you may need to backup the status of @extended in a variable if you aretesting it in a While-WEnd loop.RelatedSetErrorExampleSetExtended(10)MsgBox(4096, Value of @Extended is, @extended)Function ReferenceIsArrayChecks if a variable is an array type.IsArray ( variable )Parametersvariable The variable/expression to check.Return ValueSuccess: Returns 1.Failure: Returns 0 if parameter is not an array variable.RemarksCan be useful to validate array/non-array parameter ...