• 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
frontmost application annoyance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

frontmost application annoyance


  • Subject: frontmost application annoyance
  • From: Yuma Antoine Decaux <email@hidden>
  • Date: Thu, 12 Apr 2012 09:39:05 +1200

Hi List,

I've scripted this little thing to help blind users quickly copy and paste paragraphs from any application into text edit without switching all the time, which is a big time saver.

I've added a last snippet of code to allow system events to make operations to the right application:

set _app to name of (info for (path to frontmost application))
set AppleScript's text item delimiters to "."
set _app to word 1 of _app
tell application "System Events"
tell process _app
keystroke "c" using {control down, option down, shift down}
end tell
end tell
delay 1
set thetext to get the clipboard
tell application "TextEdit"
set theindex to every paragraph of front document
set thecount to count theindex
set thecount to thecount + 1
set paragraph thecount of front document to thetext


say "pasted to text editor"
end tell

The problem i have with the above is that the running script becomes the front most application each time.

I'm not sure how the visible true false argument works, but would that be the right way to go?

Or is there a better alternative to getting the application foremost, then truncating it with astids? IOW, is there a way to know the index of applications layers?


Best regards


Yuma 

 _______________________________________________
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

  • Prev by Date: Re: AppleScript GUI creation
  • Next by Date: Re: frontmost application annoyance
  • Previous by thread: Re: AppleScript GUI creation
  • Next by thread: Re: frontmost application annoyance
  • Index(es):
    • Date
    • Thread