applescript AI and iTunes
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?
any help as to where i should start?
Comments
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
and cant I just "record" doing it once and save the recodring and use that?
is there even apple script in osX?
<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
[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>
\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>
i thought applescript was supposed to be easy...
like a code language mixed with the English language.....
but what you need to add is a function which presses the "post" button
<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
<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 ?
<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
<strong>
If i can stay in OW and not have to go into iTunes, i'm down</strong><hr></blockquote>
down?
<strong>
down?</strong><hr></blockquote>
its slang, ie: im all for it, I'll do it... etc....
<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 ?