Re: System Events problem with Mojave (10.14)
Re: System Events problem with Mojave (10.14)
- Subject: Re: System Events problem with Mojave (10.14)
- From: David Crowe <email@hidden>
- Date: Mon, 22 Apr 2019 09:00:00 -0600
Dear Takaaki;
Thank you for replying to my email, but I’m not sure I understand it. How could
the system be trying to execute old versions of my script, where would they be?
I’m pretty sure that the old script is not running, because it used items from
the Smile library, and those generate different errors. I removed those
sections and those errors went away. If old scripts were being executed I would
still be getting the Smile errors.
Regards,
David Crowe
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 19 Apr 2019 20:19:17 -0600
> From: David Crowe <email@hidden
> <mailto:email@hidden>>
> To: email@hidden
> <mailto:email@hidden>
> Subject: System Events problem with Mojave (10.14)
> Message-ID: <email@hidden
> <email@hidden">mailto:email@hidden>>
> Content-Type: text/plain; charset="utf-8"
>
> I use FastScripts a lot just to associate a hot key with an AppleScript, and
> one of my scripts uses System Events to paste from the clipboard. A simple
> example (that strips formatting from the clipboard text):
>
> set x to the clipboard
> if x = "" then return
>
>
> set the clipboard to (x as string)
> tell application "System Events"
> try
> keystroke "v" using {command down}
> on error errmsg number errnum
> display dialog "Cannot paste. " & errmsg & " (" & errnum & ")"
> end try
> end tell
>
>
>
> I get three different results:
> 1. It works (only sometimes)
> 2. Script Editor is not allowed to send keystrokes. (code 1002)
> 3. I get a dialog box telling me that FastScripts is not allowed to modify
> keystrokes (can’t remember the exact message) and I must go to System
> Preferences.
>
>
> In System Preferences I have FastScripts (and Script Editor) included, with
> the checkbox checked, under Accessibility. If I run the script from Script
> Editor (or Smile) I get the same error.
>
> In my last testing I got error 3 once, then error 2 about half a dozen times,
> then it started working, then it went back to error 2.
>
> - David Crowe
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <https://lists.apple.com/mailman/private/applescript-users/attachments/20190419/5e939de8/attachment.html
>
> <https://lists.apple.com/mailman/private/applescript-users/attachments/20190419/5e939de8/attachment.html>>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 20 Apr 2019 19:10:02 +0900
> From: Takaaki Naganoya <email@hidden <mailto:email@hidden>>
> To: liste AppleScript US <email@hidden
> <mailto:email@hidden>>
> Subject: Re: System Events problem with Mojave (10.14)
> Message-ID: <email@hidden
> <email@hidden">mailto:email@hidden>>
> Content-Type: text/plain; charset=utf-8
>
> Hi,
>
> I encountered such a trouble when I made some duplicated script.
>
> Accessibility control in System Preferences on macOS 10.14.x does not work as
> former version of macOS.
>
> I think you made some copy of the script.
> First one may work well. But copied script does not allowed to use
> accessibility function on macOS 10.14.
>
> To recover the circumstances, you may have to remove or archive duplicated
> or older version of scripts.
>
>
> Takaaki Naganoya
>
>
>> 2019/04/20 11:19、David Crowe <email@hidden
>> <mailto:email@hidden>>のメール:
>>
>> I use FastScripts a lot just to associate a hot key with an AppleScript, and
>> one of my scripts uses System Events to paste from the clipboard. A simple
>> example (that strips formatting from the clipboard text):
>>
>> set x to the clipboard
>> if x = "" then return
>>
>>
>> set the clipboard to (x as string)
>> tell application "System Events"
>> try
>> keystroke "v" using {command down}
>> on error errmsg number errnum
>> display dialog "Cannot paste. " & errmsg & " (" & errnum & ")"
>> end try
>> end tell
>>
>>
>>
>> I get three different results:
>> 1. It works (only sometimes)
>> 2. Script Editor is not allowed to send keystrokes. (code 1002)
>> 3. I get a dialog box telling me that FastScripts is not allowed to modify
>> keystrokes (can’t remember the exact message) and I must go to System
>> Preferences.
>>
>>
>> In System Preferences I have FastScripts (and Script Editor) included, with
>> the checkbox checked, under Accessibility. If I run the script from Script
>> Editor (or Smile) I get the same error.
>>
>> In my last testing I got error 3 once, then error 2 about half a dozen
>> times, then it started working, then it went back to error 2.
>>
>> - David Crowe
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> AppleScript-Users mailing list (email@hidden
>> <mailto:email@hidden>)
>> Help/Unsubscribe/Update your Subscription:
>>
>> Archives: http://lists.apple.com/archives/applescript-users
>> <http://lists.apple.com/archives/applescript-users>
>>
>> This email sent to email@hidden <mailto:email@hidden>
>
> --
> Takaaki Naganoya
> email@hidden <mailto:email@hidden>
> http://piyocast.com/as/ <http://piyocast.com/as/>
>
>
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> AppleScript-Users mailing list
> email@hidden <mailto:email@hidden>
> https://lists.apple.com/mailman/listinfo/applescript-users
> <https://lists.apple.com/mailman/listinfo/applescript-users>
>
>
> ------------------------------
>
> End of AppleScript-Users Digest, Vol 16, Issue 40
> *************************************************
_______________________________________________
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