Can I do this??

Discussion in 'OT Technology' started by Gary78, Apr 11, 2005.

  1. Gary78

    Gary78 Active Member

    Joined:
    Dec 17, 2001
    Messages:
    6,307
    Likes Received:
    0
    Location:
    Australia
    Hay Guys :wavey:

    I just bought a new iMac 20" er and i'm only just aquanting myself with how to use the thing. I know there is an option to turn it on and off at a certain time each day automatically. Is there a way I can set iTunes to fire up and start playing when the PC starts up? I'm going away for 5 days and want it to play music during the day to reduce the risk of being broken into (i've been burgled twice in the past 8 months). I don't really want to leave it playing day and night for the whole time though.
     
  2. maczter

    maczter Life is trying things to see if they work.

    Joined:
    Sep 30, 2003
    Messages:
    3,622
    Likes Received:
    0
    Location:
    Austin, TX
    sounds like a job for applescript.

    we'll need to know your address and when you'll be gone before we can offer much more help. ;)
     
  3. Gary78

    Gary78 Active Member

    Joined:
    Dec 17, 2001
    Messages:
    6,307
    Likes Received:
    0
    Location:
    Australia
    :mamoru:

    :squint:

    Last two times they got $5500 and $6500 worth of goods from me. :wtc:
     
  4. maczter

    maczter Life is trying things to see if they work.

    Joined:
    Sep 30, 2003
    Messages:
    3,622
    Likes Received:
    0
    Location:
    Austin, TX
    damn. that sucks. shame on me for making light of the situation. :o

    as you mentioned, you can set your mac to turn on and off at prescribed times, then add iTunes to your startup items (under the "Accounts" settings).

    from there, you could set up an applescript to make iTunes play and pause at set or even random times. unfortunately, at this time, all i can tell you is that it can be done, but i don't know how to do it myself yet.

    any applescript savvy folks around here that can help?
     
  5. Bolicious

    Bolicious Handleobraese

    Joined:
    Aug 5, 2000
    Messages:
    43,793
    Likes Received:
    0
    Location:
    Ellicott City, MD
    Replace all the locks on the house and put braces on sliding glass doors. Talk to your neighbors and ask them to look out for anything strange. Tell them your situation and they'll be more willing to help. Also, talk to your local police and see if they can make a few stops just to check things out. Being that it's happened 2 times in the last 8 months, I'm sure they would be able to do something for you.
     
  6. agent0068

    agent0068 OT Supporter

    Joined:
    Jun 28, 2002
    Messages:
    39,833
    Likes Received:
    0
    you can slap together some trivial applescripts (i.e. one to start playing music, one to stop playing music--i bet you can find something like this online or could just open script editor, hit record, go to itunes, hit play, go back to script editor, stop recording...) and then use a utility like cronnix (which allows you to schedule launching programs at set times)

    also, there are certain programs (meant for laptop users) to phone home to you in some way or another in the event that it's stolen (it can't hurt!)

    hope this helps
     
  7. Skoles

    Skoles Guest

    I would record yourself doing normal activities. Moving dishes around, running the water or shower and even talking on the phone. Have these plus some songs in your iTunes playlist and it will sound like someone is home.
     
  8. falconbrad

    falconbrad "You're one angry white boy."

    Joined:
    Dec 20, 2003
    Messages:
    166
    Likes Received:
    0
    Location:
    South Central
    I'll write an AppleScript for you. But after 24.
     
  9. falconbrad

    falconbrad "You're one angry white boy."

    Joined:
    Dec 20, 2003
    Messages:
    166
    Likes Received:
    0
    Location:
    South Central
    OK, so I wrote an Applescript for you since I'm such a nice guy. It starts up at launch (when you set it to run automatically using the User prefs) and then waits for a variable amout of time from 1 min to 2 hours. After that, it will start your music from the playlist titled "AntiTheft Playlist". Put at least 2.5 hours of music in there, because then, after 30 minutes to 2.5 hours, it will stop iTunes and then shut your computer down. Use the Energy Saver prefs to set a time when the computer will start up everyday. The code is super-simple:

    Code:
    set delaytime to random number from 1 to 120
    
    delay delaytime * 60
    
    tell application "iTunes"
    	play playlist "AntiTheft Playlist"
    end tell
    
    delay (delaytime + 30) * 60
    
    tell application "iTunes"
    	stop
    end tell
    
    tell application "Finder"
    	shut down
    end tell
    The application can be downloaded here.
     
  10. maczter

    maczter Life is trying things to see if they work.

    Joined:
    Sep 30, 2003
    Messages:
    3,622
    Likes Received:
    0
    Location:
    Austin, TX
  11. falconbrad

    falconbrad "You're one angry white boy."

    Joined:
    Dec 20, 2003
    Messages:
    166
    Likes Received:
    0
    Location:
    South Central
    I should probably put something in there to randomize the songs in the playlist. I was just gonna grab stuff from his library and have it randomly play that, but I figure he might not want grunge rock (not that you listen to that, I dunno, I just thought you might want to control the music it was playing). If you want, it's an easy job for me (or you) to add to the play line and have it randomize and repeat, if that's what you want.

    If you do not want to do that, you could always select the shuffle and/or repeat options in iTunes. I just tested it, and it will keep those options set even though you close the program (make sure you set it while you're in your "AntiTheft Playlist"!!!!!!)

    Now all we need to do is wire one of those "Home Commander" things to your Mac via USB and start turning on and off the lights at specific times. Or you could just use a timer, but that's not nearly as much fun.

    Ok, I need to get back to my lab report.
     
  12. Gary78

    Gary78 Active Member

    Joined:
    Dec 17, 2001
    Messages:
    6,307
    Likes Received:
    0
    Location:
    Australia
    Shit dude, thanks alot. When i get home from work i'll play around with it and try and get it to work. Cheers :bigok:
     
  13. Gary78

    Gary78 Active Member

    Joined:
    Dec 17, 2001
    Messages:
    6,307
    Likes Received:
    0
    Location:
    Australia
    ok, i saved the applescript and set it to open at start up, but it doesn't actually 'run' when the script gets opened. What am I missing? :dunno:
     
  14. falconbrad

    falconbrad "You're one angry white boy."

    Joined:
    Dec 20, 2003
    Messages:
    166
    Likes Received:
    0
    Location:
    South Central
    It does run. It will just take anywhere up to 2 hours in order to start the music. I put that in there so it didn't seem as though you were using a script to control your computer every day :) Would you prefer it if I made it pop up with a dialog box that tells you how much time you have to wait before it begins playing music... eliminate the pause altogether... ?
     
  15. maczter

    maczter Life is trying things to see if they work.

    Joined:
    Sep 30, 2003
    Messages:
    3,622
    Likes Received:
    0
    Location:
    Austin, TX
    did you catch the part about making a new playlist in iTunes called "AntiTheft Playlist"?
     
  16. dmora

    dmora Guest

    I love applescript :love: Its so clean and easy.
     
  17. falconbrad

    falconbrad "You're one angry white boy."

    Joined:
    Dec 20, 2003
    Messages:
    166
    Likes Received:
    0
    Location:
    South Central
    Hey, did this ever work for you? I'm curious if you actually ended up using it.
     
  18. Gary78

    Gary78 Active Member

    Joined:
    Dec 17, 2001
    Messages:
    6,307
    Likes Received:
    0
    Location:
    Australia
    Yeah, i used it. Put it in my start up folder, but i found that it didn't shut down and restart. iTunes showed that it played on the first day, but there was no action after that. Not to worry though. I didn't get broken into :)
     
  19. falconbrad

    falconbrad "You're one angry white boy."

    Joined:
    Dec 20, 2003
    Messages:
    166
    Likes Received:
    0
    Location:
    South Central
    Haha, interesting. I used a variation of the same program to display a counting dialog and then shut down the computer and start it up using the energy prefs and it worked fine. I wonder if it had something to do with not telling iTunes to shut down. Well, whatever. I'm glad it (kinda, sorta) worked, and I'm glad nothing was stolen. Hope you had a good trip.
     
  20. Gary78

    Gary78 Active Member

    Joined:
    Dec 17, 2001
    Messages:
    6,307
    Likes Received:
    0
    Location:
    Australia

    Had a blast. Sunny Weather. Loads of Women in skimpy clothes getting about. Snagged a root. All went well.

    I'm still playing around with the MAC though. Have very limmited understanding of how to use the fucker. Think i need to get photoshop or some other photo editing software on there. iphoto doesn't resize images so i can send them on email.. :(
     
  21. falconbrad

    falconbrad "You're one angry white boy."

    Joined:
    Dec 20, 2003
    Messages:
    166
    Likes Received:
    0
    Location:
    South Central
    Glad you had a good time!

    What version of iPhoto are you using? If you are in the application and select a number of photos and then click the email button, then it will give you the option to resize the photos to something smaller or keep them at full scale. Also, iPhoto includes an export option that allows you to select the maximum dimensions of the exported photos. You could then zip those up and send them off. Or you could use the online photo gallery export feature. It puts together an entire HTML gallery, including thumbnails, titles, and comments. You would be able to just upload that folder that it creates to an existing webserver and have a simple, but fully functioning, photo album. No php, etc to mess with.
     
  22. agent0068

    agent0068 OT Supporter

    Joined:
    Jun 28, 2002
    Messages:
    39,833
    Likes Received:
    0
    you need myPhoto for sharing :o

    http://agent0068.dyndns.org/~mike/projects/myPhoto
     
  23. Gary78

    Gary78 Active Member

    Joined:
    Dec 17, 2001
    Messages:
    6,307
    Likes Received:
    0
    Location:
    Australia
    I tried that.. it works. But that means that i have to go through that process for every photo if i want to say, upload it to OT uploads? My old windows seemed much easier, open it in editing form, reduce by 50%, presto, done.
     
  24. maczter

    maczter Life is trying things to see if they work.

    Joined:
    Sep 30, 2003
    Messages:
    3,622
    Likes Received:
    0
    Location:
    Austin, TX
    if you want to just save out an image to upload to OT, etc. (instead of e-mailing it), just click on the image you want to save out, go to the "share" menu, then select "export". the rest should be self-explanatory. (change the format to JPG).

    if you wanted to save out multiple images to the same size, just select all the images in the group with the same dimensions, and folow the above directions. to select multiple images at the same time, just hold down the apple key and click on each image you want to add images to the selection.
     

Share This Page