#ClipboardTimeout

Homepage
Command List

Changes how long the script keeps trying to access the clipboard when the first attempt fails.

#ClipboardTimeout Milliseconds

Parameters

Milliseconds The length of the interval in milliseconds. Specify -1 to have it keep trying indefinitely. Specify 0 to have it try only once. Scripts that do not contain this directive use a 1000 ms timeout.

Remarks

Some applications keep the clipboard open for long periods of time, perhaps to write or read large amounts of data. In such cases, increasing this setting causes the script to wait longer before giving up and displaying an error message.

This settings applies to all clipboard operations, the simplest of which are the following examples:
Var = %Clipboard%
Clipboard = New Text

Whenever the script is waiting for the clipboard to become available, new threads cannot be launched and timers will not run. However, if the user presses a hotkey, selects a custom menu item, or performs a GUI action such as pressing a button, that event will be buffered until later; in other words, its subroutine will be performed after the clipboard finally becomes available.

This directive also causes the reading of clipboard data to be reattempted if the first attempt fails (in prior versions, only the opening of the clipboard was reattempted).

Related

Clipboard, Thread

Example

#ClipboardTimeout 2000

Homepage  |  Command List