Make user verify administrator password with timeout

If you are on Mavericks, then you should really try to make a library out of it, and call it like you would a library.

Have a look here

All you need is a well formed handler in a .scpt file that “uses” the frameworks mentioned and before that uses the use AppleScript, and the use Standard Additions clause.

Then you just call it like you would any other AppleScript “2.3” library.

Wow! You just whipped that up in the last few minutes! Amazing!

j/k, I often visit your site to humble myself. Now I’m humbled again. Guess it’s finally time to stop copying the same handlers into everything I make…

Hello.

I’m sorry if you got the impression that I had written that, or that that is my site, flattering though. :slight_smile:

oops!! I thought Shane wrote that message. My bad. You’re the man Shane! You too McUsr2.0!

For the record, and because it’s confusing: the use AppleScript command is always optional. The use scripting additions command is only required if the script uses scripting additions, but is usually a good idea.

For Yosemite, an ASObjC library script can be a .scpt or .scptd file. For Mavericks, it must be a .scptd file, and it must have a value of true or YES for OSAAppleScriptObjCEnabled in its Info.plist file.

Also for the record, that’s not my site either – I’m just a subtenant there.

I’ve now made my first script library with it’s own dictionary. This is fun; wish I’d done this sooner. Thanks for the help guys.

And honest mistake about it being your site Shane. It’s quality and usefulness jus reeked of Shane!

I am on Mavericks, and I use .scpt files all the times, since I am a lazy slob, I even discovered, that I can use slashes in the paths, thereby resembling c-include statements, so that I can have statements like

(ase is for applescript environment, and I invented the acronym myself. :slight_smile: )

That way I can just drop scripts into the script libraries folder, and have them reasonably categorized, until I come around to creating dictionaries.

Yes, but not ASObjC script libraries.

Edit

You are right, because then I have to check off for using cocoa in the pane of a bundle, so I only use that from bundles/scptd files. I am sorry.