Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make New File in System Events



I can write this code ...

    tell application "Finder"
        if not (exists file fileName of locRef) then
            make new file at locRef with properties {name:fileName}

and get exactly what I want without error.
But when I try this code ...

    tell application "System Events"
        make new file at locRef with properties {name:fileName}

I always get: Error = 6, NSArgumentsWrongScriptError

'locRef' is an alias, but in the second snippet, I've tried posix path also,
but same results.

Does anyone know what's going on here?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.