Recent content by anarchie

  1. A

    Fixing spaces in pathnames

    If you're using NSTask, there's no need to do anything about spaces. You can just pass the entire pathname as a single argument of the NSTask.
  2. A

    Applescript Help

    Ooh, this is a good one, thanks. Took me a second to find in the Applescript Language Guide. set the app_list to {"iTunes", "Mail", "Safari", "Terminal"} ignoring application responses repeat with i in app_list tell application i to open end repeat end ignoring
  3. A

    This might be a bit difficult but is it possible (automation)?

    perl -n -e 'm$<Ref href = "(.*)" />$;`curl -O $1`' /users/me/desktop/dirwithallthewaxfiles/*
  4. A

    This might be a bit difficult but is it possible (automation)?

    Use this handy perl oneliner. If you have a file full of things like "<Ref href = "http://www.websitegoeshere.org/dir/filename.ext" />" then this will extract and download them all using curl. Assuming the file is named asxfile perl -n -e 'm$<Ref href = "(.*)" />$;`curl -O $1`' < asxfile
  5. A

    Best way to transfer a file using ssh?

    You only have to generate a key once on your machine. If you WANT to, you can use multiple keys, but you'll need to use the -i option to tell ssh/scp which key to use. That can get real tedious. cfleck: As I pointed out, you would use keypair authentication so that you don't need to enter...
  6. A

    Best way to transfer a file using ssh?

    It's not complicated to generate and distribute a key. You would use key-pair authentication to avoid entering your password for each copy, so you could use scp in scripts. You only need to generate a key once, and only transfer it once to each server you need authorization on. Here's the...
  7. A

    Example of how to upload a file using AppleScript & UNIX Shell?

    do shell script "curl --upload-file file.txt --user login:password ftp://server.com"
  8. A

    Stop Forms in Safari - Execute Javascript

    Instead of using an <INPUT TYPE="SUBMIT">, try <INPUT TYPE="BUTTON">. A button can have an javascript onMouseDown handler and will not submit the form.
  9. A

    icon from a .png file to a .icns

    Try using the tool Icon Compositor which is included with the Developer Tools. Look in /Developer/Applications/Utilities.
  10. A

    A Question :)

    Yes, there is a way to make such a program. How is entirely up to you.
  11. A

    Some questions from a total newbie...

    If you follow the Model-View-Controller paradigm, you should have a controller type object which responds to input via IBActions and handles app initialization. If you want to set a window's parameters at app initialization, you would generally do it in the controller's method -(void)...
  12. A

    Some questions from a total newbie...

    All three of those questions can be answered with a quick trip to the NSWindow and NSPanel documentation pages. Some of the options aren't available from within Interface Builder, so here you go...
  13. A

    [Cocoa newbie] ld: can't locate file for: -lcrt1.o

    Where did you read that Panther could be used with the older developer tools? IIRC Xcode shipped alongside Panther, so I don't see any reason for you to use PB. Did you really have a hard enough time using Xcode alongside the book that you had to go back? That being said, that linker flag...
  14. A

    About Carbon and Xcode ?

    You cannot develop software for OS 8.6 or OS 9 using Xcode. You have to use Codewarrior or MPW for that, which is more of a pain in the ass than I'd like to go into at the moment.
  15. A

    Using NSAllocateMemoryPages in threads.

    Screw performance reasons. The slowness is NOT where you think it is. [NSString stringWithFormat:@"this is another string: %@", anotherString]
Back
Top