|Mar 17, 2007, 08:37 AM||#1|
Applescript window focus
I've a task in automator that enables me to select files in finder, call the automator tast (it's on my Script menu) and add Spotlight tags to those selected items. It's built thusly:
Get selected Finder items.
Add Spotlight Comments to Finder Items.
The problem with this, though, is that when it's completed it doesn't return focust to the original Finder window, Finder is still focused but not any window. I can find no Automator action that will change focus so I investigated AppleScript.
I've never used AppleScript before, I'm quite new to Macs, I've done absolute minimal C and am conversant with Perl (though I'm no guru). I've Googled developer.apple.com and I found links to Tk stuff... seen that under Linux in the past so not sure what it's doing here, though TK is an abrev. for ToolKit, I dunno. Anyway, I've not been able to find what I was looking for there or elsewhere. What I want is something that selects the previous window.
I thank you for any suggestions.
Justin C, by the sea.
|Mar 17, 2007, 04:23 PM||#3|
Justin C, by the sea.
|Feb 28, 2013, 06:53 AM||#4|
I know this a really really old thread but I have been using the above script to focus on an application.
However the software I am using has two windows; its for an instillation piece; the mac mini autostarts up and the software opens, this then launches a full screen video window. 90% of the time it goes full screen and its all fine. But just now and again the application window sits on top of the full screen video window.
Using Mountain Lion and the Accessibility Inspector I can see that the Full Screen Window (the one I want to be at the front) is called AXTitle: "testCTM.izz Stage 1"
testCTM.izz is the file name and extension and Stage 1 is the window in question.
So... how can I focus on just that window?
Hope that makes sense! Thanks!
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|"Move focus to window drawer" ⌥⌘' shortcut||Kelped||Mac Basics and Help||0||Apr 2, 2013 07:52 PM|
|Minimise window, focus next window||Forkjulle||Mac Applications and Mac App Store||4||Jan 31, 2013 09:00 AM|
|Keep a window always on top - can't find an app. How can I applescript this?||Hippocrates04||Mac Basics and Help||0||Aug 5, 2012 10:36 AM|
|applescript leaves terminal window open||Zeke D||Mac Programming||6||Jul 22, 2012 03:44 PM|
|'move focus to the window toolbar' not working||sofasurfer||MacBook Pro||1||May 30, 2012 06:58 AM|
All times are GMT -5. The time now is 09:19 AM.