AutoIt Opt

Aus expecco Wiki (Version 2.x)
Version vom 14. Juli 2017, 22:01 Uhr von Mawalch (Diskussion | Beiträge)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

Schema[Bearbeiten]

AutoIt Opt.png

Description[Bearbeiten]

Changes the operation of various AutoIt functions/parameters. Fails in case the requested option does not exists or can not be set.

Input Pins[Bearbeiten]

  • AutoItHandle
    The handle to the AutoIt server
  • Option
    The option to change.
  • Parameter
    The value to assign to the option. The type and meaning vary by option. See notes below.

Notes (Options & Parameters)[Bearbeiten]

Options are as following:

CaretCoordMode[Bearbeiten]

Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:

  • 0 = relative coords to the active window
  • 1 = absolute screen coordinates (default)
  • 2 = relative coords to the client area of the active window

ExpandEnvStrings[Bearbeiten]

Changes how literal strings and % symbols are interpreted. By default strings are treated literally, this option allows you to use %environment% variables inside strings, e.g., "The temp directory is: %temp%".

  • 1 = expand environment variables (similar to AutoIt v2)
  • 0 = do not expand environment variables (default)

Without this option the usual way would be: "The temp directory is: " & EnvGet("temp")

ExpandVarStrings[Bearbeiten]

Changes how literal strings and variable/macro ($ and @) symbols are interpreted. By default strings are treated literally, this option allows you to use variables and macros inside strings, e.g., "The value of var1 is $var1$".

  • 1 = expand variables (when in this mode and you want to use a literal $ or @ then double it up: "This is a single dollar $$ sign".
  • 0 = do not expand variables (default)

FtpBinaryMode[Bearbeiten]

Changes how FTP files are transferred.

  • 1 = Binary (default)
  • 0 = ASCII

GUICloseOnESC[Bearbeiten]

When ESC is pressed on a GUI the $GUI_EVENT_CLOSE message is sent. This option toggles this behavior on and off.

  • 1 = Send the $GUI_EVENT_CLOSE message when ESC is pressed (default).
  • 0 = Don't send the $GUI_EVENT_CLOSE message when ESC is pressed.

GUICoordMode[Bearbeiten]

Alters the position of a control defined by GUICtrlSetPos.

  • 1 = absolute coordinates (default) still relative to the dialog box.
  • 0 = relative position to the start of the last control (upper left corner).
  • 2 = cell positioning relative to current cell. A -1 for left or top parameter don't increment the start. So next line is -1,offset; next cell is offset,-1; current cell is -1,-1. Obviously "offset" cannot be -1 which reserved to indicate the no increment. But if you can use a multiple of the width you choose to skip or go back.

GUIDataSeparatorChar[Bearbeiten]

Define the character which delimits subitems in GUICtrlSetData. The default character is '|'.

GUIOnEventMode[Bearbeiten]

Enable/disable OnEvent functions notifications.

  • 0 = (default) disable.
  • 1 = enable.

GUIResizeMode[Bearbeiten]

Change default resizing for a control.

  • 0 = (default) keep default control resizing.
  • <1024 = anytype of resizing see GUICtrlSetResizing.

GUIEventOptions[Bearbeiten]

Change special event behavior or GUI function return values.

  • 0 = (default) Windows behavior on click on Minimize,Restore, Maximize, Resize.
  • 1 = suppress windows behavior on minimize, restore or maximize click button or window resize. Just sends the notification.

MouseClickDelay[Bearbeiten]

Alters the length of the brief pause in between mouse clicks. Time in milliseconds to pause (default=10).

MouseClickDownDelay[Bearbeiten]

Alters the length a click is held down before release. Time in milliseconds to pause (default=10).

MouseClickDragDelay[Bearbeiten]

Alters the length of the brief pause at the start and end of a mouse drag operation. Time in milliseconds to pause (default=250).

MouseCoordMode[Bearbeiten]

Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:

  • 0 = relative coords to the active window
  • 1 = absolute screen coordinates (default)
  • 2 = relative coords to the client area of the active window

MustDeclareVars[Bearbeiten]

If this option is used then all variables must be pre-declared with Dim, Local or Global before they can be used - removes the chance for misspelled variables causing bugs.

  • 1 = Variables must be pre-declared
  • 0 = Variables don't need to be pre-declared (default)

OnExitFunc[Bearbeiten]

Sets the name of the function called when AutoIt exits (default is OnAutoItExit).

PixelCoordMode[Bearbeiten]

Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the window defined by hwnd (default active window):

  • 0 = relative coords to the defined window
  • 1 = absolute screen coordinates (default)
  • 2 = relative coords to the client area of the defined window

SendAttachMode[Bearbeiten]

Specifies if AutoIt attaches input threads when using Send() function. When not attaching (default mode=0) detecting the state of capslock/scrolllock and numlock can be unreliable under NT4. However, when you specify attach mode=1 the Send("{... down/up}") syntax will not work and there may be problems with sending keys to "hung" windows. ControlSend() ALWAYS attaches and is not affected by this mode.

  • 0 = do not attach (default)
  • 1 = attach

SendCapslockMode[Bearbeiten]

Specifies if AutoIt should store the state of capslock before a Send function and restore it afterwards.

  • 0 = don't store/restore
  • 1 = store and restore (default)

SendKeyDelay[Bearbeiten]

Alters the the length of the brief pause in between sent keystrokes. A value of 0 removes the delay completely. Time in milliseconds to pause (default=5).

SendKeyDownDelay[Bearbeiten]

Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses (and many games) you may need to raise this value from the default. A value of 0 removes the delay completely. Time in milliseconds to pause (default=5).

TCPTimeout[Bearbeiten]

Defines the time before TCP functions stop if no communication. Time in milliseconds before timeout (default=100).

TrayAutoPause[Bearbeiten]

Script pauses when click on tray icon.

  • 0 = no pause
  • 1 = pause (default). If there is no DefaultMenu no pause will occurs.

TrayIconDebug[Bearbeiten]

If enabled shows the current script line in the tray icon tip to help debugging.

  • 0 = no debug information (default)
  • 1 = show debug

TrayIconHide[Bearbeiten]

Hides the AutoIt tray icon. Note: The icon will still initially appear ~750 milliseconds.

  • 0 = show icon (default)
  • 1 = hide icon

TrayMenuMode[Bearbeiten]

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 (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

TrayOnEventMode[Bearbeiten]

Enable/disable OnEvent functions notifications for the tray.

  • 0 = (default) disable
  • 1 = enable

WinDetectHiddenText[Bearbeiten]

Specifies if hidden window text can be "seen" by the window matching functions.

  • 0 = Do not detect hidden text (default)
  • 1 = Detect hidden text

WinSearchChildren[Bearbeiten]

Allows the window search routines to search child windows as well as top-level windows.

  • 0 = Only search top-level windows (default)
  • 1 = Search top-level and child windows

WinTextMatchMode[Bearbeiten]

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, 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.

WinTitleMatchMode[Bearbeiten]

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
  • 3 = Exact title match
  • 4 = Advanced mode, see Window Titles & Text (Advanced)
  • -1 to -3 = force lower case match according to other type of match.

AutoIt operates in one of three "Window matching" modes. The modes are set with the AutoItSetOption function using the WinTitleMatchMode option.

  • Mode 1 (default): Matches partial titles from the start.
In this mode the a window titled Untitled - Notepad would be matched by "Untitled - Notepad", "Untitled", "Un", etc. e.g. WinWait("Untitled")
  • Mode 2: Matches any substring in the title.
In this mode a window titled Untitled - Notepad would be matched by "Untitled - Notepad", "Untitled", "Notepad", "pad", etc. e.g. WinWait("Notepad")
  • Mode 3: Exact title match.
In this mode a window titled Untitled - Notepad would only be matched by "Untitled - Notepad"
  • Mode 4 (Kept for backward compatibility) Advanced mode:
A special description can be used as the window title parameter.
This description can be used to identify a window by the following properties:
  • TITLE - Window title
  • CLASS - The internal window classname
  • REGEXPTITLE - Window title using a regular expression (if the regular expression is wrong @error will be set to 2)
  • REGEXPCLASS - Window classname using a regular expression (if the regular expression is wrong @error will be set to 2)
  • LAST - Last window used in a previous AutoIt command
  • ACTIVE - Currently active window
  • X \ Y \ W \ H - The position and size of a window
  • INSTANCE - The 1-based instance when all given properties match

One or more properties are used in the title parameter of a window command in the format: [PROPERTY1:Value1; PROPERTY2:Value2] Note : if a Value must contain a ";" it must be doubled.

  • e.g. Wait a window of classname "Notepad" WinWaitActive("[CLASS:Notepad]", "")
  • e.g. Close the currently active window WinClose("[ACTIVE]", "")
  • e.g. Wait for the 2nd instance of a window with title "My Window" and classname "My Class" WinWaitActive("[TITLE:My Window; CLASS:My Class; INSTANCE:2]", "")
  • e.g. List windows matching a classname defined by a regular expression WinList("[REGEXPCLASS:#\d+]")

WinWaitDelay[Bearbeiten]

Alters how long a script should briefly pause after a successful window-related operation. Time in milliseconds to pause (default=250).

Revisions[Bearbeiten]

This block is in the AutoIt Library since 1.0.



Back to AutoIt Library.
Previous: AutoIt [ SetText ]
Next: AutoIt [ Run ]




Copyright © 2014-2024 eXept Software AG