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: Takaaki Naganoya <email@hidden>
- Date: Tue, 23 Apr 2019 10:26:29 +0900
David,
In my purpose (AppleScript on Xcode = “AppleScript GUI application”) , I could
not use macOS 10.14.
Because Xcode generates several version of executables (debug version, release
version) and they are not allowed to use accessibility function due to the
multiple executables.
I told this issue to my customer and we abandoned macOS 10.14 support. It is a
headache problem. We have to gather the cases and report them as a Bug to Apple.
Though Smile is very valuable application, it runs with only 32 bit mode (does
not launch on Japanese user environment). So it does not run on latest
environment, I think.
You have to replace old-module with latest one. There is a lot of Cocoa-based
AppleScript routine on my Blog.
--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/
> 2019/04/23 0:00、David Crowe <email@hidden>のメール:
>
> 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
>
>
>> ----------------------------------------------------------------------
>>
>> 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>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Sat, 20 Apr 2019 19:10:02 +0900
>> From: Takaaki Naganoya <email@hidden>
>> To: liste AppleScript US <email@hidden>
>> Subject: Re: System Events problem with Mojave (10.14)
>> Message-ID: <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>のメール:
>>>
>>> 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)
>>> Help/Unsubscribe/Update your Subscription:
>>> Archives: http://lists.apple.com/archives/applescript-users
>>>
>>> This email sent to email@hidden
>>
>> --
>> Takaaki Naganoya
>> email@hidden
>> http://piyocast.com/as/
>>
>>
>>
>>
>>
>> ------------------------------
>>
>> Subject: Digest Footer
>>
>> _______________________________________________
>> AppleScript-Users mailing list
>> email@hidden
>> 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