ASCII to trigger itunes songs in a specific folder

Hi all

This is my 1st post.
I am a complete newbie to applescript and my question is probably very very basic to many of you. <good hopefully I will get a reply :wink:

I simply want to trigger specific songs (say 4) in a specifc itunes folder, via chosen ASCII I assign.

How do I go about doing this. Does script editor have to be on?

Hope to hear from you soon.

Thanks in advance

phil

Hi Phil and welcome,

there is no way to assign a shortcut to a script without any external tool.
You can do it with QuicKeys, Butler, FastScripts, QuickSilver and there are probably a few more.

Of course you can play any song in iTunes with AppleScript.
The origin philosophy of iTunes is, that the user needn’t care about folders and paths.
It’s much easier to refer to the song by title or playlist

Hi Phil and welcome,
thanks

there is no way to assign a shortcut to a script without any external tool.

You can do it with QuicKeys, Butler, FastScripts, QuickSilver and there are probably a few more.

I’ve had a quick look @ FastScripts and Quiksilver but wasn’t able to do what I wanted. :expressionless:

Of course you can play any song in iTunes with AppleScript.
It’s much easier to refer to the song by title or playlist

That’s fine but can I trigger them each specific one w. the keyboard?

The reason I want this is for “Panic escape” in a live show. More specifically, I have a show coming were we do real-time audio/visual crowd captures as our source material and we’re accompanied by a dancer. And as everyone knows, computer software do crash once in a while. This while could be live. So, if it ever were the case I would want an “escape panic” pre-recorded track to be triggered w. an ASCII in itunes while I restart the software. <the way I programmed my software (max msp), the “data” or soundfiles would not be lost and could reloaded in the samplers. < anyways this an complete other topic :wink:

Thanks for you reply and I hope to here from you soon.

phil

create a playlist “Panic” in iTunes and put your songs into it
then save the following script somewhere and assign a shortcut with FastScripts to it


tell application "iTunes"
	play playlist "Panic"
end tell

Hi Stefan

Thanks for your help.

then save the following script somewhere
it doesn’t matter where. < just curious.

and assign a shortcut with FastScripts to it
this is what I wasn’t able to do.

tell application “iTunes”
play playlist “Panic”
end tell

Script editor replied :

iTunes got an error: can’t make some data into the expected type. < what is this ?? :confused:

sorry for my ignorance, scripting behaves differently in every software < anyways it’s different in the one I know.

thanks again

Hi again Stefan

I forgot to ask you;

Why are there no Applications to select from [< to create shortcuts of course], when I open my FastScripts Preferences??

thanks a million

phil

actually it doesn’t matter. For FastScripts it’s better to put it in ~/Library/Scripts ( ~ means /Users/myUser)

FastScripts > Preferences > Script Shortcuts

of course it does, if there is no playlist “Panic”.

Hi again Stefan

I forgot to ask you;

Why are there no Applications to select from [< to create shortcuts of course], when I open my FastScripts Preferences??

For FastScripts it’s better to put it in ~/Library/Scripts ( ~ means /Users/myUser)

That’s where it is !

of course it does, if there is no playlist “Panic”.

Of course i had created one :wink:

Maybe I’ll just restart my computer

My Os x is 10.4.11
PPC

phil

Hi Stefan

There was indeed a problem w. my setup. I had to upgrade my itunes version. Now the script works fine. Hopefully it was just that?
Still, after searching the net for applescript help, I ended up finding a few step through screen shots of FastScript. < And that also confirms that my FastScript is not behaving normally. < Unless again I’m not getting something.

I’ve now downloaded Butler and will give it a spin.

One Last question, Could using your ASCII as a controller to trigger things, all be done within the Script editor.
I know you said;

there is no way to assign a shortcut to a script without any external tool.

But to me it seems something that could be so simple in script command line;
tell application “itunes”/then folder name/ trackname/ to start when /combination ASCII 116 (t)/ctrl /option are pressed.
I mean this is so simple inside other scriptable software I use.

Here is an example of osascript that is used to pilot the [shell] object within the Maxmsp software.

osascript -e ‘tell application “iTunes”’ -e ‘set mytrack to (first track of view of front window whose (name contains “tracknamehere”))’ -e ‘play mytrack’ -e ‘end tell’
And this works perfectly. I can also decide on which ASCII I will use to trigger this command…
The problem is that this is the app. whom’s crashing I am preparing against.

When one is new to something < he is ignorant , not simple minded. Great generous people ,like you, in forums , like this ,help clear things up. Thanks an keep it up.

phil

what is mistakable in this sentence???

I wrote:

there is no way to assign a shortcut to a script without any external tool.

what is mistakable in this sentence???

Your right, I change the connotation of “to assign a shortcut” for to assign ASCII.

So, is it possible to assign ASCII from within Applescript?

What is osascript? ← This is my last question of that type. From now on I will get my hands a little more dirty and will probably questions like this will answer themselves :wink: ( I wouldn’T mind an answer that last one though!!)

thanks again for your time and efforts.

phil

What is ASCII in this coherence?

osascript is the shell command to execute AppleScript in a shell environment