Search found 2038 matches

by cormullion
Fri Dec 02, 2005 9:22 pm
Forum: newLISP and the O.S.
Topic: MacOS editors - newLISP module for BBEdit/TextWrangler
Replies: 3
Views: 3469

I wonder if I can post it here. Worth a try (if there's not a post limit). Save as "/Users/me/Library/Application Support/BBEdit/Language Modules/newlisp.plist". But this is my first attempt at such a beast, so please improve it!

Improved version at http://newlisp.org/index.cgi?Code_Contributions
by cormullion
Fri Dec 02, 2005 2:40 pm
Forum: newLISP and the O.S.
Topic: MacOS editors - newLISP module for BBEdit/TextWrangler
Replies: 3
Views: 3469

MacOS editors - newLISP module for BBEdit/TextWrangler

Since I prefer to use OSX-friendly editors such as BBEdit rather than emacs, I had a go at defining a LanguageModule for newLISP. It starting to work OK in both BBEdit and TextWrangler (the free version of BBEdit), so if you'd like a copy (or would like to make it better) let me know (message here o...
by cormullion
Fri Dec 02, 2005 12:20 pm
Forum: newLISP and the O.S.
Topic: MacOS - resource forks
Replies: 0
Views: 2333

MacOS - resource forks

Sorry for yet another Mac post (in the Linux forum...), but I've discovered how to work with resource forks (weird Mac technology from the old days :-))... You can access resource forks using the "/rsrc" form, although the 'file?' function can't see them. (set 'sysfontdir "/System/Library/Fonts/") (...
by cormullion
Fri Dec 02, 2005 8:20 am
Forum: Anything else we might add?
Topic: Advantages of newLISP compared with other scripting tools?
Replies: 6
Views: 6001

Advantages of newLISP compared with other scripting tools?

I'd be interested in your opinions as to what you think are the main benefits of newLISP compared with some of the other mainstream scripting languages (Perl, Python, Ruby)... I can certainly see the benefits of newLISP over old LISP, and if you already know some form of LISP it's quick to pick up. ...
by cormullion
Fri Dec 02, 2005 8:15 am
Forum: newLISP in the real world
Topic: process and spaces in filenames
Replies: 7
Views: 4457

Neat. Thanks.
by cormullion
Thu Dec 01, 2005 7:15 pm
Forum: newLISP in the real world
Topic: process and spaces in filenames
Replies: 7
Views: 4457

Thanks. I've also just had this inspiration:

(set 'f "/Applications/Address Book.app/")
(exec (string "ls -l " (format "'%s'" f )))

- a way of putting single quotes round the string. If there's nothing better, that'll do nicely!
by cormullion
Thu Dec 01, 2005 7:04 pm
Forum: newLISP in the real world
Topic: process and spaces in filenames
Replies: 7
Views: 4457

Hi folks. Thanks for the replies. But the problem is with files and directories that have spaces in their names. (Perhaps this is a MacOS X-only thing?) So this works: "/Applications/Firefox.app/" but this doesn't: "/Applications/Address Book.app/" Loads of files and directories have spaces in, and ...
by cormullion
Thu Dec 01, 2005 4:44 pm
Forum: newLISP in the real world
Topic: process and spaces in filenames
Replies: 7
Views: 4457

process and spaces in filenames

Just before my brain packs up for the day:

(set 'f "/Users/me/folder 1/file 1") ; yes, spaces in pathnames...
(process (append "ls -l " f )) ; doesn't work

I need to pass some kind of quoted form of f to the shell. What's the best way of doing that?

Sorry if the question is a bit too simple...!
by cormullion
Thu Dec 01, 2005 3:55 pm
Forum: Anything else we might add?
Topic: Misc newbie queries
Replies: 2
Views: 2482

Wow. What fantastic support for a newcomer!

thanks much
by cormullion
Thu Dec 01, 2005 12:41 pm
Forum: Anything else we might add?
Topic: Misc newbie queries
Replies: 2
Views: 2482

Misc newbie queries

Hi. Where should I post newLISP questions that are neither Windows or Linux or MacOS? The forums are a strange mixture of platform-specific and general newLISP and non-newLISP questions. Can I get a UTF-8 version for MacOS X without having to build from source..? Can I get an RSS feed for these foru...
by cormullion
Wed Nov 30, 2005 10:06 pm
Forum: newLISP and the O.S.
Topic: MacOS - sending AppleEvents (AppleScript.OSAScript)
Replies: 5
Views: 4411

Lutz wrote:Here is a simple way to get output back from osascript:

Code: Select all

> (exec {osascript -e 'tell app "Finder" to display dialog "hello world"'})
("button returned:OK") 
> 
Lutz
That's very nice - no quoting problems and AppleScript responses too!

Thanks. This is looking pretty good!
by cormullion
Wed Nov 30, 2005 3:13 pm
Forum: newLISP and the O.S.
Topic: MacOS - sending AppleEvents (AppleScript.OSAScript)
Replies: 5
Views: 4411

I've used the 'osascript' command to run AppleScripts before (eg from Ruby or Perl), but was wondering whether there was any more basic communication (eg an OSA interface that generates raw Apple Events). I'll try (process) now: -- #!/usr/bin/newlisp (process "osascript -e 'tell app \"Finder\" to di...
by cormullion
Wed Nov 30, 2005 9:39 am
Forum: newLISP and the O.S.
Topic: MacOS - sending AppleEvents (AppleScript.OSAScript)
Replies: 5
Views: 4411

MacOS - sending AppleEvents (AppleScript.OSAScript)

How can I send some AppleScript from newLISP?