• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Rép: click using option down button 2 of window 1
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rép: click using option down button 2 of window 1


  • Subject: Rép: click using option down button 2 of window 1
  • From: Yvan KOENIG <email@hidden>
  • Date: Mon, 27 Oct 2014 10:39:08 +0100

Le 27/10/2014 à 07:59, Shane Stanley <email@hidden> a écrit :

On 27 Oct 2014, at 12:06 pm, Shane Stanley <email@hidden> wrote:

You can download v1.0.2 of ASObjCExtras.framework here: <http://www.macosxautomation.com/applescript/apps/ASObjCExtras.html>.

Blink and you missed it.

I've decided to pull the clicking command. I suspect Robert's problem is a Script Editor bug, although it's impossible to be sure unless he posts the log. But there's a bigger issue: it doesn't seem to work when run from an applet. I don't really know why -- it's more or less the same code that seems to work fine in ASObjC Runner -- but I'm afraid GUI-related stuff tries my patience. A command that works only sometimes is worse than none at all.

As for the Script Editor bug... it looks like it's not always recognizing enums loaded from frameworks. Every other app I've tried does, and the enums work fine in an applet saved from SE, but it refuses to recognize them when you hit the Run button. Bummer.

--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

Hello Shane

Here is the events log which I got after running :
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "ASObjCExtras"

activate application "Finder"
tell application "System Events" to tell process "Finder"
tell window 1
set buttonPos to position of button 2
end tell
end tell

current application's SMSFord's clickAt:buttonPos clickType:(current application's SMSClickOnce) keysDown:(current application's SMSPressOptionKey)

Now the Events log :

tell application "Finder"
activate
end tell
tell application "System Events"
get position of button 2 of window 1 of process "Finder"

Résultat :

error "unable to set argument 3 - the AppleScript value <NSAppleEventDescriptor: 'obj '{ 'form':'usrp', 'want':'prop', 'seld':'utxt'(\"SMSClickOnce\"), 'from':null() }> could not be coerced to type q." number -10000

As always, I ran the system in french.

Yvan KOENIG (VALLAURIS, France) lundi 27 octobre 2014 10:36:15




 _______________________________________________
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

  • Follow-Ups:
    • Re: click using option down button 2 of window 1
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: More Magic Jack Mystery
  • Next by Date: Re: click using option down button 2 of window 1
  • Previous by thread: Re: More Magic Jack Mystery
  • Next by thread: Re: click using option down button 2 of window 1
  • Index(es):
    • Date
    • Thread