Project

General

Profile

$editbox » History » Version 11

Per Amundsen, 02/16/2023 09:37 PM

1 1 Per Amundsen
_Added in 1.9.0_
2
3 9 Per Amundsen
*$editbox(window|editor,[N])*
4 1 Per Amundsen
5 9 Per Amundsen
Returns the text in the [[Editbox Control|Editbox]] of the specified window or the text in the current active Editor.
6 1 Per Amundsen
7 8 Per Amundsen
_See also [[$editboxhistory]], [[/editbox]]._
8
9 1 Per Amundsen
*Parameters*
10
11 11 Per Amundsen
table(ktable).
12
|*Parameter*|*Description*|
13
| window<notextile>|</notextile>editor | The window associated with the [[Editbox Control<notextile>|</notextile>Editbox]] to use or the current active Editor. |
14
| [N] | *TODO* (optional) |
15 1 Per Amundsen
16
*Properties*
17
18 11 Per Amundsen
table(ktable).
19
|*Property*|*Description*|
20
| .selstart | Returns the position of the first selected character. |
21
| .selend | - Returns the position of the last selected character. |
22
| .color | Gets the current [[Editbox Control<notextile>|</notextile>Editbox]] text color in [[$rgb]] format. *(AdiIRC only)* |
23
| .backcolor | Gets the current [[Editbox Control<notextile>|</notextile>Editbox]] background color in [[$rgb]] format. *(AdiIRC only)* |
24
| .rgbcolor | Gets the current [[Editbox Control<notextile>|</notextile>Editbox]] text color in rrr,ggg,bbb format. *(AdiIRC only)* |
25
| .rgbbackcolor | Gets the current [[Editbox Control<notextile>|</notextile>Editbox]] background color in rrr,ggg,bbb format. *(AdiIRC only)* |
26
| .spellcheckword | Gets the current word at the cursor position formatted for spellchecking. *(AdiIRC only)* |
27
| .currline | Returns the line where the cursor is in a multiline [[Editbox Control<notextile>|</notextile>Editbox]]. *(AdiIRC only)* |
28
| .lines | Returns the number of lines in a multiline [[Editbox Control<notextile>|</notextile>Editbox]]. *(AdiIRC only)* |
29 1 Per Amundsen
30
*Example*
31
32
<pre>
33
; Open a custom window.
34
/window -e @Example
35
36
; Add 'Hello World' to the Editbox.
37
/editbox @Example Hello World
38
39
; Print the content of the Editbox.
40
//echo -ag Text is $editbox(@Example) selstart is $editbox(@Example).selstart selend is $editbox(@Example).selend
41 9 Per Amundsen
42 10 Per Amundsen
43
; Print the content of the current active Editor, must be triggered from a custom shortcut.
44
//echo -ag Text is $editbox(editor) selstart is $editbox(editor).selstart selend is $editbox(editor).selend
45 1 Per Amundsen
</pre>