FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

showing screen graphics

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


Joined: 19 Dec 2005
Posts: 13

PostPosted: Mon Dec 19, 2005 6:17 pm    Post subject: showing screen graphics Reply with quote

I lolve this new tool and have been using SC for all my presentations - it is simply brilliant - however I have been trying to get the applescripts to do what I want them to for a change with some success.

I have come stuck on one point

show screen message works fine for showing screen messages (!)

is there such a thing as

then show screen picture "Anderson:Users:Jonathan:Desktop:water.jpg" duration 5

I think there is but cannot find any docs to suppport this - I saw it in an iTUNES applescript to show album artwork.

Any ideas - it means I can flash up logos etc at the touch of a button !

Cheers

Jonathan[u][i][/i][/u]
Back to top
View user's profile Send private message
salling
Site Admin


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

PostPosted: Mon Dec 19, 2005 11:43 pm    Post subject: Reply with quote

Check out the SEC Helper scripting dictionary:

[code:1]
show screen reference -- the object for the command
[duration small real] -- The number of seconds the message is shown (0 means forever, or until you hide it)
[full screen boolean] -- Should the visuals take up all of the main screen?
[icon stop/volume/rewind/fast forward/next/mute/previous/play/pause] -- A built-in icon to be shown on the Macintosh display
[image Unicode text] -- The file path to an image to be shown on the Macintosh display
[message Unicode text] -- The text message to be shown on the Macintosh display
[picture data picture] -- An image to be shown on the Macintosh display
[percentage value small real] -- Value between 0.0 and 1.0 (0.5 = 50%)
[tiff data TIFF picture] -- An image to be shown on the Macintosh display
[/code:1]

As you can see, there are several alternatives, depending on the sort of image data you have.

If you want examples, the iPhoto or Find Caller in Address Book scripts should be helpful.

I hope this helped!

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


Joined: 19 Dec 2005
Posts: 13

PostPosted: Tue Dec 20, 2005 3:12 pm    Post subject: its the next bit I get in trouble with Reply with quote

Jonas,

Yes I have this bit but cannot find any info on the correct syntax to get to the next stage - ie filepath syntax - have you a working example that I can copy and amend ?

perhaps you could incude an example in your excelent incorporated scripts with the download bundle ?

Cheers

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


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

PostPosted: Tue Dec 20, 2005 4:04 pm    Post subject: Re: its the next bit I get in trouble with Reply with quote

Did you have a look at the scripts I hinted would show you these techniques?

Best.
--
Jonas

[quote="jyates"]Jonas,

Yes I have this bit but cannot find any info on the correct syntax to get to the next stage - ie filepath syntax - have you a working example that I can copy and amend ?

perhaps you could incude an example in your excelent incorporated scripts with the download bundle ?

Cheers

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


Joined: 19 Dec 2005
Posts: 13

PostPosted: Tue Dec 20, 2005 7:19 pm    Post subject: images Reply with quote

Yes I have been through loads of scripts but seem to be unable to find how to show an image using a file ref on the computer using applescript.
I just cannot work out which permuattion works and I have a degree in computer Science !!!!!! (admittedly 12 years ago!)

/anderson/users/jonthan/desktop/logo.gif

OR

~/anderson/users/jonthan/desktop/logo.gif

OR

anderson:users:jonthan:desktop:logo.gif

OR

"/anderson/users/jonthan/desktop/logo.gif"

the trouble is I cannot find the syntax anywhere either in your script examples or on the web (even at Mac Support which is outdated since 1999!) - if I have missed it then I must apologise - but you try searching the web for

"Applescript show screen image" - nohing comes up

Thanks for your patience

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


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

PostPosted: Tue Dec 20, 2005 7:26 pm    Post subject: Reply with quote

;-)

May I then suggest you try this?

set p to read (alias "anderson:users:jonthan:desktop:logo.gif") as picture
tell app "SEC Helper" to show screen picture p duration 5

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


Joined: 19 Dec 2005
Posts: 13

PostPosted: Tue Dec 20, 2005 7:59 pm    Post subject: so easy when you know how !!!! Reply with quote

Jonas,

Thats brilliant thankyou

May I also just take this time to say that I think your software is brilliant and has helped me deliver a more proffesssional presentation time after time

Cheers

Jonathan
Back to top
View user's profile Send private message
jyates
Newbie


Joined: 19 Dec 2005
Posts: 13

PostPosted: Tue Dec 20, 2005 8:08 pm    Post subject: Hmm! Reply with quote

Still not doing very well I am afraid - take a look at this screen grab of the file info and the code as well as the syntax error.

This zip file contains untitled2.png


any ideas ?

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


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

PostPosted: Wed Dec 21, 2005 12:10 am    Post subject: Reply with quote

Hm. The file must exist at that path. Is it? Is your hard drive's name really "anderson"?

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


Joined: 19 Dec 2005
Posts: 13

PostPosted: Wed Dec 21, 2005 11:10 am    Post subject: Anderson is the HD name Reply with quote

Anderson is the HD name

the full path is

Anderson/Users/Jonathan/Desktop/logo.gif or logo.jpg

Hmm! perhaps there is a small glitch in my settings somewhere

Jonathan
Back to top
View user's profile Send private message
jyates
Newbie


Joined: 19 Dec 2005
Posts: 13

PostPosted: Wed Dec 21, 2005 11:16 am    Post subject: I spelt my own name wrong in the script !!!!!! Reply with quote

I spelt my own name wrong in the script !!!!!!

it was Jonthan in the script not as it should be JonAthan

what an idiot I am !

Although it compiles , I still do not have an image on the screeen - I shall have a play today and see what I can come up with

Thanks for all the help so far Jonas

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


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

PostPosted: Wed Dec 21, 2005 4:27 pm    Post subject: Reply with quote

Sorry. My mistake. Change to:

tell application "SEC Helper" to show screen picture data p duration 5

Should be "picture data" instead of just "picture". This will work.

- jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jyates
Newbie


Joined: 19 Dec 2005
Posts: 13

PostPosted: Wed Dec 21, 2005 5:22 pm    Post subject: here is the entire code for this script Reply with quote

Jonas,

here is the entire code for this script its key "0" I am trying to assign the picture function to load my company logo.

It compiles but when I press "0" nothing happens when everything else works just fine and dandy ?

Cheers

JY


property repeatTimes : 1
property keymap_info : {{key_code:"s", key_title:"Nothing", key_description:"This is just a place holder"}, {key_code:"<", key_title:"Nothing", key_description:"This is just a place holder"}}

using terms from application "SEC Helper"

on process invoke a_terminal
tell a_terminal
set my_keypad to make new keypad screen
set p to read (alias "Anderson:Users:Jonathan:Desktop:logo.gif") as picture
tell my_keypad
make new text row with properties {textual content:"KEYER", horizontal alignment:center, font size:large}
make new text row with properties {textual content:"Jonathan", horizontal alignment:center, font size:large}
make new text row with properties {textual content:"Santeau", horizontal alignment:center, font size:large}
end tell
push my_keypad
end tell
end process invoke

on process key down the_key sent from the_keypad
if the_key is "1" then say "Santoe"
if the_key is "2" then say "O2 GO"
if the_key is "3" then say "Jonathan Yates"
if the_key is "4" then show screen message "I love water" duration 5
if the_key is "5" then show screen message "energise my water" duration 5
if the_key is "6" then show screen message "I love O2GO" duration 5
if the_key is "7" then show screen icon previous
if the_key is "8" then show screen icon stop
if the_key is "9" then show screen icon next
if the_key is "0" then show screen picture data p duration 5
if the_key is "*" then show screen message "Star"
if the_key is "#" then show screen message "Hash"
if the_key is "<" then say "pour"
if the_key is ">" then say "drink"
if the_key is "^" then say "shake"
if the_key is "v" then say "water"
return true
end process key down

end using terms from
Back to top
View user's profile Send private message
salling
Site Admin


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

PostPosted: Wed Dec 21, 2005 6:19 pm    Post subject: Reply with quote

Declare "p" as a property, or read the picture data just before you'll use it. The way you've coded this now, "p" is undefined (and you should find error messages to that effect in the Script Log).

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


Joined: 19 Dec 2005
Posts: 13

PostPosted: Wed Dec 21, 2005 6:31 pm    Post subject: Beauty Reply with quote

Spot on Jonas :

Thanks for all the help it works like a dream !!

Cheers and Happy Xmas

Jonathan
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 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