Project

General

Profile

Actions

$editbox » History » Revision 10

« Previous | Revision 10/11 (diff) | Next »
Per Amundsen, 06/19/2021 10:43 PM


Added in 1.9.0

$editbox(window|editor,[N])

Returns the text in the Editbox of the specified window or the text in the current active Editor.

See also $editboxhistory, /editbox.

Parameters

window|editor - The window associated with the Editbox to use or the current active Editor.
[N] - TODO (optional)

Properties

.selstart - Returns the position of the first selected character.
.selend - - Returns the position of the last selected character.
.color - Gets the current Editbox text color in $rgb format. (AdiIRC only)
.backcolor - Gets the current Editbox background color in $rgb format. (AdiIRC only)
.rgbcolor - Gets the current Editbox text color in rrr,ggg,bbb format. (AdiIRC only)
.rgbbackcolor - Gets the current Editbox background color in rrr,ggg,bbb format. (AdiIRC only)
.spellcheckword - Gets the current word at the cursor position formatted for spellchecking. (AdiIRC only)
.currline - Returns the line where the cursor is in a multiline Editbox. (AdiIRC only)
.lines - Returns the number of lines in a multiline Editbox. (AdiIRC only)

Example

; Open a custom window.
/window -e @Example

; Add 'Hello World' to the Editbox.
/editbox @Example Hello World

; Print the content of the Editbox.
//echo -ag Text is $editbox(@Example) selstart is $editbox(@Example).selstart selend is $editbox(@Example).selend

; Print the content of the current active Editor, must be triggered from a custom shortcut.
//echo -ag Text is $editbox(editor) selstart is $editbox(editor).selstart selend is $editbox(editor).selend

Updated by Per Amundsen almost 3 years ago · 10 revisions

Also available in: PDF HTML TXT