What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] Detect x64 through JScript & EM_SETSEL on x64

[?] Detect x64 through JScript & EM_SETSEL on x64
Author: Message:
TheBlasphemer
Senior Member
****

Avatar

Posts: 714
Reputation: 47
36 / – / –
Joined: Mar 2004
RE: [?] Detect x64 through JScript & EM_SETSEL on x64
quote:
Originally posted by SmokingCookie
Well, I've double-checked the EM_SETSEL, it is properly defined. I've just tried EM_GETSEL, starting and ending positions are both 0.

And thanks for adding a new word to my vocab :P

Seen your bump, reading now

Seen :p


I've been messing around with those macros, but can barely read them, due to all those casts :S :P Thanks for making it clear now ;)

Well you got me at least one step further: now all text is selected, and I know why:

JScript code:
Number.prototype.LOWORD = function() {
    return this & 0xFFFF;
}
 
Number.prototype.HIWORD = function() {
    return (this >> 16) & 0xFFFF;
}
 
var MAKEWORD = function (a,b) {
    return a | (b << 8);
}
 
var D = MAKEWORD(4,12);
Debug.Trace((4).toString(2));
Debug.Trace((12).toString(2));
Debug.Trace(D.toString(2));
 
Debug.Trace(D.LOWORD());
Debug.Trace(D.HIWORD());


Output:

Are you perhaps confusing MAKEWORD with MAKELONG ?
BYTE = 8-bit
WORD = 16-bit
DWORD/long = 32-bit

MAKEWORD takes two BYTEs and turns it into a WORD
MAKELONG takes two WORDs and turns it into a DWORD/LONG
LOWORD gets a WORD from a DWORD/LONG (first one passed to MAKELONG)
HIWORD " " " second one

I think in your code you intended to use MAKELONG instead of MAKEWORD, MAKELONG would be:
var MAKELONG = function(a,b) { return a|(b<<16); };
[Image: theblasp.png]
02-02-2010 10:15 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] Detect x64 through JScript & EM_SETSEL on x64 - by SmokingCookie on 01-31-2010 at 07:11 PM
RE: [?] Detect x64 through JScript & EM_SETSEL on x64 - by Mnjul on 01-31-2010 at 07:30 PM
RE: [?] Detect x64 through JScript & EM_SETSEL on x64 - by SmokingCookie on 01-31-2010 at 07:35 PM
RE: [?] Detect x64 through JScript & EM_SETSEL on x64 - by TheBlasphemer on 02-02-2010 at 12:03 PM
RE: [?] Detect x64 through JScript & EM_SETSEL on x64 - by SmokingCookie on 02-02-2010 at 07:39 PM
RE: [?] Detect x64 through JScript & EM_SETSEL on x64 - by matty on 02-02-2010 at 08:35 PM
RE: [?] Detect x64 through JScript & EM_SETSEL on x64 - by SmokingCookie on 02-02-2010 at 08:40 PM
RE: [?] Detect x64 through JScript & EM_SETSEL on x64 - by matty on 02-02-2010 at 08:46 PM
RE: [?] Detect x64 through JScript & EM_SETSEL on x64 - by SmokingCookie on 02-02-2010 at 08:53 PM
RE: [?] Detect x64 through JScript & EM_SETSEL on x64 - by TheBlasphemer on 02-02-2010 at 10:15 PM
RE: [?] Detect x64 through JScript & EM_SETSEL on x64 - by SmokingCookie on 02-03-2010 at 05:14 PM


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