image
image

Go Back   macosx.com > Design, Media, Programming & Scripting > Software Programming & Web Scripting

Reply
 
Thread Tools
  #1  
Old October 2nd, 2004, 01:21 AM
Pengu's Avatar
Digital Music Pimp
 
Join Date: Nov 2002
Location: Um.. Here.
Posts: 1,591
Thanks: 0
Thanked 0 Times in 0 Posts
Pengu is on a distinguished road
Applescript to control iTunes

Hiyas,

I'm trying to build an AppleScript app to control iTunes. I've run into a problem with rewinding. It's simple enough on it's own, until you try to make ONE button do two things..

Code:
on clicked prev_button
tell application "iTunes"
rewind
end tell
end clicked
that will obviously rewind.

the same code with "back track" or "previous track" will either skip backwards one track, or skip to the beginning of the song (or to the prev. song if at the beginning already).

However, using on mouse down and on mouse up etc I cannot for the life of me work out how to get it to intelligently rewind if the button is held down, or skip backwards if clicked. I tried to work it out from the code in the default Konfabulator widget, but that mixes with javascript and I don't know enough about how Applescript stores variables, or the extra commands...

Any help on this would be greatly appreciated.
__________________
PowerMac G5 Dual 2.0Ghz | 1Gb | 250Gb | Bluetooth | NVidia GeForce 6800 Ultra DDL 256Mb | 20" Cinema Display | MX1000 Wireless Laser Mouse | OS X 10.3.9

PowerMac G4 400Mhz | 832Mb | 40Gb + 120Gb | OS X Server 10.3.8 - Web Dev, Proxy, Mail, NAT, Firewall, Backup

Netgear Gigabit Switch | Sony Ericsson P910i Smartphone | iPod Colour 60Gb
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 07:42 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.