quote:
Originally posted by absorbation
Good idea, but it is very impractical.
It is very well possible.
Both in the form of a selected text as you type (autocomplete), as in the form of a panel comming up which narrows the images down (intellisense).
Although a panel popping up is almost useless*, since it will only show 1 emoticon anyways, since emoticons shortcuts can not be part of other emoticon shortcuts ( "myemo" and "myemo1" can't both exist since "myemo" will always be shown before you even can type "1" after it), although Messenger allows it that you have such shortcuts, they wont work.
*It would only be able to show a selection of emoticons by the very first character you type (eg: emoticon shortcuts beginning with "(" or beginning with ":", etc)
Normal textual autocomplete/type-ahead is very well possible though.
But here too, there can only be 1 autocompleted shortcut shown, obviously... (unless you also implement a shortcut key (typically it is a press on the TAB key) which cycles and shows the next matching shortcut)
Note, Messenger Plus! provides objects like:
Messenger::CustomEmoticons
ChatWnd::EditText
ChatWnd::EditText_GetCurSelStart
ChatWnd::EditText_GetCurSelEnd
ChatWnd::EditText_ReplaceSel
ChatWnd::EditText_SetCurSel
OnEvent_ChatWndEditKeyDown
-----------
Though, I'd suspect that if you run such a script, the typing will be slowed down a lot since you constantly need to do a lot of stuff which each keypress (eg: getting all emoticons and their shortcuts each time, since they can change on the fly!), not to mention the constant showing and updating of the panel with each keypress...
Using a timeout and using a time delay will reduce the slowness a bit, but not entirly.
Also, it hugly depends on the amount of emoticons you have. But since you have so much emoticons you can't remember all the shortcuts, it would also mean this script will slow everything down _a lot_, making it as good as unuseable.