Re: Displaying UI in AppleScriptObjC scripts (was Re: How to Run a "sudo" Terminal Command)
Re: Displaying UI in AppleScriptObjC scripts (was Re: How to Run a "sudo" Terminal Command)
- Subject: Re: Displaying UI in AppleScriptObjC scripts (was Re: How to Run a "sudo" Terminal Command)
- From: Chris Page <email@hidden>
- Date: Wed, 27 Jan 2016 01:50:23 -0800
On Jan 26, 2016, at 10:02 PM, Shane Stanley < email@hidden> wrote:
Assuming a script library is a thin wrapper around a framework, I'd assume that putting this in the framework:
OSErr err = AEInteractWithUser(kAEDefaultTimeout, NULL, NULL); if (err != noErr) { // stuff }
would do the same thing, but it doesn't seem to. There's no error, but the dialog is still problematic.
The other problem is it also doesn't seem to work if the call to AEInteractWithUser() is made within the above AS script library; it seems to work only in the calling script. Or am I misunderstanding?
I can't think of a reason why it would matter exactly where it's called from. In what way is it still problematic?
Do you perform an “activate” (or call an equivalent API) to ensure your UI is frontmost and active? Does the window work after clicking on the window to activate it?
-- Chris Page The other, other AppleScript Chris
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden