This one into a apple script

How can I put this into an apple script
sudo ditto -rsrc \
/System/Library/User\ Template/English.lproj \
/Users/admin

Its been a long whiIe since I used applescript but, I believe you use the command:
do shell script
and then your script underneath.
"sudo ditto -rsrc \"
"/System/Library/User\ Template/English.lproj \"
"/Users/admin"
you may have to add something like this into it.
user name "AdminUsername" password "AdminPassword" with administrator privileges
Again its been a while but its a start

Similar Messages

  • Hi guys this is my first apple script so tell me what you think!

    Hi guys this is my first apple script so tell me what you think
    display dialog "Daily morning routine will now open"
    say "Good morning I will now play your playlist,"
    say "Ok now i will open up your wmail and look for new mail"
    open application "iTunes"
    tell application "iTunes" to play library playlist
    --Note: This tells itunes to play the library
    open application "Mail"
    tell application "Mail" to check for new mail
    --Note: This tells mail to open and check for new email
    say "your new mail is waiting to be selected,"
    --Note: This lets the user get an update on what the CPU is doing
    say "I will now open up your weather, and trafic conditions,"
    display dialog "Please enter your zip codes on both sights"
    tell application "Safari" to open location "http://www.weather.com/"
    say "please enter you zip code"
    tell application "Safari" to open location "http://www.traffic.com"
    say "once again please enter your zip code"
    --Note: This tells safari to open up the twp web sights listed

    So far, so good, and welcome to AppleScript - you could save yourself a little typing by using a timeout with your first dialog and building the URLs with your zip code (I just looked at the URL bar):
    display dialog "Daily morning routine will now open" giving up after 4
    set ZipCode to "95014" -- change as needed
    open location "http://www.weather.com/weather/local/" & ZipCode & "?lswe=" & ZipCode & "&lwsa=WeatherLocalUndeclared&from=whatwhere"
    open location "http://my.traffic.com/Controller?appname=mytraffic&workflowname=routing&pointA=" & ZipCode & "&pointB=" & ZipCode

  • HT2731 How do I change my credit card information to my old credit card? I use this one for all Apple charges.

    How do I post my charges to my current credit card? We've been using this one except for 1 chg I used as a gift. Prefer our WFB bank card to be on all Apple and iTunes Store as well as all the charges as they've been for 4 years. Thanks. Lilaine Hartmann Freeman
    <Phone Number Edited by Host>

    Hi Lilaine Hartmann Freeman,
    Thanks for using Apple Support Communities.  This article explains how to update the credit card information for your Apple ID using iTunes:
    iTunes Store: Changing your payment information
    http://support.apple.com/kb/ht1918
    When you update your credit card number or billing address through the iTunes Store, any equivalent information you might use with iCloud, Apple Store online, iPhoto, or Aperture is also updated.
    Cheers,
    - Ari

  • Breaking into Automator/Apple script

    Hi,
    I am needing to make some automator scripts with QuickTime in mind. Is there a source of tutorials or books? Or is it just easier to find a "Automator Scripter?"
    Automator sounds just amazing, but where on earth do I start?
    thanks,

    The product page for Automator is a pretty good place to start. See the links on the side column under "Explore Automator" for some how-to's, website, and book recommendations.
    If you have specific questions you can post them here on the board. If time is a factor you can hire assistance for very little money. I'm on iChat at [email protected] which is also my email address if you'd like to talk more about that.

  • So my iPod touch 4g 8gb cracked the other day. This is my SECOND iPod, receiving this one free from apple. I know there is no chance for gettin free again, but what does the repair price(100$ online) replace OR repair? Because i see some say 150$.

    I really need to know. ASAP

    The Apple exchange price is $199 for 65 GB 4G and $99 for the other 4Gs. The 5G is $149.
    Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar

  • Selecting Different Printer With Apple Script.

    Hi,
    I am currently in the process of making a script to be able to print off labels without the need of much user input (read from a document or e-mail) and I want to be able to set the printer when it goes to the print screen.
    this is the final apple script step in the application cmd+p brings up the 1st print menu the return takes it to the second print menu cmd+v pastes predifind by the user the ammount of copys they want
    on run {input, parameters}
              tell application "Labels & Addresses"
      activate
                        tell application "System Events"
      keystroke "p" using command down
                                  delay 1
      keystroke return
                                  delay 1
      keystroke "v" using command down
                                  delay 1
                                  tell application "System Events"
                                            tell process "Labels & Addresses"
                                                      click (menu item whose description is "Printer")
                                                      click (menu item "Zebra Technologies ZTC GK420t" whose description is "Printer")
                                            end tell
                                  end tell
                                  return input
                        end tell
              end tell
    end run
    now there is chance to change the printer selection twice once in the 1st print screen and once in the 2nd print screen the only problem is im not sure how to apple script to select the right printer from the drop down menu, I got the code from a forum but I think it was old code as when I tested it it was returning errors so I modified it a bit and now it just struggles finding the menu item with description of printer.
    Does anyone know what I would have to use for it to select the right printer? (The Zebra Technologies ZTC GK420t)
    Help would be greatly appricited!
    Thanks,
    Bruce
    P.S. sorry the code is a bit messy!

    Im NOT sure if you have just made this a little over complicated… This works just fine for me. Tested with about a dozen psd layers…
    tell application "Adobe InDesign CS2"
    tell active document
    tell rectangle 1
    tell graphic 1
    tell graphic layer options
    set GLC to count of graphic layers
    repeat with i from 1 to GLC
    if name of graphic layer i ≠ "Blue" then
    set current visibility of graphic layer i to false
    else
    set current visibility of graphic layer i to true
    end if
    end repeat
    end tell
    end tell
    end tell
    end tell
    end tell
    This variant also works as I would have expected too… Retaining visibility from a list…
    tell application "Adobe InDesign CS2"
    tell active document
    tell rectangle 1
    tell graphic 1
    tell graphic layer options
    set On_List to {"Red", "Aqua", "Orange"}
    set GLC to count of graphic layers
    repeat with i from 1 to GLC
    if name of graphic layer i is not in On_List then
    set current visibility of graphic layer i to false
    else
    set current visibility of graphic layer i to true
    end if
    end repeat
    end tell
    end tell
    end tell
    end tell
    end tell

  • Apple Script to watch any network connectivity to my mac

    Hi All,
    I am looking for a apple script, when that runs it tell or display a dialog box with connection number(s) or the connected machine info or IP address or when any other machine connect to my mac then display a dialog box that someone is connected.
    is this is possible via apple script??

    You need "Little Snitch"
    I believe there's a trial version available...  It's good for like 30 days.
    A script to do what you're looking for would be really really complicated.
    http://www.obdev.at/products/littlesnitch/download.html

  • I have a 2 year old iphone4 that got ran over by a car and although the outside screen isn't broken it is inside somehow, is it true I can take this into an apple store and get a discount when I buy a new one? Thanks

    have a 2 year old iphone4 that got ran over by a car and although the outside screen isn't broken it is inside somehow, is it true I can take this into an apple store and get a discount when I buy a new one? Thanks

    You can exchange for an out of warranty exchange iPhone 4 at a price of $149 in US
    you get an as new iPhone 4 and the Apple genius bar take your "bits"
    Apple are about to offer a trade in programme in the US but I believe the donor iPhone must be in full working order to qualify

  • My iPad won't let me sign into my Apple ID when I try and download an app it asks for my id and password and when i type it in the iPad displays a message saying cannot connect to iTunes Store. However when i do this on my phone it works perfectly.

    My iPad won't let me sign into my Apple ID when I try and download an app it asks for my id and password and when i type it in the iPad displays a message saying cannot connect to iTunes Store. However when i do this on my phone it works perfectly. Even when i sign in and out.
    Has anyone else had this problem? If so how can I fix this?

    Remember, any purchased item from the itunes store is forever associated with the Apple ID used to buy it.  So when you get prompted for an ID/password and it doesn't accept it, then you are using the wrong ID.
    Go to Settings>iTunes and App Stores, be sure it's logged into the ID you have set on the iphone (since that one seems to be connecting with the right ID).  If you've done this, then you might wait a bit to see if the "cannot connect to .. store" message has to do with internet connections.

  • I have an iPod classic and I accidently disconnected just before it was okay to disconnect. I have had this happen before and the only way to fix it was to take it into an apple store. Is there any way to fix it from home?

    I have had this happen before. However, there was a moment when my computer froze and a series of thoughts happened and things happened with my computer. I thought for some reason that with my computer freezing right after I connected my iPod that my computer didn't recognize the fact that my iPod was connected. So I know what needs to be done to fix this porblem. My question is can I fix this at home or do I need to go into an Apple store to get it fixed? When this happened before, I had tried a couple different things before taking it in and nothing had worked.

    You need a computer with iTunes and an internet connection
    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    If recovery mode does not work try DFU mode.                         
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings         
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup (if you have one) see:
    iOS: How to back up
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload iTunes purchases by:
      Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • I am about to go get my 4th iphone 4s since November!  Up in the left coener where it shows your signal strength, it goes into searching mode and stays there.  Kills my battery.  This one has lasted the longest-I got it December 23.  Any ideas out there?

    I am about to go get my 4th iphone 4s since November!  Up in the left corner where it shows your signal strength, it goes into searching mode and stays there.  Kills my battery.  While in searching, no calls can be made/recieved, no internet, etc. This one has lasted the longest-I got it December 23.  Any ideas out there?

    Both.  The first two, I did use my itunes.  The guy at the apple store said that could be the problem.  The last time they gave me a new phone and SIM card, and the tech said it wouldnt be the itunes.  Just to be safe, I never connected this phone to the itunes until last night-after it started searching- to save everything since I'm sure they will be replacing the phone today.  But hey, thanks for the suggestions.  I'm about at my wits end with Apple!!  Especially since i added a third line to my account just so I could get an iphone back.

  • Family account will not transition to iCloud. Keep going round in circles - get Congratulations message from mobileme then still cannot sign into iCloud. Have moved 2 other family accounts weeks ago but this one will not?

    Keep going round in circles - get Congratulations message from mobileme then still cannot sign into iCloud. Have successfully moved 2 other family accounts weeks possibly months ago but this one will not? Am running Snow Leopard 10.6.8 OSX. All ideas welcome as these are original mac accounts and keen not to lose them - call me sentimental:-)

    Welcome to the Apple Community.
    Unfortunately, OSX 10.6.8 will not support iCloud. You can use the mail address from the iCloud account with Snow Leopard bot not the rest of the iCloud features. You can access then via the web browser though at iCloud.com.
    To set up iCloud mail.
    Delete your mail account from Mail preferences and set it up again using the Mail Server Information.
    Some users have apparently encountered issues using this information in pre-Lion set ups (I haven't), Roger Wilmut has kindly provided instructions for those who find themselves with this problem.
    Entering iCloud email settings manually in Snow Leopard or Leopard

  • Apple script to find all image files on computer and put them into 1 folder

    Is there any way to do this with apple script? Thanks

    Hi glaurung,
    Doing this with vanilla AppleScript and the Finder would take too long. There might be a way to do this with unix commands, but probably the best way to this would be to use the built in find for your system. I wouldn't search the whole computer. Maybe just search somewhere in your Home folder. Use a criteria like all files with extension jpg, tiff, tif, etc.. Then you can just drag the found files into whatever folder you want. You need to be cautious because you wouldn't want to move all files. For instance, you wouldn't want to move all pictures in your iPhoto library, other apps, or the System.
    gl,

  • HT201363 Some one hacked into my apple account

    Some one hacked into my apple account and purchased with my attached credit card. I then called my credit card company and get my credit card canceled. now, I am trying to reach to the correct apple representative to update my account info but i am being directed to the wrong place. please sudgest me the right way. apple's sight and service is so not straight forward, rather confussing to give us help

    Hello, emmmmy. 
    Thank you for visiting Apple Support Communities.
    I would recommend reaching out to us via the link below to assist you with this issue.
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Cheers,
    Jason H.

  • If i reset my ipad can i install paye games for free if i sign back into my apple ID. Please i need help because i need to update my games but i need to put in this billing thing and i want to get rid of it so then i cant buy games with my credit card

    If i reset my ipad can i install paye games for free if i sign back into my apple ID. Please i need help because i need to update my games but i need to put in this billing thing and i want to get rid of it so then i cant buy games with my credit card

    Hello,
    As frustrating as it seems, your best to post any frustrations about the iPhone in the  iPhone discussion here:
    https://discussions.apple.com/community/iphone/using_iphone
    As this discussion is for iBook laptops.
    Best of Luck.

Maybe you are looking for