The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   OS X Developer (http://hintsforums.macworld.com/forumdisplay.php?f=27)
-   -   managing cookies with applescript (http://hintsforums.macworld.com/showthread.php?t=20150)

ali baba 01-31-2004 11:10 AM

Quote:

to run the program, first try the Apple way - double click on it. Doesn't work on 10.2 unless you change the .sh to .command
Unix and the script don't care in the slightest what the filename is.

to run the script from the command line, `cd` to the directory and then type ./scriptname
or type the path to the script and it will run.
strangely i didn't get any of the above to work.. so i have made an do shell applescript :-) almost back where i started

Quote:

You will find your other drives in the Terminal in the /Volumes folder, but don't mess around with the /Volumes folder content until you understand unix mount points. Do not attempt to backup, restore, delete, copy, fold, spindle or otherwise mutilate this folder.
don't worry, changing the drive of my name was a userlevel thing. doubleclick name of the drive in finder and change it.

Quote:

as far as your scripts are concerned, replace `bigwig` with `/` and you will be on the right track. Other drives can be reached by `/Volumes/Drive\ name\ with\ spaces/folder1/folder\ 2/file`
do you mean i use:

"cp //Users/me/Documents/Cookies.plist //Users/me/Library/Cookies/Cookies.plist"

double slash before "Users"?

acme.mail.order 01-31-2004 08:23 PM

no, single slash.

cp /Users/me/Documents/Cookies.plist

as for running the script, did you set permissions properly?

to check, cd to the same directory and type `ls -l` (lower case 'L', not number one)

example output:
Code:

-rwxr-xr-x  1 admin  wheel  78  7 Jan 00:17 sendip
-rw-r--r--  1 admin  wheel  82 29 Jan 09:17 stage2

the `x` in the array at the left is the execute permission. In this example, sendip will run, but stage2 will not. If I change the name of sendip to sendip.command I can double-click on it in the finder, but only if the execute bit is set.

Copy the results of `ls -l` of the folder containing your script and we'll see what's wrong.

ali baba 02-01-2004 05:13 AM

hi acme.mail.order,

the changing .sh into .command works fine!
i didn't get that yesterday due to excessive juggling around with files and then mixing up. the permissions of the script were set as in your serendip example.

when i asked you for a terminal way to trigger the script i had forgotten about rob's hint to use a do shell applescript. for the smoothest user experience i'll go with that for now but it's fun to know the geeky way too.

i feel like coyote who gets his acme mail order, anxiously upwraps the package, folds out the blueprint, succeeds in building it.. and then.. on to his next disaster, but that's another story.

thanks for teaching me some extra unix :) later, ali baba

acme.mail.order 02-01-2004 05:27 AM

Quote:

Originally posted by ali baba
i feel like coyote who gets his acme mail order, anxiously upwraps the package, folds out the blueprint, succeeds in building it.. and then.. on to his next disaster, but that's another story.
Guess how I came up with the user name. That, and I used to live in Acme when I repaired parachutes for a living. Just couldn't pass that address up.

ali baba 02-01-2004 07:15 AM

:)

repairing parachutes, shellscripts, cron, coyote, acme mail orders, pico, cookies, kindred smilees on the loose.. it's been a fun thread! later, ali baba


All times are GMT -5. The time now is 06:08 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.