Log in

View Full Version : [Mojo] Mojo build 3 is ready to test ** Testing Closed **



Freddie
12-01-2009, 09:39 AM
This is a "revise" build instead of a "new features" build. It contains some changes that were suggested by conversations in other threads here.

1. You can now turn broadcasting off from the Actions menu. (Later there will be more convenient ways.)

2. Error messages and tracing have been added to both log files to try to diagnose the reported bug that makes the program fail to start.

3. A new item, "Debug," has been added to the main menu. It allows you to look at various things.

4. The installer''s security checking was disabled to see if this will have any effect on firewall messages (it probably won't).

5. Broadcasting was changed slightly to ensure that when Mojo broadcasts automatic repeated keypresses that are generated by a keyboard, WoW receives *exactly* the same signals that it would receive from the keyboard itself. As part of this change, Mojo now displays "prev state" in "Your last action." This means "previous key state," i.e., the state of the key before your last action.

6. The scrolling code from the main window was rewritten to try to eliminate reported flicker. You can select "Test" under "Debug" on the main menu if you want to see the window scroll indefinitely at 33 messages per second.

Freddie
12-01-2009, 11:08 AM
On second thought, I'd like to ask people to test something.

Start Mojo on two PC's.

Load a bunch of WoW windows on both PCs. Leave them at the account name screen and put the cursor in "account name" so you can see your typing.

Edit: You don't need WoW accounts for this. You can just launch WoW many times and leave it at the account name screen.

Select Debug : Test on both Mojos. This will put them under artificial stress.

Bring WoW to the foreground on one PC.

Spam keys as fast as you can on that PC.

See if the broadcast keeps up in all WoWs.

Thanks a lot! :)

ElectronDF
12-01-2009, 11:25 AM
Minor note, my XP machines computer names are truncating the last char. Ex:
fullgames.FULL.loca
fullvideo.FULL.loca
My Win 7 machine shows as full name on all machines.
Not a big deal, just thought I would mention it.

Freddie
12-01-2009, 11:27 AM
Thanks, I'll look into it.

Freddie
12-01-2009, 12:12 PM
Minor note, my XP machines computer names are truncating the last char. Ex:
fullgames.FULL.loca
fullvideo.FULL.loca
My Win 7 machine shows as full name on all machines.
Not a big deal, just thought I would mention it.

I can't duplicate this, so I made a test build (number 4). Could you do me a big favor:

1. Run build 4 simultaneously on both machines.

2. Let it run for about 30 seconds on both machines.

3. On both machines, go to "Debug" on the menu and select "Show engine log."

(The reason for running only 30 seconds is that the engine log will very rapidly fill with repeated lines that we don't need.)

Could you either email me or paste here the engine logs from both PCs? .

Thanks a lot.

Bettysue
12-01-2009, 12:23 PM
Running the test as stated in your post, I had 10 WoW clients running on each computer. The broadcasting of keys seemed to keep up quite nicely, with no noticeable lag at all.

The one thing I did see while taking advantage of the keyrepeating (hold a key down in this case Backspace) was that the computer with the keyboard being pressed it would fall behind the second comp. For example I could type 50 characters into the name box, on all of the clients (remote and local), and then hold backspace till all the characters were gone on the remote machine and the local machine would have a few characters left to delete.
I know you mentioned it somewhere but shifted keys did not send to the remote clients, ( @ ? ! < > etc. )

The download and install was phenomenal with no issues. Broadcasting worked only when "a" WoW window had focus, anything other than WoW would stop broadcasting. Broadcasting stopped when using the option in the menu as would be expected. Broadcasting even worked while using HKN2 and moused over to the remote machine, with no strange double key type stuff. (by double key I mean the local machine kb broadcasting the keys and the remote machine being controlled by the local kb sending a key. )

There is no way to stop the test other than to close the mojo window???

Anyway it's coming along pretty nicely by the looks of it, let me know if you need more details, or any other help...I'm usually around and bored :D


Edit: Wow it got better while i was testing it, I feel so outdated now, these dang computer machines are getting too fast for me :P

Freddie
12-01-2009, 12:41 PM
Running the test as stated in your post, I had 10 WoW clients running on each computer. The broadcasting of keys seemed to keep up quite nicely, with no noticeable lag at all.
I'm glad to hear that!


The one thing I did see while taking advantage of the keyrepeating (hold a key down in this case Backspace) was that the computer with the keyboard being pressed it would fall behind the second comp. For example I could type 50 characters into the name box, on all of the clients (remote and local), and then hold backspace till all the characters were gone on the remote machine and the local machine would have a few characters left to delete.
Hmm, I wonder if that's due to an error. . Maybe, while you typed, some characters failed to reach the remote, so there were more characters to delete on the local. Do you think that might be the reason?


I know you mentioned it somewhere but shifted keys did not send to the remote clients, ( @ ? ! < > etc. )
Right, that's not done yet.


The download and install was phenomenal with no issues.
Great.


Broadcasting worked only when "a" WoW window had focus, anything other than WoW would stop broadcasting. Broadcasting stopped when using the option in the menu as would be expected. Broadcasting even worked while using HKN2 and moused over to the remote machine, with no strange double key type stuff. (by double key I mean the local machine kb broadcasting the keys and the remote machine being controlled by the local kb sending a key. )
Great. That's all as intended at this early stage. It's just a barebones implementation of broadcasting to make sure the basic code works right. I like to do things one step at a time and try to get each step right before the next.


There is no way to stop the test other than to close the mojo window???
Right, I just added it to the program temporarily to see if the new scroll code works properly. I wasn't even planning to mention it here. But then it occurred to me, after posting the build, that it's a decent stress test. Maybe I'll add an off switch and keep it in the program for the rest of the alpha/beta test.


Anyway it's coming along pretty nicely by the looks of it, let me know if you need more details, or any other help...I'm usually around and bored :D
That's a great offer. I'll take you up on it. If you're interested, it would probably help me to work interactively with somebody, maybe even talk on the phone.


Edit: Wow it got better while i was testing it, I feel so outdated now, these dang computer machines are getting to fast for me :P
It's incredible isn't? It just amazes me how fast my slow crappy code is running! :)

Bettysue
12-01-2009, 12:57 PM
Hmm, I wonder if that's due to an error. . Maybe, while you typed, some characters failed to reach the remote, so there were more characters to delete on the local. Do you think that might be the reason?


Yes now that I think about it, it is most likely my computer, it was running an AV scan in the background trying again it doesn't seem to be duplicating the lost keys thing it was doing before.



Great. That's all as intended at this early stage. It's just a barebones implementation of broadcasting to make sure the basic code works right. I like to do things one step at a time and try to get each step right before the next.

Seems like a very good plan there's no point to building towers in quicksand.




That's a great offer. I'll take you up on it. If you're interested, it would probably help me to work interactively with somebody, maybe even talk on the phone.

That may be quite an expensive endeavor unless you have a VoIP phone or something along the lines of free telephony, as I currently reside in Korea...and they just so happen to have the same outrageous long distance bills the rest of the world does...damn capitalism :)

ElectronDF
12-01-2009, 01:03 PM
This is from Win 7 machine (ElectronDF)


-------------------------------------------------------------------------------------
mojo_engine Log File
-------------------------------------------------------------------------------------
mojo_engine 0.0.1 build 4
File opened at 09:55:40 on Tuesday, December 1, 2009
net_stuff.cpp 66: In get_full_dns_name(); GetComputerNameExe returned ElectronDF.FULL.local
net_stuff.cpp 67: Still in get_full_dns_name(); pRet == ElectronDF.FULL.local
DNS name: ElectronDF.FULL.local
OS version: Microsoft Windows 7 (build 7600), 64-bit
-------------------------------------------------------------------------------------
net_stuff.cpp 66: In get_full_dns_name(); GetComputerNameExe returned ElectronDF.FULL.local
net_stuff.cpp 67: Still in get_full_dns_name(); pRet == ElectronDF.FULL.local
cScribPack.cpp 108: Unable to find DlgMonitor.InputEventsHead in multimap.
cScribPack.cpp 108: Unable to find DlgMonitor.MemosHead in multimap.
cScribPack.cpp 108: Unable to find DlgMonitor.ConnectionsHead in multimap.
initialize_engine.cpp 92: About to load default scribs.
cScribMgr.cpp 128: Scribs loaded from memory: 25 scribs.
initialize_engine.cpp 94: Just loaded engine's compiled scribs; qty = 25
initialize_engine.cpp 122: About to call cInputEvent::load_scribs()
initialize_engine.cpp 129: About to start messenger thread.
initialize_engine.cpp 137: About to check versions.
initialize_engine.cpp 169: About to start hooks thread.
initialize_engine.cpp 177: About to start g_Pool.
net_stuff.cpp 66: In get_full_dns_name(); GetComputerNameExe returned ElectronDF.FULL.local
net_stuff.cpp 67: Still in get_full_dns_name(); pRet == ElectronDF.FULL.local
cSignature.cpp 50: In cSignature::cSignature; get_full_dns_name() returned ElectronDF.FULL.local
initialize_engine.cpp 185: About to start g_Finder.
net_stuff.cpp 66: In get_full_dns_name(); GetComputerNameExe returned ElectronDF.FULL.local
net_stuff.cpp 67: Still in get_full_dns_name(); pRet == ElectronDF.FULL.local
cSignature.cpp 50: In cSignature::cSignature; get_full_dns_name() returned ElectronDF.FULL.local
net_stuff.cpp 66: In get_full_dns_name(); GetComputerNameExe returned ElectronDF.FULL.local
net_stuff.cpp 67: Still in get_full_dns_name(); pRet == ElectronDF.FULL.local
cScribMgr.cpp 128: Scribs loaded from memory: 46 scribs.
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == ElectronDF.FULL.local
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullgames.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullvideo.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullgames.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullvideo.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == ElectronDF.FULL.local
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullgames.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullvideo.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == ElectronDF.FULL.local
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullgames.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullvideo.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == ElectronDF.FULL.local
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullgames.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullvideo.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == ElectronDF.FULL.local
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullgames.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullvideo.FULL.loca





XP (FullVideo)


-------------------------------------------------------------------------------------
mojo_engine Log File
-------------------------------------------------------------------------------------
mojo_engine 0.0.1 build 4
File opened at 09:54:59 on Tuesday, December 1, 2009
net_stuff.cpp 66: In get_full_dns_name(); GetComputerNameExe returned fullvideo.FULL.local
net_stuff.cpp 67: Still in get_full_dns_name(); pRet == fullvideo.FULL.local
DNS name: fullvideo.FULL.local
OS version: Microsoft Windows XP Professional Service Pack 3 (build 2600)
-------------------------------------------------------------------------------------
net_stuff.cpp 66: In get_full_dns_name(); GetComputerNameExe returned fullvideo.FULL.local
net_stuff.cpp 67: Still in get_full_dns_name(); pRet == fullvideo.FULL.local
cScribPack.cpp 108: Unable to find DlgMonitor.InputEventsHead in multimap.
cScribPack.cpp 108: Unable to find DlgMonitor.MemosHead in multimap.
cScribPack.cpp 108: Unable to find DlgMonitor.ConnectionsHead in multimap.
initialize_engine.cpp 92: About to load default scribs.
cScribMgr.cpp 128: Scribs loaded from memory: 25 scribs.
initialize_engine.cpp 94: Just loaded engine's compiled scribs; qty = 25
initialize_engine.cpp 122: About to call cInputEvent::load_scribs()
initialize_engine.cpp 129: About to start messenger thread.
initialize_engine.cpp 137: About to check versions.
initialize_engine.cpp 169: About to start hooks thread.
initialize_engine.cpp 177: About to start g_Pool.
net_stuff.cpp 66: In get_full_dns_name(); GetComputerNameExe returned fullvideo.FULL.local
net_stuff.cpp 67: Still in get_full_dns_name(); pRet == fullvideo.FULL.local
cSignature.cpp 50: In cSignature::cSignature; get_full_dns_name() returned fullvideo.FULL.local
initialize_engine.cpp 185: About to start g_Finder.
net_stuff.cpp 66: In get_full_dns_name(); GetComputerNameExe returned fullvideo.FULL.local
net_stuff.cpp 67: Still in get_full_dns_name(); pRet == fullvideo.FULL.local
cSignature.cpp 50: In cSignature::cSignature; get_full_dns_name() returned fullvideo.FULL.local
net_stuff.cpp 66: In get_full_dns_name(); GetComputerNameExe returned fullvideo.FULL.local
net_stuff.cpp 67: Still in get_full_dns_name(); pRet == fullvideo.FULL.local
cSignature.cpp 115: In cSignature::parse(); *ppRetHostName == fullvideo.FULL.loca
cScribMgr.cpp 128: Scribs loaded from memory: 46 scribs.
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == ElectronDF.FULL.local
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullvideo.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == ElectronDF.FULL.local
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullvideo.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == ElectronDF.FULL.local
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullvideo.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == ElectronDF.FULL.local
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullvideo.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == ElectronDF.FULL.local
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullgames.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullvideo.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == fullgames.FULL.loca
cSignature.cpp 115: In cSignature:: parse(); *ppRetHostName == ElectronDF.FULL.local

Freddie
12-01-2009, 01:38 PM
Electron, thanks a lot. This is fixed (I think) in build 5 which can be downloaded now.

This turned out to be a very bad bug and I'm glad you reported it. Depending on some random factors, it could easily crash the program.

Freddie
12-01-2009, 01:40 PM
Seems like a very good plan there's no point to building towers in quicksand.
That's a great metaphor. I'm going to remember that and repeat it when I explain to people why supporting HotkeyNet 1 has become a nightmare. :)


That may be quite an expensive endeavor unless you have a VoIP phone or something along the lines of free telephony, as I currently reside in Korea...and they just so happen to have the same outrageous long distance bills the rest of the world does...damn capitalism :)
Pay for phone calls? That's so twentieth century! :)

I like to use Skype for this ... it's free and it works quite well.

http://www.skype.com/

(Calls with Skype are free if both people are using it.)

Flekkie
12-01-2009, 04:48 PM
5. Broadcasting was changed slightly to ensure that when Mojo broadcasts automatic repeated keypresses that are generated by a keyboard, WoW receives *exactly* the same signals that it would receive from the keyboard itself. As part of this change, Mojo now displays "prev state" in "Your last action." This means "previous key state," i.e., the state of the key before your last action.Thanks Freddie, I really appreciate that.


6. The scrolling code from the main window was rewritten to try to eliminate reported flicker. You can select "Test" under "Debug" on the main menu if you want to see the window scroll indefinitely at 33 messages per second.TBH, I wasn't so worried about the flicker, more about the autorepeats. The flicker actually served its purpose by indicating the autorepeat to me.

It still flickers, just a bit less, but I am quite happy about it as a user.


Shortcuts and finding the program
I accidentally deleted my desktop shortcut, and had to search my C drive to find where Mojo had hidden itself. It was not in the C:\Program Files (x86) folder as I expected, but in C:\Users\MyLogonName\App Data\.. and so on. The App Data directory is a hidden directory! So very hard to find.

Also, the shortcut doesn't behave like a normal shortcut when I right-click it; there is no description of a target path or compatibility tab.

Not a problem for me, but just to flag it up to start thinking of ways to make it easier for Joe Public.


Security alert
Got the Windows security alert again. Oh well, it's just the built-in firewall doing its job. It correctly identified the software as Mojo so you twiddled the right knob for that.


Stress Test (1 PC only)
Performed the test as requested, but I only have the one PC so bear that in mind.

I opened 30 WoW windows. With no CPU core allocation, they were all stuttering a bit to start with. Then I started the menu option Debug -> Test, focused a WoW window, and Shift-Tabbed to the 'account name' field, and typed something like "This IS A Test" at normal typing speed (no, I am not a typing master!).

The results on each of the 30 windows was not uniform. The letters were correct and in the correct order. However their shift states were slightly different in each window. It was not the same error in some, but various different errors across most.

From this I suppose that Mojo is sending the key downs and ups, but not specifying what order to perform them in? I wonder if there would be a hit to performance to ensure actions are performed in a sequence? I can think of several ways to do it, but most would probably be wrong since I know nothing about the actual mechanisms in play. Or maybe I have guessed the wrong cause.

Oh yes, and as someone else mentioned, I had to quit Mojo in order to stop the test.


Mojo's Actions Pane / Log / whatever its called !
I have started to form some ideas about the "Mojo's actions on this PC" frame. Would you like me to start a separate thread on it, or add them here?

ElectronDF
12-01-2009, 05:01 PM
Shortcuts and finding the program
I accidentally deleted my desktop shortcut, and had to search my C drive to find where Mojo had hidden itself. It was not in the C:\Program Files (x86) folder as I expected, but in C:\Users\MyLogonName\App Data\.. and so on. The App Data directory is a hidden directory! So very hard to find.

Also, the shortcut doesn't behave like a normal shortcut when I right-click it; there is no description of a target path or compatibility tab.

Not a problem for me, but just to flag it up to start thinking of ways to make it easier for Joe Public.




There should be a Start Menu group called Mojoware that has the Mojo shortcut in it. (was there for me)
Also, if I remember, correctly, you can just go the the website and download it again (basically reinstalls overtop of itself) and it should put a shortcut back on the desktop.

Flekkie
12-01-2009, 05:06 PM
Ah haa. OK. Personally I use a shortcut bar mod ('Free Launch Bar', aka 'True Launch Bar' for the paid version). I don't really like the Start menu. But if the functionality is there, it's my bad for ignoring it.

Freddie
12-01-2009, 05:48 PM
Shortcuts and finding the program
Everything you describe is the behavior of ClickOnce, the installer, which is written by Microsoft. I have practically no control over its behavior except to choose whether or not to use it.

it's impossible to make a real shortcut for a ClickOnce application. ClickOnce installs programs into hidden directories chosen by itself. Like Electron said, ClickOnce creates an entry for Mojo under "Mojoware" in the Start Menu. There's an item on Mojo's menu under debug that shows you the installation directory.

I'll add a menu item to the next build that attempts to recreate the pseudo-shortcut, but obviously if people lose the shortcut, they'll need to launch Mojo without it before they can restore it.

I'm not sure it's a good idea to use ClickOnce. I'm hoping to see a lot of reactions from people before deciding whether to keep it or replace it. When I started using ClickOnce (with HotkeyNet 2) it annoyed me a lot but I've come to love it. The idea of it, which I didn't understand at the beginning, is that Mojo is like a web page and ClickOnce is like a browser and the fake shortcut is like a bookmark to the webpage. Your local copy of Mojo is like a page that your browser has cached temporarily for your convenience. You don't know or care where your browser keeps cached pages, and that's why you're not supposed to care where Mojo is on your hard disk. The real copy is on the web.


Got the Windows security alert again. Oh well, it's just the built-in firewall doing its job. It correctly identified the software as Mojo so you twiddled the right knob for that.
Okay thanks.


The results on each of the 30 windows was not uniform. The letters were correct and in the correct order. However their shift states were slightly different in each window. It was not the same error in some, but various different errors across most.

From this I suppose that Mojo is sending the key downs and ups, but not specifying what order to perform them in? I wonder if there would be a hit to performance to ensure actions are performed in a sequence? I can think of several ways to do it, but most would probably be wrong since I know nothing about the actual mechanisms in play. Or maybe I have guessed the wrong cause.
Let me make a guess of my own. I'm guessing that you're assuming that Mojo sends (for example) shift-down, followed by a letter, followed by shift-up, and this is what makes the letter capitalized.

That's what I would assume too if I didn't have experience writing software for Windows's keyboard API, but in fact that's not how shift states work. (At least not in this case.) Yes, Mojo sends shift-down and shift-up to WoW, but this has no effect on the shift state. In this case, WoW relies on the operating system to change the shift state, and the operating system doesn't know anything about the broadcasted signals. They are getting sent to WoW not to the operating system.

The only thing that is changing the shift state in this case is your finger. When you press the shift key, the operating system sees your action and changes the shift state. The reason things get out of sync is because the broadcasting takes so much time that it gets delayed relative to your finger actions.

By the way, this is why keys don't get shifted on remote machines. Your finger isn't on their keyboards. :) (I'll have to find a solution for that pretty soon.)


Mojo's Actions Pane / Log / whatever its called !

I have started to form some ideas about the "Mojo's actions on this PC" frame. Would you like me to start a separate thread on it, or add them here?
Excellent! A separate thread is probably a good idea because I don't want to keep these "build" threads going after the next build gets released.

Flekkie
12-01-2009, 06:04 PM
Does that mean you need a way to interfere with the shift state of the operating system? So either tell the OS to change shift state without pressing the actual key (for the slave machines), or tell it to ignore the keyboard shift-up (and other modifiers) and save them up until the shifted actions have been.. actioned ?

Eeh, there's no way I'll solve it for you, but wishing you good luck with it :)


I'll try cooking up a new thread.

BTW, do you have plans to stay here for long, or will it be a Mojo forums soon or something?

Freddie
12-01-2009, 06:23 PM
BTW, do you have plans to stay here for long, or will it be a Mojo forums soon or something?
I'm inclined to stay here because there are lots of people here. That's why I didn't create a forum on Mojo's website. What do you think?


Does that mean you need a way to interfere with the shift state of the operating system?
That's one choice. Another choice would be to inject the key signals into WoW in a slightly different way that bypasses the function call that WoW makes to the OS to find out whether keys should be shifted. There are probably other choices too.


or tell it to ignore the keyboard shift-up (and other modifiers) and save them up until the shifted actions have been.. actioned ?
I'm not sure what you mean.


Eeh, there's no way I'll solve it for you, but wishing you good luck with it :)
Thanks, I'll need it! :)

thinus
12-01-2009, 08:38 PM
Just an update on the version 2 problem where it seemed to crash on my system:
All good in the latest build. It updated and runs fine.

Freddie
12-01-2009, 09:12 PM
Thanks. It was probably caused by the bug that Electron found earlier today. And if it wasn't, it will happen again and make the exception handler show a message box instead of exiting silently.

Freddie
12-03-2009, 02:10 PM
Let's move over to the new thread for build 6.

http://www.dual-boxing.com/showthread.php?t=26710