RedEagle wrote:Hy there!
Thanks for your help ajs15822! By the way is there another way to play videos on a Navi besides on a flash movie? I've tried several types of video files and some only play the sound
By the way I've set forceUpdate
Thanks once again
The problem with external video plugins (quicktime, windows media, etc.) is that they are rendered onto a separate surface and positioned on the page to look as if they are actually 'embedded'. Thus, when we grab the page via LLMozLib, all we get is a black box where the external video might be. We would have to delve into LLMozLib to figure out how to circumvent this issue.
Jerrith wrote:I've been trying out using Navi together with CEGUI to make a chat window. I've got it basically working, but there's a few things I was wondering if anyone had some ideas about:
1) Is there an easy way to disable Mozilla automatically getting the keyboard input? I haven't hooked up any keyboard input injection yet, but I noticed that once I've clicked on it, I can use the arrow keys (and space) to scroll... I'd rather pass it keys, than have get things on its own.
2) I've noticed at times that it will change the mouse cursor on me, just until I move the mouse again. I've got my own mouse cursor, with a blank / empty windows cursor while in my app window, however Mozilla will cause a standard windows cursor to be drawn for a moment, after events like mouse clicks, or mouse wheel scroll.
For those curious, here's a sample of what it looks like at the moment.
I recommend doing what LordLoriK said (exclusive keyboard mode). I will see what I can do to provide an interface for manually injecting keyboard input without automatic injection (requires modification to LLMozLib).
To really get rid of the system cursor when its over the app, NaviMouse uses the win32 call 'ShowCursor(false)'.
I lol'd @ your Chat's text. The design is very slick!
Lord LoriK wrote:If you acquire the keyboard in exclusive mode before setting up LLMozLib, it won't capture the keys. I'm doing that and passing characters with a JS function. Quite annoying but I'm getting an issue with composite characters if I don't. Here's my (ugly) code:
It works this way: you set things up calling input_init(). This will set up a function to get the current focused control. Then you pass each keypress with inject_key_down() and inject_key_up(), plus an inject_char() to inject characters.
If you want to run an event after each injected char, you assign a function to key_up taking one argument (the char, duh).
This "works" but not fully: now you cannot move the cursor, nor copy/paste text. Only writing works. The numbers you see are OIS keycodes. Refer to OIS for additional info.
Hope it helps. If anyone feels like improving my crappy JS, go ahead but please send me the improved version.
Here's my stab at it:
Code: Select all
<script type="text/javascript">
var focusedEle = null;
window.addEvent('domready', function()
{
$$('input, textarea').each(function(ele)
{
ele.addEvent('focus', function(evt){ focusedEle = evt.target; });
});
});
function keyPress(charCode, keyCode, ctrl, alt, shift)
{
var evt = document.createEvent("KeyboardEvent");
evt.initKeyEvent("keypress", true, true, null, ctrl, alt, shift, false, keyCode, charCode);
if($defined(focusedEle))
focusedEle.dispatchEvent(evt);
}
</script>
See:
http://developer.mozilla.org/en/docs/DO ... itKeyEvent
I'm still getting permission exceptions with the above code when invoking left and right arrows, everything else seems OK.
Besides any of that, the current LLMozLib code dump has support for unicode char injection. I'll see what I can do to migrate Navi over to it.