Core Function Opt

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> Opt( <option>, <value> ) </pre> === Description === Changes the operation of various Sputnik functions/parameters. ==== option ==== The option to change. See Remarks. ...")
 
(Remarks)
Line 28: Line 28:
 
# 1 = absolute screen coordinates (default)
 
# 1 = absolute screen coordinates (default)
 
# 2 = relative coords to the client area of the active window
 
# 2 = relative coords to the client area of the active window
* ColorMode
+
* ColourMode
# Sets the way colors are defined, either RGB or BGR.
+
# Sets the way colours are defined, either RGB or BGR.
# 0 = Colors are defined as RGB (0xRRGGBB) (default)
+
# 0 = Colours are defined as RGB (0xRRGGBB) (default)
# 1 = Colors are defined as BGR (0xBBGGRR)
+
# 1 = Colours are defined as BGR (0xBBGGRR)
 
* MouseClickDelay
 
* MouseClickDelay
 
# Alters the length of the brief pause in between mouse clicks.
 
# Alters the length of the brief pause in between mouse clicks.

Revision as of 01:47, 28 November 2011

Opt( <option>, <value> ) 

Contents

Description

Changes the operation of various Sputnik functions/parameters.

option

The option to change. See Remarks.

value

The parameter (varies by option). See Remarks.

Return Value

Returns the value of the previous setting.

Remarks

  1. The absolute max possible delay before sending the same hotkey again (Default is 15 miliseconds)
  1. Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:
  2. 0 = relative coords to the active window
  3. 1 = absolute screen coordinates (default)
  4. 2 = relative coords to the client area of the active window
  1. Sets the way colours are defined, either RGB or BGR.
  2. 0 = Colours are defined as RGB (0xRRGGBB) (default)
  3. 1 = Colours are defined as BGR (0xBBGGRR)
  1. Alters the length of the brief pause in between mouse clicks.
  2. Time in milliseconds to pause (default=10).
  1. Alters the length a click is held down before release.
  2. Time in milliseconds to pause (default=10).
  1. Alters the length of the brief pause at the start and end of a mouse drag operation.
  2. Time in milliseconds to pause (default=250).
  1. Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:
  2. 0 = relative coords to the active window
  3. 1 = absolute screen coordinates (default)
  4. 2 = relative coords to the client area of the active window
  1. Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the current active window:
  2. 0 = relative coords to the active window
  3. 1 = absolute screen coordinates (default)
  4. 2 = relative coords to the client area of the active window
  1. Specifies if Sputnik attaches input threads when using then SendKeys() 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.
  2. 0 = don't attach (default)
  3. 1 = attach
  1. Specifies if Sputnik should store the state of capslock before a Send function and restore it afterwards.
  2. 0 = don't store/restore
  3. 1 = store and restore (default)
  1. Alters the the length of the brief pause in between sent keystrokes.
  2. Time in milliseconds to pause (default=5). Sometimes a value of 0 does not work; use 1 instead.
  1. Alters the length of time a key is held down before 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.
  2. Time in milliseconds to pause (default=1).
  1. Specifies if hidden window text can be "seen" by the window matching functions.
  2. 0 = Do not detect hidden text (default)
  3. 1 = Detect hidden text
  1. Allows the window search routines to search child windows as well as top-level windows.
  2. 0 = Only search top-level windows (default)
  3. 1 = Search top-level and child windows
  1. Alters the method that is used to match window text during search operations.
  2. 1 = Complete / Slow mode (default)
  3. 2 = Quick mode
  4. In quick mode Sputnik 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).
  5. If you are having performance problems when performing many window searches then changing to the "quick" mode may help.
  1. Alters the method that is used to match window titles during search operations.
  2. 1 = Match the title from the start (default)
  3. 2 = Match any substring in the title
  4. 3 = Exact title match
  5. 4 = Advanced mode
  1. Alters how to pause after a successful window-related operation.
  2. Time in milliseconds to pause (default=250).

Example

Opt("CaretCoordMode", 1);        //1=absolute, 0=relative
Opt("MouseClickDelay", 10);      //10 milliseconds
Opt("MouseClickDownDelay", 10);  //10 milliseconds
Opt("MouseClickDragDelay", 250); //250 milliseconds
Opt("MouseCoordMode", 1);        //1=absolute, 0=relative
Opt("PixelCoordMode", 1);        //1=absolute, 0=relative
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("WinWaitDelay", 250);        //250 milliseconds
Opt("WinDetectHiddenText", 0);   //0=don't detect, 1=do detect
Opt("WinSearchChildren", 1);     //0=no, 1=search children also
Opt("WinTitleMatchMode", 1);     //1=start, 2=subStr, 3=exact, 4=...
Opt("WinWaitDelay", 250);        //250 milliseconds
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox