FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

what am i doing wrong?

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


Joined: 13 Nov 2006
Posts: 8

PostPosted: Wed Nov 15, 2006 7:47 pm    Post subject: what am i doing wrong? Reply with quote

Hello,

For the application Isadora i like to write a script that if i push a key on my phone, Isadora gets a value. In this example i tried to use the '4' key on my phone. I copied and paste some scripts i found on this forum, and i must admit i don't know much of applescript. Can anyone explain to me what i'm doing wrong?

[color=green]using terms from application "SEC Helper"

tell application "SEC Helper"
enter keypad mode text return & "Video" & return & "Scratch" & return & return & "press 4" key repeated "keyHeldDown" key depressed "keyPressedOnce"
end tell

on keyHeldDown(keyCode)
if keyCode is "4" then
tell application "SEC Helper"
tell application "Isadora 1.1b28"
broadcast to document 1 value 1.2 on channel 5
end tell
end tell
end if
end keyHeldDown

end using terms from[/color]

if i only run the script below in applescript, a node in the apllication Isadora gets a trigger.

t[color=green]ell application "Isadora 1.1b28"
broadcast to document 1 value 1.2 on channel 5
end tell[/color]

thanks

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


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

PostPosted: Wed Nov 15, 2006 8:07 pm    Post subject: Reply with quote

Not sure what the problem is. Did you check the Script Log available from the menu bar status item?

Also, you seem to be basing your script after a pre-3.0 model. This should be okay (for now), but I think you're better off simply creating a new script (choose the "Keypad" template) and paste your 3-liner into it (in the key handler method)

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


Joined: 13 Nov 2006
Posts: 8

PostPosted: Thu Nov 16, 2006 1:15 am    Post subject: another try Reply with quote

Thanks for the advise.

I tried two things. The easy way is to add a keypad item in the clicker items window and apply the Isadora script to key 4.
This way works.

But if i try the hard way and use the keypad handler template and paste the Isadora script i get something like this and it still doesn't work:

[color=green]using terms from application "SEC Helper"

tell application "SEC Helper"
enter keypad mode text return & "Video" & return & "Scratch" & return & return & "press 4"
end tell


on process key down the_key sent from the_keypad
set repeatTimes to 1
if the_key is "4" then
tell application "Isadora 1.1b28"
broadcast to document 1 value 1.2 on channel 5
end tell
end if
return true -- make sure the keypad stays up (prevents stray returns value from above to pass)
end process key down[/color]

Is it possible there is something missing between [color=green]if the_key is "4" then
tell [/color]
:? I think 'm gonna get myself some applescript manuals

good night

Jippie
Back to top
View user's profile Send private message
jippie
Newbie


Joined: 13 Nov 2006
Posts: 8

PostPosted: Mon Nov 20, 2006 3:48 pm    Post subject: edit kaypad item Reply with quote

Hello,

Is it also possible to edit a keypad item (from the clicker items window) in the script editor? When i attach the Isadora script to a key in that way it works. But i can't edit the keypad. I tried a thousand other ways but is still doesn't work. :cry: . Is it also possible it has got something to do with my phone?
I've got a Nokia N73.

best

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


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

PostPosted: Mon Nov 20, 2006 4:36 pm    Post subject: Re: edit kaypad item Reply with quote

What do you mean by "edit a keypad"? You can drag and drop scripts to/from the various keys.

Best.
--
Jonas

[quote="jippie"]Hello,

Is it also possible to edit a keypad item (from the clicker items window) in the script editor? When i attach the Isadora script to a key in that way it works. But i can't edit the keypad. I tried a thousand other ways but is still doesn't work. :cry: . Is it also possible it has got something to do with my phone?
I've got a Nokia N73.

best

Jippie[/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jippie
Newbie


Joined: 13 Nov 2006
Posts: 8

PostPosted: Tue Nov 21, 2006 9:58 pm    Post subject: finally Reply with quote

Hello Jonas

I admit my last reply was a bit fuzzy, but i was getting a bit frustrated. But i finally have a breaktrough!. jippie!!!! I managed to use the keypad template script finally. Thanks anyway

best

Jippie
Back to top
View user's profile Send private message
jippie
Newbie


Joined: 13 Nov 2006
Posts: 8

PostPosted: Thu Nov 23, 2006 4:15 pm    Post subject: more connections Reply with quote

Hello,

Is it possible to connect with more than one phone to a computer with salling clicker and specify for each phone different clicker items?. When i am connected and another phone connects, i will be disconnected.

best

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


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

PostPosted: Thu Nov 23, 2006 4:31 pm    Post subject: Re: more connections Reply with quote

Nope. This is not possible. Sorry.

Best.
--
Jonas

[quote="jippie"]Hello,

Is it possible to connect with more than one phone to a computer with salling clicker and specify for each phone different clicker items?. When i am connected and another phone connects, i will be disconnected.

best

Jippie[/quote]
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jippie
Newbie


Joined: 13 Nov 2006
Posts: 8

PostPosted: Fri Nov 24, 2006 11:02 pm    Post subject: extension Reply with quote

Hello,

Is there a way to get rid of the .scpt extension when you put a script in the clicker items window?
What i do:
I finish the script in script editor. then i save it as a script, then i drag the script to the script window in salling clicker, then i export the script as a cgz. And then i drag the cgz file in the clicker items window. But then the scpt extension is back. mmmmm

best

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


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

PostPosted: Sat Nov 25, 2006 1:10 pm    Post subject: Reply with quote

Clicker items can be renamed. Script items cannot, however; they retain their original name.

Instead of "initing" your script from Script Editor, try creating it from withing Clicker. Did you try this?

Best.
--
Jonas
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 Mac 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 cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group