View previous topic :: View next topic |
Author |
Message |
n3dv3d Newbie
Joined: 02 May 2006 Posts: 7
|
Posted: Tue May 02, 2006 9:25 pm Post subject: REQ:keypad script |
|
|
hi,sorry for my english but i m italian... :roll:
i have tried this script
http://www.salling.com/forums/viewtopic.php?t=2930
but Unfortunately not work on my moto v3x,if is it possible i need a script to use key arrow up and arrow down....
Anyone out there able to help me out?
thanks a lot
bye |
|
Back to top |
|
 |
salling Site Admin
Joined: 27 Jul 2004 Posts: 7498 Location: Stockholm, Sweden
|
Posted: Tue May 02, 2006 10:58 pm Post subject: |
|
|
Hi!
When you say "does not work"; what do you mean, exactly?
Best.
--
Jonas |
|
Back to top |
|
 |
n3dv3d Newbie
Joined: 02 May 2006 Posts: 7
|
Posted: Tue May 02, 2006 11:24 pm Post subject: |
|
|
hi,thanks a lot for yor answer...however the script start and show the text " demo" and " Use the d-pad", i press any key on my phone but nothing happen on the pc... why??!
ps:excuse me for my bad english
bye |
|
Back to top |
|
 |
salling Site Admin
Joined: 27 Jul 2004 Posts: 7498 Location: Stockholm, Sweden
|
Posted: Wed May 03, 2006 11:36 am Post subject: |
|
|
Hm. There's a couple of things here:
1. What do you expect will happen?
2. What version of the client software are you using 3.0.36 or greater is required for the keymapping on the Motorolas to work. If the iTunes controller (and others) work, you should be alright.
3. I cannot be sure you've put the script together correctly. What exactly are you trying to do?
Best.
--
Jonas
[quote="n3dv3d"]hi,thanks a lot for yor answer...however the script start and show the text " demo" and " Use the d-pad", i press any key on my phone but nothing happen on the pc... why??!
ps:excuse me for my bad english
bye[/quote] |
|
Back to top |
|
 |
n3dv3d Newbie
Joined: 02 May 2006 Posts: 7
|
Posted: Wed May 03, 2006 6:23 pm Post subject: |
|
|
1 i expect that the key press on my phone made an action on the pc,i mistake?
2.my client is 3.0.1.347
3.i follow the istructions in this post
http://www.salling.com/forums/viewtopic.php?t=2930
can you post me a your keypad script for try please?
thank's a lot |
|
Back to top |
|
 |
salling Site Admin
Joined: 27 Jul 2004 Posts: 7498 Location: Stockholm, Sweden
|
Posted: Wed May 03, 2006 8:03 pm Post subject: |
|
|
Hi there,
1. The script doesn't really do much (as it's written). It simulates arrow keys. That's all. Is this what you tested/expected?
2. That is the PC software version. I meant the client version (the software on your phone).
Best.
--
Jonas |
|
Back to top |
|
 |
n3dv3d Newbie
Joined: 02 May 2006 Posts: 7
|
Posted: Wed May 03, 2006 8:21 pm Post subject: |
|
|
hi,
1.yes i've tested all arrow key but not works
2.sorry,however the client on my phone is the 3.0.36
why doesn't work in your opinion? |
|
Back to top |
|
 |
n3dv3d Newbie
Joined: 02 May 2006 Posts: 7
|
Posted: Fri May 05, 2006 6:15 pm Post subject: |
|
|
nothing? |
|
Back to top |
|
 |
salling Site Admin
Joined: 27 Jul 2004 Posts: 7498 Location: Stockholm, Sweden
|
Posted: Fri May 05, 2006 6:44 pm Post subject: |
|
|
I think you may have midded the red/bold note at the top of the thread you linked to.
Alternatively, you made a mistake when putting the script together. You should check the script log for errors (available from your task tray).
Best.
--
Jonas
[quote="n3dv3d"]nothing?[/quote] |
|
Back to top |
|
 |
n3dv3d Newbie
Joined: 02 May 2006 Posts: 7
|
Posted: Fri May 05, 2006 8:39 pm Post subject: |
|
|
hi,this is the script:
[quote]
var widget = CreateKeypadScreen( "mykeypad_" );
widget.title = "Keypad Sample";
widget.CreateRow( "Demo", scCenter, scClip, scLarge );
widget.CreateRow( "Use the d-pad", scCenter, scWrap, scMedium );
theTerminal.Push( widget );
function mykeypad_KeyDown(theScreen, theKey)
{
if( theKey == "s" ) {
// VK_MEDIA_PLAY_PAUSE
SendKeystroke( 0xB3, false );
} else if( theKey == "v" ) {
// VK_DOWN
SendKeystroke( 0x28, false );
} else if( theKey == "^" ) {
// VK_UP
SendKeystroke( 0x26, false );
} else if( theKey == "<" ) {
// VK_LEFT
SendKeystroke( 0x25, false );
} else if( theKey == ">" ) {
// VK_RIGHT
SendKeystroke( 0x27, false );
} else if( theKey == "u" ) {
// VK_VOLUME_UP
SendKeystroke( 0xAF, false );
} else if( theKey == "d" ) {
// VK_VOLUME_DOWN
SendKeystroke( 0xAE, false );
} else if( theKey == "c" ) {
// VK_VOLUME_MUTE
SendKeystroke( 0xAD, false );
}
// Keep the keypad active
return true;
} [/quote]
and this is the error log:
[quote] Keypad Sample - Errore di compilazione di Microsoft JScript
[Line: 21 (1)] Errore di sintassi
}
[/quote]
what i mistake? |
|
Back to top |
|
 |
n3dv3d Newbie
Joined: 02 May 2006 Posts: 7
|
Posted: Tue May 09, 2006 10:23 pm Post subject: |
|
|
up...please... |
|
Back to top |
|
 |
salling Site Admin
Joined: 27 Jul 2004 Posts: 7498 Location: Stockholm, Sweden
|
Posted: Tue May 09, 2006 11:44 pm Post subject: |
|
|
If you had read the advice in my last post, you would have seen the red/bold note I mentioned... Here it is (abbreviated to fit your needs):
[quote]
PLEASE NOTE: The SendKeystroke() API used in the example below is retired as of 3.0.1. Instead, please use this:
SendVirtualKeystroke(
virtual keycode value,
shiftState,
ctrlState,
altState,
winState);
[/quote]
If you read the error message you got, and count (in your script) to the line number it mentions, you'd see that there's a problem with the call to SendKeystroke() API. The quote above, explains why, and what you need to do about it. For instance, instead of
SendKeystroke( 0xB3, false );
use:
SendVirtualKeystroke( 0xB3, false, false, false, false );
I hope this makes it easier for you.
Best.
--
Jonas
[quote="n3dv3d"]up...please...[/quote] |
|
Back to top |
|
 |
|