Re: Sierra kills ASObjC Runner
Re: Sierra kills ASObjC Runner
- Subject: Re: Sierra kills ASObjC Runner
- From: Robert Poland <email@hidden>
- Date: Fri, 23 Sep 2016 08:42:59 -0600
- Z-usanet-msgid: XID500uiwora0400X31
Yvan,
errors with "Can't make some data into the expected type"
> On Sep 23, 2016, at 8:32:AM, Yvan KOENIG <email@hidden> wrote:
>
>
> Hello Robert
>
> try this one :
>
>
>
> use AppleScript version "2.4" -- Yosemite (10.10) or later
> use framework "Foundation"
> use framework "AppKit"
> use scripting additions
>
> # A delay allowing you to press one or several modifiers
> delay 2
>
> set optionDown to my checkModifier:"option"
> say "optionDown is " & optionDown
>
> set shiftKeyDown to my checkModifier:"shift"
> say "shiftKeyDown is " & shiftKeyDown
>
> set commandKeyDown to my checkModifier:"command"
> say "commandKeyDown is " & commandKeyDown
>
> set controlKeyDown to my checkModifier:"control"
> say "controlKeyDown is " & controlKeyDown
>
>
> on checkModifier:keyName
> if keyName = "option" then
> set theMask to current application's NSAlternateKeyMask as integer
> else if keyName = "control" then
> set theMask to current application's NSControlKeyMask as integer
> else if keyName = "command" then
> set theMask to current application's NSCommandKeyMask as integer
> else if keyName = "shift" then
> set theMask to current application's NSShiftKeyMask as integer
> else
> return false
> end if
> set theFlag to current application's NSEvent's modifierFlags() as integer
> return (((theFlag div theMask) mod 2) = 1)
> end checkModifier:
>
>
> Yvan KOENIG running Sierra 10.12.0 in French (VALLAURIS, France) vendredi 23 septembre 2016 16:31:55
>
>
>
>
> _______________________________________________
> 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
Robert Poland
Fort Collins, CO
_______________________________________________
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