ID:1356140
 
Ever since I wrote my library, HDK Mouse And Keys, I have occasionally heard that someone could not use the library, or more specifically, that the demo "does not work". Most prominently, I believe, has been Kaiochao, for whom I believe this library has never worked.

In the last few weeks though, I've received messages from many people stating that the library no longer worked. I did a little digging and asking around and found that quite a few people who had previously used the library no longer could. Several projects compiled long ago were even misbehaving. LetterBox, a project almost everyone in Chatters has played with, wouldn't work for many users, including my fiancee, whose computer I used to write and test the project. Upon testing, I found that the Javascript event properties, screenX and screenY were the variables that were not updating properly, whereas the rest were fine.

That is, until yesterday.

Two days ago, with the influx of user issues, I decided to rewrite my admittedly terrible scripts to try and figure out what the issue was. I was testing it all night. I sent a copy to several users and a good portion reported that it wasn't working for them despite working perfectly fine on my computer and a handful of other users.

So yesterday, I set up a demo that gave the UAS and a link to a thread to report results to try and figure out if there was an issue with browser version or, well, anything. The thing is, it worked for everyone, including all of the users that were having issues the night before.

Suddenly, everything worked on everyone's computer. LetterBox now suddenly works on my fiancee's computer. The demo in the current version of the library on the hub works on SSX's computer. Even Darke's old projects suddenly work again.

I have no clue what the hezmana is going on. I was hoping that you, Tom, Lummox, yotz, anyone could possibly shed some light as to what the frell could be causing this. I am lost.


[ Links ]
HDK Mouse And Keys [hub version and demo]
LetterBox
Updated Demo & UAS Test
UAS Test Results
Updated Library and Demo [No Documentation Yet]
.htm Files Pulled From BYOND's Cache
Did you collect each users version of IE? I find a lot of things may work in let's say IE9 but not lower or vice versa.

Are you using pure JavaScript? Any reason you couldn't incorporate jQuery to combat IE issues?

I googled quickly and saw this (its oldish) - http://jquerybyexample.blogspot.com.au/2010/09/ jquery-tip-how-to-get-mouse-cursor.html?m=1
IE Embedded, as far as I can tell, only comes in two versions: IE6 and IE7. Here is the test thread and the results.
I think IE gets updated with Windows Update, which could be why it would break like this
If you would look at the link provided, the browser version for all of the results is "MSIE 7.0". IE Embedded doesn't ever seem to update, I'd imagine for the very purpose of compatibility.
Correct, IE7 is the highest version the embedded browser will use, if the client has a higher version installed it'll be utilized in IE7 compatibility mode. This isn't something BYOND itself does, but how the embedded browser system functions. It's kind of ideal so you can design your browser interfaces with a specific version in mind instead of worrying about compatibility.
IE7 is so old now even if it is compatibility mode, can't BYOND start using a real browser instead of embedding IE..

I suggest this - https://developers.google.com/v8/get_started
I'm pretty sure Lummox hates V8 / Webkit, and instead prefers Gecko.
It doesn't have to be IE, but anything better than IE7 would be great.
In response to A.T.H.K
A.T.H.K wrote:
IE7 is so old now even if it is compatibility mode, can't BYOND start using a real browser instead of embedding IE..

I suggest this - https://developers.google.com/v8/get_started

Uhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh [sic]

Thats a javascript engine
This issue is mainly what killed Tanx for me. HDKM&K was what I used for mouse tracking up until the issue hit and I had to try and figure it out with limited tools.

As it turns out, this issue isn't BYOND specific. I found other site reporting similar issues of Javascript not reporting to IE or vice versa.

Turns out that it was an inconsistency between the two that is entirely circumstantial. Sometimes it happens, sometimes it doesn't, for weeks at a time as well.

Oracle (specifically SUN Microsystems) had stated on a few occasions that the problem was something that was being looked into. That was about two years ago and the problem still persists on and off.

It comes ultimately down to a standoff between Oracle and Microsoft, neither of them will rework their software to support the other for some reason, and as a result, usually, everytime there's a windows update, there's a patch that comes out for java+javascript just to restore functionality (sometimes).

I'm not 100% on what's exactly going on, but I do know the issue is an IE-Javascript communication error, and not BYOND itself.
Which kind of sucks because we can't do much to fix it.

I can suggest though: Remove Java then reinstall java with a browser like chrome or firefox, don't use Internet Explorer OR the Java installer. That sometimes fixed it for me... then sometimes it didn't

;_;
Oh jesus christ

Java != Javascript, Oracle (or sun) isnt even involved in any way
IE also comes with its own crappy Javascript engine, so does every other browser, Chrome uses V8, Firefox uses SpiderMonkey
I'm just mentioning what I've read about the issue, as it's not just affecting BYOND.
I have an update! The event.screenX/Y properties do not properly update on Kaiochao's and Bandock's computers. So far, it looks as if it's a Windows 8 issue for them. they posted their user agent strings in the other thread.

Kaiochao wrote:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
Bandock wrote:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; Media Center PC 6.0; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; InfoPath.3; Tablet PC 2.0)

We're currently looking to explain why this property isn't working in Windows 8. Either way, it doesn't explain the incompatibility with the other users running other versions of Windows or why it suddenly started working for ALL of them on the same day.
As I've been testing with Bandock, we've discovered the following annoyance that mystifies us more.

In this script, event.screenX works fine in the embedded browser.
<html>
<head>

<script>
function coordinates(event)
{
var x=event.screenX;
var y=event.screenY;
alert("X=" + x + " Y=" + y);
}

</script>
</head>
<body>

<p onmousedown="coordinates(event)">
Click this paragraph, and an alert box will alert the x and y coordinates of the cursor, relative to the screen.
</p>

</body>
</html>


In this script, it does not. Note that any other event property put in screenX's place does indeed work.
<HTML>
<HEAD>
<script type="text/javascript">
var wtl = 100,
mpx,
mpy,
paused = 0;
function pause() {
paused = 1;
}
function resume() {
paused = 0;
}
function setFPS(v) {
wtl=1000/v;
}
function start() {
doMouse();
}
function doMouse() {
document.getElementById('mouse').click();
}
function getMouse() {
if(!paused) {
if(event.screenX != mpx || event.screenY != mpy) {
window.location="byond://?jsm=true&screenX="+event.screenX+"&screenY="+event.screenY+"";
mpx=event.screenX;
mpy=event.screenY;
}
}
setTimeout(doMouse, wtl);
}
</script>
</HEAD>
<BODY onload="start()" >
<button id="mouse" onclick="getMouse()"></button>
</BODY>
</HTML>