What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] how to find character..

[?] how to find character..
Author: Message:
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
O.P. Huh?  [?] how to find character..
how do i find the character like in the script editor at the corner it shows what character you are at how do i put that ?
[quote]
Ultimatess6
: What a noob mod
12-10-2006 11:48 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [?] how to find character..
Wha?!?

You want to know the position of a specific character?
12-10-2006 11:51 PM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
O.P. RE: RE: [?] how to find character..
quote:
Originally posted by Matty
Wha?!?

You want to know the position of a specific character?


precisesly :D

i want to find the "L" in "Hello" and show up what place it is at

This post was edited on 12-10-2006 at 11:54 PM by roflmao456.
[quote]
Ultimatess6
: What a noob mod
12-10-2006 11:52 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [?] how to find character..
EM_POSFROMCHAR
EM_CHARFROMPOS

This post was edited on 12-10-2006 at 11:59 PM by matty.
12-10-2006 11:56 PM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
O.P. RE: [?] how to find character..
quote:
Originally posted by Matty
EM_POSFROMCHAR

man i dont like links :D i want an example :(
[quote]
Ultimatess6
: What a noob mod
12-10-2006 11:59 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [?] how to find character..
If we give you the code how will you learn... atleast attempt to do it.

You barely attempt anything and just ask for it. How about you you try and post what you try and we will correct it.

I will get you started

Wrong Function.

code:
var EM_POSFROMCHAR = 0xF0D6;
var POINTL = Interop.Allocate(8);
Interop.Call('user32',
             'SendMessageW',
             pPlusWnd.GetControlHandle('txtMyEditControl'),
             EM_POSFROMCHAR,
             POINTL.DataPtr,
             0);
// Specifies the horizontal (x) coordinate of the point.
Debug.Trace('POINTL.ReadDWORD(0) : '+POINTL.ReadDWORD(0));
//Specifies the vertical (y) coordinate of the point.
Debug.Trace('POINTL.ReadDWORD(4) : '+POINTL.ReadDWORD(4));


You can use String('Hello').indexOf('l');

This post was edited on 12-11-2006 at 12:29 AM by matty.
12-11-2006 12:16 AM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: [?] how to find character..
To be fair, anything with Interop.Allocate usually stumps me. The only time I managed to do it on my own was getting the mouse position (around 5 months after my first script). Some people learn better from examples than from MSDN (I have to admit MSDN is usually pretty complicated in it's explinations and often doesn't give the relevant HEX codes you need meaning you have to trawl google for them).
<Eljay> "Problems encountered: shit blew up" :zippy:
12-11-2006 12:23 AM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [?] how to find character..
quote:
Originally posted by SpunkyLoveMuff
and often doesn't give the relevant HEX codes you need meaning you have to trawl google for them.
Actually all constant values are listed in the msdn library too... Granted, you need to search for them seperatly as they are not given in the API descriptions themselfs, but just looking for the constant's name and you'll find the proper values in the msdn library too.

PS: the values given in random pages on the net aren't always the correct ones. And in other cases you need to be very carefully in just copying the values from such random pages as many times they depend on the numerical system used in the language they are used in (signed/unsigned/range of the type, etc). Eg: in VB &HFFFF can actually be -1 in another language or 0xFFFFFFFF in yet another or even indeed be 0xFFFF....
.-= A 'frrrrrrrituurrr' for Wacky =-.
12-11-2006 01:51 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On