• 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
Re: Re: gui scripting - paste script not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: gui scripting - paste script not working


  • Subject: Re: Re: gui scripting - paste script not working
  • From: Vince Angeloni <email@hidden>
  • Date: Sun, 08 Jun 2008 13:12:55 -0500

Le 8 juin 2008 à 17:18, Vince Angeloni a écrit :

Hi,

This script will copy the data to the clipboard, but the GUI scripting part does not seem to be working. I run it as an application and it runs but does not paste the clipboard into the frontmost application. The info _is_ in the clipboard as I can paste it in manually after the script runs. Any clues as to why the GUI scripting part isn't working?


Is it enabled thru "Activate Assistive Devices" in "Universal Access" ?

Yvan KOENIG (from FRANCE dimanche 8 juin 2008 17:34:58)

Yvan -- assistive devices is on.

I think Deivy has it right -- the frontmost app will be the script itself when it is running. I need a way to find out what the frontmost app is before the script runs. I found a solution on the MacScripter board which uses:

tell application "System Events"
set visible of (first application process whose frontmost is true) to false
set Name_App to item 1 of (get name of processes whose frontmost is true)
activate
display dialog Name_App
end tell

If you double click this to launch it, you will get "Finder" as the frontmost application, however, I am planning on triggering this from Spotlight, and doing it that way, it is the perfect solution.

Thanks for your insights.

vince
 _______________________________________________
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: gui scripting - paste script not working
      • From: Luther Fuller <email@hidden>
  • Prev by Date: Re: Print Selection
  • Next by Date: Re: gui scripting - paste script not working
  • Previous by thread: Re: gui scripting - paste script not working
  • Next by thread: Re: gui scripting - paste script not working
  • Index(es):
    • Date
    • Thread