FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Flash Presentation

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


Joined: 26 Oct 2005
Posts: 11
Location: Utrecht, the Netherlands

PostPosted: Wed Oct 26, 2005 7:44 pm    Post subject: Flash Presentation Reply with quote

I'm planning to make a Flash presentation clicker... how can I see if flash supports scripting? and if not is it possible to use keys like the arrow keys?
Back to top
View user's profile Send private message
salling
Site Admin


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

PostPosted: Wed Oct 26, 2005 7:57 pm    Post subject: Reply with quote

Great!

I don't know if Flash is scriptable (ActiveScripting/JScript/VBScript, that is).

But you may be able to get by with arrow key simulation. Please see this thread for a thorough exploration of this subject:

http://www.salling.com/forums/viewtopic.php?t=2930

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


Joined: 26 Oct 2005
Posts: 11
Location: Utrecht, the Netherlands

PostPosted: Thu Oct 27, 2005 9:11 pm    Post subject: Reply with quote

anyone knows if flash is scriptable and how I could find out? at the moment im using the Powerpoint remote but I have to cut out a lot of functions that I wish I could have in the flash... for instance the slideshow on the phone just have controls atm... anyone who would be so kind to help me out?
Back to top
View user's profile Send private message
guiome
Newbie


Joined: 10 Feb 2006
Posts: 7

PostPosted: Fri Feb 10, 2006 1:52 pm    Post subject: Reply with quote

Hello,
I'm using arrow key simulation and it works great.
However it doesn't work on a Macromedia Shockwave application.
I'm suprised because when I press the PC keyboard arrows it works... and when I press the phone keypad arrows it doesn't !

Could you help me find the way to control Macromedia Shockwave application with salling clicker ?

Thank you


Here is the code i use

function mykeypad_KeyDown( theScreen, theKey )
{
try {
if( theKey == "v" ) {
SendVirtualKeystroke(0x28,false,false,false);
} else if( theKey == "^") {
SendVirtualKeystroke(0x26,false,false,false);
} else if( theKey == "<") {
SendVirtualKeystroke(0x25,false,false,false);
} else if( theKey == ">" ) {
SendVirtualKeystroke(0x27,false,false,false);
}
} catch( e ) {}
return true;
}
Back to top
View user's profile Send private message
salling
Site Admin


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

PostPosted: Fri Feb 10, 2006 3:01 pm    Post subject: Reply with quote

Hm. When you run this, is the Shockwave window/view front-most (accepting keystrokes)?

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


Joined: 10 Feb 2006
Posts: 7

PostPosted: Fri Feb 10, 2006 3:48 pm    Post subject: Reply with quote

Thank you Jonas.

When the Shockwave application is running (in fullscreen) I use the PC keyboard to control it (space barre, return, backspace, arrows...). Then I guess the application is accepting keystrokes.
On keydown, my lingo script uses for instance : keycode = 126 for the UP arrow...

The Salling Clicker script uses the code 0x26 for VK-UP... that's may be why the macromedia application doesn't react.

Do you think this could be the issue ?

Thx.
Guiome
Back to top
View user's profile Send private message
salling
Site Admin


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

PostPosted: Fri Feb 10, 2006 3:58 pm    Post subject: Reply with quote

Hm. My knowledge of Lingo is absolutely nil, but I can imagine a couple of reasons for the problem.

Perhaps Shockwave has a treshold time for keystrokes? When you simulate a keystroke like you've done in your Clicker script, the keystroke is very quick.

Does your Lingo script react to keystrokes or, trying to explain this, keys being "held" down?

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


Joined: 10 Feb 2006
Posts: 7

PostPosted: Fri Feb 10, 2006 5:31 pm    Post subject: Reply with quote

No the shockwave app doesn't react to any phone keystroke.
[b]It used to work with a MAC [/b](i guess the "tell application" script was usefull). But today I use a PC and I want this Salling Clicker script to work with any app and moreover with shocwave app.

You may be right, shockwave is may be not fast enought... but that surprises me.

Is there a way to send keystrokes events that are andestood by a shocwave application ?

I hope so... and I will try to find the way.
If you also want to find the solution, I'll be very happy.

Have fun this week-end !
I hope to hear from you next week :P

Guiome
Back to top
View user's profile Send private message
guiome
Newbie


Joined: 10 Feb 2006
Posts: 7

PostPosted: Fri Feb 10, 2006 5:50 pm    Post subject: Reply with quote

It works !!!!!!!!!!

I'm sorry Jonas for the time you spent on it, but the issue was on my lingo code.
Back to top
View user's profile Send private message
guiome
Newbie


Joined: 10 Feb 2006
Posts: 7

PostPosted: Fri Feb 10, 2006 6:11 pm    Post subject: Reply with quote

my ligo code does :
-----------------------------------------------
on keyDOWN
if the keycode = 126 then
goUP = true
end if
end

on keyUP
if the keycode = 126 then
goUP = false
end if
end

On enterframe
if goUP = true then
goUPscript
end if
end
-----------------------------------------------

Since the keystroke of the Clicker script is very quick, my lingo script only take in account the keyUP message. And then nothing happens.

I have to find the way to create a Clicker script that sends a KeyDOW event and after that a KeyUP event.
If you have any script that does it, please let me know.

Thanks
Guiome
Back to top
View user's profile Send private message
guiome
Newbie


Joined: 10 Feb 2006
Posts: 7

PostPosted: Fri Feb 10, 2006 6:44 pm    Post subject: Reply with quote

I did it !
[b]Thank you for your help Jonas[/b]
I used the [i]SendVirtualKeyDown [/i]and then the [i]SendVirtualKeyUp [/i]script.
It works great !


function mykeypad_KeyDown( theScreen, theKey )
{
try {
if( theKey == "v" ) {
SendVirtualKeyDown( 0x28 );
} else if( theKey == "^") {
SendVirtualKeyDown( 0x26 );
} else if( theKey == "<") {
SendVirtualKeyDown( 0x25 );
} else if( theKey == ">" ) {
SendVirtualKeyDown( 0x27 );

// space barre
} else if( theKey == "s" ) {
SendVirtualKeyDown( 0x20 );
// options
} else if( theKey == "1" ) {
SendVirtualKeyDown( 0x08 );
// back
} else if( theKey == "3" ) {
SendVirtualKeyDown( 0x0D );
}
} catch( e ) {}

// affiche les touches du telephone
ShowMessage( theKey );

return true;
}

function mykeypad_KeyUp( theScreen, theKey )
{
try {
if( theKey == "v" ) {
SendVirtualKeyUp( 0x28 );
} else if( theKey == "^") {
SendVirtualKeyUp( 0x26 );
} else if( theKey == "<") {
SendVirtualKeyUp( 0x25 );
} else if( theKey == ">" ) {
SendVirtualKeyUp( 0x27 );

// space barre
} else if( theKey == "s" ) {
SendVirtualKeyUp( 0x20 );
// options
} else if( theKey == "1" ) {
SendVirtualKeyUp( 0x08 );
// back
} else if( theKey == "3" ) {
SendVirtualKeyUp( 0x0D );
}
} catch( e ) {}

// affiche les touches du telephone
ShowMessage( theKey );

return true;
}
Back to top
View user's profile Send private message
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