FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

REQ:keypad script

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows
View previous topic :: View next topic  
Author Message
n3dv3d
Newbie


Joined: 02 May 2006
Posts: 7

PostPosted: Tue May 02, 2006 9:25 pm    Post subject: REQ:keypad script Reply with quote

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
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Tue May 02, 2006 10:58 pm    Post subject: Reply with quote

Hi!

When you say "does not work"; what do you mean, exactly?

Best.
--
Jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
n3dv3d
Newbie


Joined: 02 May 2006
Posts: 7

PostPosted: Tue May 02, 2006 11:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Wed May 03, 2006 11:36 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
n3dv3d
Newbie


Joined: 02 May 2006
Posts: 7

PostPosted: Wed May 03, 2006 6:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Wed May 03, 2006 8:03 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
n3dv3d
Newbie


Joined: 02 May 2006
Posts: 7

PostPosted: Wed May 03, 2006 8:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
n3dv3d
Newbie


Joined: 02 May 2006
Posts: 7

PostPosted: Fri May 05, 2006 6:15 pm    Post subject: Reply with quote

nothing?
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Fri May 05, 2006 6:44 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
n3dv3d
Newbie


Joined: 02 May 2006
Posts: 7

PostPosted: Fri May 05, 2006 8:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
n3dv3d
Newbie


Joined: 02 May 2006
Posts: 7

PostPosted: Tue May 09, 2006 10:23 pm    Post subject: Reply with quote

up...please...
Back to top
View user's profile Send private message
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Tue May 09, 2006 11:44 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group