• 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: Looking for Scripts, Snippets, Ideas for Toggling Windows and Tabs of an App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking for Scripts, Snippets, Ideas for Toggling Windows and Tabs of an App


  • Subject: Re: Looking for Scripts, Snippets, Ideas for Toggling Windows and Tabs of an App
  • From: David Gregg <email@hidden>
  • Date: Wed, 29 Mar 2017 16:19:05 -0600

Jim,

I believe this will handle the window toggling.

tell application "System Events"
	set frontmostApp to name of first item of (processes whose frontmost is true)
	tell process frontmostApp
		set value of attribute "AXMain" of window 2 to true
	end tell
end tell

David

> On Mar 29, 2017, at 4:05 PM, Jim Underwood <email@hidden> wrote:
>
> Looking for Scripts, Snippets, Ideas for Toggling Windows and Tabs of FrontMost App
>
> Hi guys.  I'm starting to write one or more scripts to do this, and thought that before I reinvent the wheel, I'd check with the list to see if this has already been done, or something similar.
>
> Of course, when I finish the script, I'll publish it publicly here and elsewhere.
>
> Objective:
>
> The title says it all.  I want to press a hot key (or special button on my TrackBall) that will toggle between the two most recent windows, or tabs, of the frontmost app.
>
> I have this working for a number of apps, including Safari, Chrome, FireFox, and Keyboard Maestro.
> I also already have a script to goto the next or prior window/tab in many apps.
>
> But what I really need now is to TOGGLE between the two most recent ones.
>
> Specific Apps
>
> In particular, I'm looking for snippets and/or ideas for these apps:
> 	• Script Editor
> 	• Script Debugger 6
> 	• Evernote
> My earnest TIA for any/all help on this endeavor.
>
> Best Regards,
>
> Jim Underwood
> aka JMichaelTX
>
> _______________________________________________
> 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


 _______________________________________________
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: Looking for Scripts, Snippets, Ideas for Toggling Windows and Tabs of an App
      • From: Jim Underwood <email@hidden>
References: 
 >Looking for Scripts, Snippets, Ideas for Toggling Windows and Tabs of an App (From: Jim Underwood <email@hidden>)

  • Prev by Date: Looking for Scripts, Snippets, Ideas for Toggling Windows and Tabs of an App
  • Next by Date: Re: Looking for Scripts, Snippets, Ideas for Toggling Windows and Tabs of an App
  • Previous by thread: Looking for Scripts, Snippets, Ideas for Toggling Windows and Tabs of an App
  • Next by thread: Re: Looking for Scripts, Snippets, Ideas for Toggling Windows and Tabs of an App
  • Index(es):
    • Date
    • Thread