Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 30, 2006, 11:25 PM   #1
Benjamindaines
macrumors 68030
 
Benjamindaines's Avatar
 
Join Date: Mar 2005
Location: A religiously oppressed state
Anyone wanna write me a quick AppleScript?

What I need it to do:
  • Start Terminal (hidden if you can)
  • run cp ~/Documents/Stuff/.VolumeIcon.icns /volumes/"Back Up"/
  • Have it relaunch Finder
  • Have it quit Terminal

Much Thanks!
__________________

Benjamindaines is offline   0 Reply With Quote
Old Dec 30, 2006, 11:47 PM   #2
HexMonkey
Administrator
 
HexMonkey's Avatar
 
Join Date: Feb 2004
Location: New Zealand
You can bypass Terminal altogether:

Code:
do shell script "cp ~/Documents/Stuff/.VolumeIcon.icns /volumes/\"Back Up\"/"
do shell script "killall Finder"
HexMonkey is offline   0 Reply With Quote
Old Dec 30, 2006, 11:57 PM   #3
Benjamindaines
Thread Starter
macrumors 68030
 
Benjamindaines's Avatar
 
Join Date: Mar 2005
Location: A religiously oppressed state
Quote:
Originally Posted by HexMonkey View Post
You can bypass Terminal altogether:

Code:
do shell script "cp ~/Documents/Stuff/.VolumeIcon.icns /volumes/\"Back Up\"/"
do shell script "killall Finder"
Awesome thanks! I hate coding
__________________

Benjamindaines is offline   0 Reply With Quote
Old Dec 31, 2006, 03:30 AM   #4
Soulstorm
macrumors 68000
 
Soulstorm's Avatar
 
Join Date: Feb 2005
Heh. You don't know what you're missing
Soulstorm is offline   0 Reply With Quote
Old Dec 31, 2006, 10:02 AM   #5
crazzyeddie
macrumors 68030
 
crazzyeddie's Avatar
 
Join Date: Dec 2002
Location: Florida, USA
AppleScript is not even close to coding. Its really not bad and uses mostly english. Its hard to get used to it at all.
__________________

Macbook Pro 15"
8GB DDR3 RAM
iPhone 6 Silver
crazzyeddie is offline   0 Reply With Quote
Old Dec 31, 2006, 11:48 AM   #6
Benjamindaines
Thread Starter
macrumors 68030
 
Benjamindaines's Avatar
 
Join Date: Mar 2005
Location: A religiously oppressed state
Quote:
Originally Posted by crazzyeddie View Post
AppleScript is not even close to coding. Its really not bad and uses mostly english. Its hard to get used to it at all.
Yes I know AS is easy compared to cocoa (I've looked over source code for various apps) but it's the fact that I don't know it and am too lazy to learn it for the few times I need it that makes it difficult for me
__________________

Benjamindaines is offline   0 Reply With Quote
Old Dec 31, 2006, 02:16 PM   #7
ATG
macrumors regular
 
Join Date: Aug 2005
Quote:
AppleScript is not even close to coding. Its really not bad and uses mostly english. Its hard to get used to it at all.
It's actually not so bad once you get used to it. I'm in the process of adding scripting to my Cocoa app and obviously I had to learn AppleScript first.

But it's easy for me as a prior programmer. I do remember trying to learn it many years ago before I had even heard of C and it's lack of structure was really infuriating.

It's great for making small apps though if you don't want to go through the trouble of creating a whole Cocoa app.

[/OFFTOPIC]
ATG is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Applescript - formatting a txt file using write dam316 Mac Applications and Mac App Store 0 May 4, 2014 06:26 PM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Programming 0 Oct 29, 2013 12:38 AM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Applications and Mac App Store 0 Oct 29, 2013 12:32 AM
If you wanna quick phone and good battery life Thierry ba iOS 7 2 Sep 19, 2013 09:06 AM
VMware Fusion 5 - Shared Folder (Read/Write) - Yet no write permissions in VM altjx Windows, Linux & Others on the Mac 2 Aug 29, 2013 10:19 AM

Forum Jump

All times are GMT -5. The time now is 06:27 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC