Tag Info

New answers tagged

0

You can open your text file with TextEdit, which allows you to write text to the document with the "Set Contents of TextEdit Document" action.


0

other way for quoted text in applescript : set input to "with quote" set input to do shell script "echo " & quoted form of (quote & input & quote) echo '\"with quote\"' or more long set input to do shell script "echo " & input & " | sed 's#" & input & "#" & "\"" & input & "\"" & " #'"


0

I have no idea how to make this work with AppleScript but assuming you wish to copy the directory foo to bar with ditto creating bar then ditto foo bar/foo You can create intermediate directories also. As an example you wish to copy the directory biz in the hierarchy bar/foo/baz. The directories bar and foo have already been created then ditto ...


0

Try using cp -Rf instead. Ditto doesn't seem to support what you're trying to do. Also, make sure the source path doesn't end with a "/". cp will copy the directory's contents like ditto if the path ends in a "/".


0

I solved this by checking the status of the reload button. Call this handler, and the script will continue the moment Safari is done loading. Note that this only works when Safari isn't in full-screen mode: on wait() delay 0.5 tell application "System Events" to tell application process "Safari" set shouldExitRepeat to false repeat ...


0

Sure. You can use bash variables like normal: x=5 osascript -e "display alert \"$x\""


0

Here is a script that I use to repair one specific share on my server everyday at 2am. Repair Script (Saved in /Users/Shared/Scripts) #!/bin/bash # Document Control # --------------- # Filename: repair_FileShare.sh # Description: Repairs ownership and permissions on all files in the file share # Version: 1.0 # Local Variables # --------------- ...


3

You can also run: ~ system_profiler > my_profile To dump much of the same information to a more parseable file called my_profile. If you simply want the system's serial number (that could be sent however you want really), you could use: ~ system_profiler SPHardwareDataType | awk '/Serial/ {print $4}' If you are hoping for a screenshot of About this ...


0

open /Applications/Utilities/System\ Information.app && screencapture filename.jpg Will open System Information and save a screencap to filename.jpg You can then copy/email/print/etc. that file. System Information.app launches with a screen that shows: Model Name Model Identifier Processor Name Processor Speed Number of processors Number of ...


-2

set theOutputFolder to choose folder with prompt "Please select an output folder:" tell application "Database Events" make new database with properties {name:"Test", location:theOutputFolder} save database "Test" end tell Add the save command to save your new database. It will then be visible in Finder.



Top 50 recent answers are included