mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2003
Posts: 214
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
This would help using /editbox alot more to create features like SHIFT+F3 in MS Word and so on

$cursorposition should return the position of the textcursor in the editbox, i.e if the word is "test" and the cursor is behind the s, it should return 3

Also there should be an option like $cursorposition.word which returns test,1 or so if the line contains test more then once

Thanks and so wink


one step closer to world domination
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
Could be useful to some, Maybe an extention to the already availible $editbox(window,N) identifier instead of creating a new one would be preferable. Since mirc remembers the position for all editbox's even when they are not the active window, it should not be too hard to retrieve this information.

Property: .cur - Returns the current cursor position for the specified editbox.
Property: .word - Returns the current word the cursor is over for the specified editbox. Will return the previous word if cursor is at end of a word, will return the following word if cursor is at the begining of a word, otherwise will return nothing (or $false ?) if not touching a word charactor other than space.
Property: .wordid - Will return the word id for the the above, unless .word is false, in which case it should return nothing (or $false depending on the behavior of .word)


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
add also
Property .hstart & .hend giving the first and last character position of highlighted text

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I don't think adding a .word would be useful. It would be more complicated than just using $gettok, I'd think. Maybe not. Anyhow, .cur could be useful.


Invision Support
#Invision on irc.irchighway.net
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
Indeed, it can be done with tokens quite easily. Just thought the suggestion would be better suited as property extentions for $editbox rather than a new identifier.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby

Link Copied to Clipboard