or Connect
AppleInsider › Forums › General › Genius Bar › applescript AI and iTunes
New Posts  All Forums:Forum Nav:

applescript AI and iTunes

post #1 of 21
Thread Starter 
I'd like to write a script (program, whatever works) that I could put in the pull-down menu of iTunes that would automatically post the information of the current song <a href="http://forums.appleinsider.com/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=6&t=001778" target="_blank">here</a>

any help as to where i should start?
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
post #2 of 21
It sounds like you're going through way too much trouble
post #3 of 21
Thread Starter 
hahahah im a lazy bastard and i want to learn how to use applescript... it shouldn't be too hard.. right?
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
post #4 of 21
Some starting points:

tell application "iTunes"
\tset this_name to the name of current track
\tset this_artist to the artist of current track
\tset this_album to the album of current track
end tell

I believe that you would want to use Mozilla for the next step, and do something like

tell application "Mozilla"
\tOpenURL "http://forums.appleinsider.com/cgi-bin/ultimatebb.cgi?ubb=reply&f=6&t=001778"
\tDo JavaScript "{var revisedMessage; var currentMessage = document.REPLIER.message.value;
revisedMessage = currentMessage+asdf; document.REPLIER.message.value=revisedMessage;
document.REPLIER.message.focus(); return;}"
end tell

But that doesn't seem to like the javascript . . . . and Javascript is not my area of expertise.

You could also try the insertion point or selection commands, but I can't seem to get that to work.

Hopefully, this will give you some idea of what needs to be done. It looked to me that mozilla had the most robust AppleScript environment just from the Dictionary, but I don't know. Good luck, you lazy bastard
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
post #5 of 21
Thread Starter 
wow great start.. what about OW?
and cant I just "record" doing it once and save the recodring and use that?
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
post #6 of 21
Thread Starter 
OK, backup a step... wht the hell happened to the script menu in iTunes in OS X?!?!?!!?!?

is there even apple script in osX?
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
post #7 of 21
[quote]Originally posted by Paul:
<strong>OK, backup a step... wht the hell happened to the script menu in iTunes in OS X?!?!?!!?!?

is there even apple script in osX?</strong><hr></blockquote>

Create a folder called scripts in ~/Library/iTunes/. That'll put a script menu up there. As for the rest... I'm eagerly awaiting an answer. It would be an AI spammers dream
post #8 of 21
Thread Starter 
ok i am trying to use [code] [post data string] -- Form posting data </pre><hr></blockquote> that string from the netscape dictionary, but it doesnt seem to be working the way I want it to, in fact AS seems to think that "post" is a variable not a function/command

[code] [post data this_name, this_artist, this_album] </pre><hr></blockquote> is what I have in the apple script and i get this error: {expected "," or "]" but got class name}
and it stops on the 'data' string...

am I making any sense to someone out there?

here is everything I have so far: [code] tell application "iTunes"
\tset this_name to the name of current track
\tset this_artist to the artist of current track
\tset this_album to the album of current track
end tell
tell application "Netscape"
\tGetURL "http://forums.appleinsider.com/cgi-bin/ultimatebb.cgi?ubb=reply&f=6&t=001778"
\t[post data this_name, this_artist, this_album]
end tell </pre><hr></blockquote>
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
post #9 of 21
what if u use "paste" instead of post ?
post #10 of 21
[code] tell application "iTunes"
\tset this_name to the name of current track
\tset this_artist to the artist of current track
\tset this_album to the album of current track
end tell
tell application "OmniWeb"
\tGetURL "http://forums.appleinsider.com/cgi-bin/ultimatebb.cgi?ubb=reply&f=6&t=001778"
\t[paste, this_name, this_artist, this_album]
end tell
</pre><hr></blockquote>
post #11 of 21
Thread Starter 
it says the variable paste is not defined...

i thought applescript was supposed to be easy...

like a code language mixed with the English language.....
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
post #12 of 21
Try dropping the brackets on the post line. Also, does it know where to post it? Do you need to select the text box as an object and insert the text there?
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
post #13 of 21
Thread Starter 
it seems that paste is not a command, and im trying to take this one step at a time.... once i get one thing working then i'll worry about the next thing.... so far im not too discouraged tho....
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
post #14 of 21
yeah, I saw that paste didn't worked...

but what you need to add is a function which presses the "post" button
post #15 of 21
Thread Starter 
[quote]Originally posted by Defiant:
<strong>yeah, I saw that paste didn't worked...

but what you need to add is a function which presses the "post" button</strong><hr></blockquote>

If i can find a way for AS to simulate the keyboard, with a series of tabs and return I should be able to press the button that way. If I cant, I dont mind pressing it myself @ least all of the typing will be done tho and it wont be as "spammer friendly" heh
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
post #16 of 21
If you are really serious . . . I mean $79 serious, you could get QuicKeys for OS X. With that, you have the capability to mix keystrokes and AppleScript, along with many other things. I think you could get it working with that, but it'll cost you 80 bucks.
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
Kappa Rho Alpha Theta Zeta Omega Nu Epsilon
Reply
post #17 of 21
[quote]Originally posted by Paul:
<strong>

If i can find a way for AS to simulate the keyboard, with a series of tabs and return I should be able to press the button that way. If I cant, I dont mind pressing it myself @ least all of the typing will be done tho and it wont be as "spammer friendly" heh</strong><hr></blockquote>

what if iTunes just pastes the text into the clipboard ? then you only would have to press apple-v in the browser, press "post" and there you go...

what do u think ?
post #18 of 21
Thread Starter 
[quote]Originally posted by Defiant:
<strong>

what if iTunes just pastes the text into the clipboard ? then you only would have to press apple-v in the browser, press "post" and there you go...

what do u think ?</strong><hr></blockquote>

If i can stay in OW and not have to go into iTunes, i'm down
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
post #19 of 21
[quote]Originally posted by Paul:
<strong>

If i can stay in OW and not have to go into iTunes, i'm down</strong><hr></blockquote>

down?
post #20 of 21
Thread Starter 
[quote]Originally posted by Defiant:
<strong>

down?</strong><hr></blockquote>

its slang, ie: im all for it, I'll do it... etc....
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
125/51041 (top .2449%)-Amie Street - awesome independent DRM-free music
People really have got to stop thinking there is only one operating system, one economic system, one religion, and one...
Reply
post #21 of 21
[quote]Originally posted by Paul:
<strong>

its slang, ie: im all for it, I'll do it... etc....</strong><hr></blockquote>

ah... <img src="graemlins/embarrassed.gif" border="0" alt="[Embarrassed]" /> and did u succeed yet ?
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Genius Bar
AppleInsider › Forums › General › Genius Bar › applescript AI and iTunes