Core Function Opt

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Remarks)
m (1 revision)
 
(11 intermediate revisions by one user not shown)
Line 13: Line 13:
 
==== value ====
 
==== value ====
  
The parameter (varies by option). See Remarks.
+
Optional; The parameter (varies by option). See Remarks.
 +
 
 +
Note - If no value is given the CURRENT value of the given option will be returned
  
 
=== Return Value ===
 
=== Return Value ===
Line 21: Line 23:
 
=== Remarks ===
 
=== Remarks ===
  
* HotKeyDelay
+
==== SocketConnectedPoll ====
# The absolute max possible delay before sending the same hotkey again (Default is 15 miliseconds)
+
Changes how long SocketConnected() will wait for a responce (Default is 1000 miliseconds)
* CaretCoordMode
+
 
# Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:
+
==== HotKeyDelay ====
# 0 = relative coords to the active window
+
The absolute max possible delay before sending the same hotkey again (Default is 15 miliseconds)
# 1 = absolute screen coordinates (default)
+
 
# 2 = relative coords to the client area of the active window
+
==== CaretCoordMode ====
* MouseClickDelay
+
Sets the way coords are used in the caret functions, either absolute coords or coords relative to the current active window:
# Alters the length of the brief pause in between mouse clicks.
+
<pre>
# Time in milliseconds to pause (default=10).
+
0 = relative coords to the active window
* MouseClickDownDelay
+
1 = absolute screen coordinates (default)
# Alters the length a click is held down before release.
+
2 = relative coords to the client area of the active window
# Time in milliseconds to pause (default=10).
+
</pre>
* MouseClickDragDelay
+
 
# Alters the length of the brief pause at the start and end of a mouse drag operation.
+
==== ColourMode ====
# Time in milliseconds to pause (default=250).
+
Sets the way colours are defined, either RGB or BGR.
* MouseCoordMode
+
<pre>
# Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:
+
0 = Colours are defined as RGB (0xRRGGBB) (default)
# 0 = relative coords to the active window
+
1 = Colours are defined as BGR (0xBBGGRR)
# 1 = absolute screen coordinates (default)
+
</pre>
# 2 = relative coords to the client area of the active window
+
 
* PixelCoordMode
+
==== MouseMoveDelay ====
# Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the current active window:
+
Alters the length of the brief pause in between mouse moves.
# 0 = relative coords to the active window
+
Time in milliseconds to pause (default=10).
# 1 = absolute screen coordinates (default)
+
 
# 2 = relative coords to the client area of the active window
+
==== MouseClickDelay ====
* SendAttachMode
+
Alters the length of the brief pause in between mouse clicks.
# 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.
+
Time in milliseconds to pause (default=10).
# 0 = don't attach (default)
+
 
# 1 = attach
+
==== MouseClickDownDelay ====
* SendCapslockMode
+
Alters the length a click is held down before release.
# Specifies if Sputnik should store the state of capslock before a Send function and restore it afterwards.
+
Time in milliseconds to pause (default=10).
# 0 = don't store/restore
+
 
# 1 = store and restore (default)
+
==== MouseClickDragDelay ====
* SendKeyDelay
+
Alters the length of the brief pause at the start and end of a mouse drag operation.
# Alters the the length of the brief pause in between sent keystrokes.
+
Time in milliseconds to pause (default=250).
# Time in milliseconds to pause (default=5). Sometimes a value of 0 does not work; use 1 instead.
+
 
* SendKeyDownDelay
+
==== MouseCoordMode ====
# 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.
+
Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window:
# Time in milliseconds to pause (default=1).
+
<pre>
* WinDetectHiddenText
+
0 = relative coords to the active window
# Specifies if hidden window text can be "seen" by the window matching functions.
+
1 = absolute screen coordinates (default)
# 0 = Do not detect hidden text (default)
+
2 = relative coords to the client area of the active window
# 1 = Detect hidden text
+
</pre>
* WinSearchChildren
+
 
# Allows the window search routines to search child windows as well as top-level windows.
+
==== PixelCoordMode ====
# 0 = Only search top-level windows (default)
+
Sets the way coords are used in the pixel functions, either absolute coords or coords relative to the current active window:
# 1 = Search top-level and child windows
+
<pre>
* WinTextMatchMode
+
0 = relative coords to the active window
# Alters the method that is used to match window text during search operations. (Note -- 0 to 3 are case insensitive)
+
1 = absolute screen coordinates (default)
# 0 = Match the text from the start (Same as the function Left()) (default)
+
2 = relative coords to the client area of the active window
# 1 = Match the text from the end (Same as the function Right())
+
</pre>
# 2 = Match any substring in the text
+
 
# 3 = Exact text match
+
==== SendAttachMode ====
# 4 = Advanced mode (See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )
+
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.
* WinTitleMatchMode
+
<pre>
# Alters the method that is used to match window titles during search operations. (Note -- 0 to 3 are case insensitive)
+
0 = don't attach (default)
# 0 = Match the title from the start (Same as the function Left()) (default)
+
1 = attach
# 1 = Match the title from the end (Same as the function Right())
+
</pre>
# 2 = Match any substring in the title
+
 
# 3 = Exact title match
+
==== SendCapslockMode ====
# 4 = Advanced mode (See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )
+
Specifies if Sputnik should store the state of capslock before a Send function and restore it afterwards.
* WinWaitDelay
+
<pre>
# Alters how to pause after a successful window-related operation.
+
0 = don't store/restore
* ProcessNameMatchMode
+
1 = store and restore (default)
# Alters the method that is used to match process names during search operations. (Note -- 0 to 3 are case insensitive)
+
</pre>
# 0 = Match the name from the start (Same as the function Left()) (default)
+
 
# 1 = Match the name from the end (Same as the function Right())
+
==== SendKeyDelay ====
# 2 = Match any substring in the name
+
Alters the the length of the brief pause in between sent keystrokes.
# 3 = Exact name match
+
Time in milliseconds to pause (default=5). Sometimes a value of 0 does not work; use 1 instead.
# 4 = Advanced mode.
+
 
 +
==== SendKeyDownDelay ====
 +
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.
 +
Time in milliseconds to pause (default=1).
 +
 
 +
==== WinDetectHiddenText ====
 +
Specifies if hidden window text can be "seen" by the window matching functions.
 +
<pre>
 +
0 = Do not detect hidden text (default)
 +
1 = Detect hidden text
 +
</pre>
 +
 
 +
==== WinSearchChildren ====
 +
Allows the window search routines to search child windows as well as top-level windows.
 +
<pre>
 +
0 = Only search top-level windows (default)
 +
1 = Search top-level and child windows
 +
</pre>
 +
 
 +
==== WinTextMatchMode ====
 +
Alters the method that is used to match window text during search operations. (Note -- 0 to 3 are case insensitive)
 +
<pre>
 +
0 = Match the text from the start (Same as the function Left()) (default)
 +
1 = Match the text from the end (Same as the function Right())
 +
2 = Match any substring in the text
 +
3 = Exact text match
 +
4 = Advanced mode (See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )
 +
</pre>
 +
 
 +
==== WinTitleMatchMode ====
 +
Alters the method that is used to match window titles during search operations. (Note -- 0 to 3 are case insensitive)
 +
<pre>
 +
0 = Match the title from the start (Same as the function Left()) (default)
 +
1 = Match the title from the end (Same as the function Right())
 +
2 = Match any substring in the title
 +
3 = Exact title match
 +
4 = Advanced mode (See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )
 +
</pre>
 +
 
 +
==== WinWaitDelay ====
 +
Alters how to pause after a successful window-related operation.
 +
 
 +
==== ProcessNameMatchMode ====
 +
Alters the method that is used to match process names during search operations. (Note -- 0 to 3 are case insensitive)
 +
<pre>
 +
0 = Match the name from the start (Same as the function Left()) (default)
 +
1 = Match the name from the end (Same as the function Right())
 +
2 = Match any substring in the name
 +
3 = Exact name match
 +
4 = Advanced mode.
 +
</pre>
  
 
=== Example ===
 
=== Example ===

Latest revision as of 12:38, 14 June 2015

Opt( <option>, <value> ) 

Contents

Description

Changes the operation of various Sputnik functions/parameters.

option

The option to change. See Remarks.

value

Optional; The parameter (varies by option). See Remarks.

Note - If no value is given the CURRENT value of the given option will be returned

Return Value

Returns the value of the previous setting.

Remarks

SocketConnectedPoll

Changes how long SocketConnected() will wait for a responce (Default is 1000 miliseconds)

HotKeyDelay

The absolute max possible delay before sending the same hotkey again (Default is 15 miliseconds)

CaretCoordMode

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

ColourMode

Sets the way colours are defined, either RGB or BGR.

0 = Colours are defined as RGB (0xRRGGBB) (default)
1 = Colours are defined as BGR (0xBBGGRR)

MouseMoveDelay

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

MouseClickDelay

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

MouseClickDownDelay

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

MouseClickDragDelay

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

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

PixelCoordMode

Sets the way coords are used in the pixel 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

SendAttachMode

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.

0 = don't attach (default)
1 = attach

SendCapslockMode

Specifies if Sputnik 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

Alters the the length of the brief pause in between sent keystrokes. Time in milliseconds to pause (default=5). Sometimes a value of 0 does not work; use 1 instead.

SendKeyDownDelay

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. Time in milliseconds to pause (default=1).

WinDetectHiddenText

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

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

Alters the method that is used to match window text during search operations. (Note -- 0 to 3 are case insensitive)

0 = Match the text from the start (Same as the function Left()) (default)
1 = Match the text from the end (Same as the function Right())
2 = Match any substring in the text
3 = Exact text match
4 = Advanced mode (See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )

WinTitleMatchMode

Alters the method that is used to match window titles during search operations. (Note -- 0 to 3 are case insensitive)

0 = Match the title from the start (Same as the function Left()) (default)
1 = Match the title from the end (Same as the function Right())
2 = Match any substring in the title
3 = Exact title match
4 = Advanced mode (See [[Window Titles and Text Advanced|Window Titles and Text (Advanced)]] )

WinWaitDelay

Alters how to pause after a successful window-related operation.

ProcessNameMatchMode

Alters the method that is used to match process names during search operations. (Note -- 0 to 3 are case insensitive)

0 = Match the name from the start (Same as the function Left()) (default)
1 = Match the name from the end (Same as the function Right())
2 = Match any substring in the name
3 = Exact name match
4 = Advanced mode.

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
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox