VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. No Longer Mod tgpo's Avatar
    Join Date
    Feb 2002
    Location
    The South Side
    Search Comp PM
    If I want my applescript to run only every 5 seconds, how do I do this?

    If I want my applescript to stop itself when the program it is controling quits, what do I need to code?
    Quote Quote  
  2. i think i can answer your question, but you have to give some more specifics as to what you're trying to accomplish and which app you're trying to control. post some more info and i'll help you out.

    nick
    Quote Quote  
  3. No Longer Mod tgpo's Avatar
    Join Date
    Feb 2002
    Location
    The South Side
    Search Comp PM
    I'm writting an applescript that will update my aim profile with the song currently playing in iTunes. I can get it to do that, but the problem is when you close AIM the script is still running. So it opens AIM back up and updates my profile. When I close AIM I want the script to stop.
    Quote Quote  
  4. Member
    Join Date
    Sep 2002
    Location
    7th layer of hell
    Search Comp PM
    that type of script sounds like it may be too processor intensive (more so than necessary) if you do it via applescript.. there is actually already a system preference pane that does the job quite well, if you are just looking to get your feet wet with applescript i suggest another task to tackle

    http://www.versiontracker.com/dyn/moreinfo/macosx/17192

    thas the vt link for the pane ichat status.
    As below, so above and beyond, I imagine
    drawn outside the lines of reason.
    Push the envelope. Watch it bend.

    Over thinking, over analyzing separates the body from the mind. Withering my intuition leaving all these opportunities behind.
    Quote Quote  
  5. No Longer Mod tgpo's Avatar
    Join Date
    Feb 2002
    Location
    The South Side
    Search Comp PM
    Actually I have used the iChat version, but it didn't work under AIM,only iChat. Here is what I have so far.

    Code:
    repeat
    
    	tell application "iTunes"
    		-- now get some info
    		set myTrackName to name of current track
    		set myTrackAlbum to album of current track
    		-- note alternate syntax:
    		set myTrackArtist to current track's artist
    		set myTrackGenre to current track's genre
    	end tell
    	
    	
    	tell application "AOL Instant Messenger (SM)"
    		if online then
    			set profile to "I am listening to " & myTrackArtist & "-" & myTrackName & ". Off the album " & myTrackAlbum & ".  It is a " & myTrackGenre & " song."
    		end if
    		
    		
    	end tell
    	
    end repeat
    Quote Quote  
  6. bilestyle is correct, unfortunaly cpu cycles are used during the delay.
    However, this is what you were asking for, just change Safari to AIM.

    repeat
    tell application "System Events"
    set SafariExists to get (process "Safari" exists)
    if SafariExists = false then exit repeat
    display dialog "Safari is running"
    delay 5
    end tell
    end repeat
    display dialog "Safari is not running"
    Quote Quote  
  7. Member jbcandkc's Avatar
    Join Date
    Dec 2002
    Location
    Sin City
    Search Comp PM
    I was reading the May 2003 issue of Macworld and found 2 things that may be of interest.

    iChatStatus 1.2 - www.ittpoi.com

    Kung-Tunes 2.1 - www.kung-foo.tv

    i checked out the ittpoi site but couldn't find iChatStatus???
    found it at versiontracker www.versiontracker.com/dyn/moreinfo/macosx/17192

    Don't know if this is what you're looking for but though it might help.

    jbcandkc
    I'm just sitting here watching the wheels go round and round.
    -John Lennon
    Quote Quote  
  8. No Longer Mod tgpo's Avatar
    Join Date
    Feb 2002
    Location
    The South Side
    Search Comp PM
    Thanks for the links, but they don't work with AIM. I've kinda given up on the project, but it did help me with my coding know-how.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!