Cursor Position in Plus text boxes - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: Cursor Position in Plus text boxes (/showthread.php?tid=73391) Cursor Position in Plus text boxes by win_crook on 04-07-2007 at 05:47 PM
Is there any way I can get the position of the text cursor in a text box in a plus interface? RE: Cursor Position in Plus text boxes by Patchou on 04-07-2007 at 06:04 PM you can send the EM_GETSEL message. In version 4.21, some new functions have been added to add more support for edit controls. RE: Cursor Position in Plus text boxes by win_crook on 04-07-2007 at 06:21 PM Would it be possible for you to give me some guidance on how to do this please? Maybe just a little example to get me started. RE: RE: Cursor Position in Plus text boxes by felipEx on 04-07-2007 at 08:48 PM
quote:Hi Patch. you would have to consider the use of <MaxLength> it can be possible with API. code: RE: Cursor Position in Plus text boxes by win_crook on 04-08-2007 at 12:00 PM
Well I've figured out the EM_GETSEL message and it's working fine now. I'm onto the string processing part now, and I'm getting this error: quote: This is the code, the middle line is line 40: code: I'm assuming it's talking about the substring method, but I don't see why it's saying it's unsupported... any ideas? Thanks, David RE: Cursor Position in Plus text boxes by effection on 04-08-2007 at 12:32 PM what is $Start defined as? RE: Cursor Position in Plus text boxes by win_crook on 04-08-2007 at 12:36 PM
Here is the code that defines start: code: RE: Cursor Position in Plus text boxes by matty on 04-08-2007 at 02:44 PM
quote:When you are allocating memory to a variable you cannot simply reference the variable itself. In this case the value you are trying to read is a DWORD. You need to replace: code: With this code: And where does before come into play? Also why are you allocating 32 bytes of memory to Start? It should be 4. RE: Cursor Position in Plus text boxes by win_crook on 04-08-2007 at 02:49 PM Thanks a lot for that ... the before doesn't come into play, I forgot to change it to text for this example. It's all working fine now. RE: Cursor Position in Plus text boxes by Felu on 04-08-2007 at 03:41 PM
quote:He never used the variable $Start. It was Start. Please don't confuse with it. This is not php that you'll need $ for a variable. This is JScript. |