Mac OS X / Open terminal with specified windows *on specified desktops* - macos

The accepted answer to this question explains how to create a "window group" in Terminal.app so that you can open a set of windows with predefined tabs executing predefined commands in predefined positions.
That's great, but it doesn't appear to play nice with Mission Control. I save my window group with the windows spread out across different desktops in Mission Control, but when I restore the window group they all pile up on top of each other in the desktop I'm currently using!
How can I get a Window Group to restore the windows to the desktops from which I saved them?
Thanks!

Doesn't look like separating application windows by desktop is an option anymore; not according to this MacForums thread.
There's an app called TotalSpaces that claims to restore pre-Mission Control window grouping, but it's a paid app so I haven't tried it.
You might be better off asking this question on AskDifferent or SuperUser...

Related

In Lua Hammerspoon script, how to draw on a specific desktop?

I don't see any APIs to enumarate desktops or move drawing to a specific desktop.
As the documentation always names THE desktop and desktop does not have any window id nor subrole I assume Hammerspoon does not support multiple desktops?
Hammerspoon seems to treat desktop as one of a kind top level window object.

Applescript - Opening apps on different Desktops "Spaces"

I am very new to applescript, but was wondering if it is possible to open applications to different desktops "spaces" using applescript. I have found how to launch applications, but don't know how to assign them to different desktops. Basically I am looking to open;
Outlook - Desktop 1
Skype - Desktop 1
Safari - Desktop 2
Onenote - Desktop 3
Thanks for any help, I really appreciate it.
Last system versions do not include any scripting of spaces. the only thing you can now do is to assign, in system preferences, shortcut keys to switch to a space, and once done, launch applications you want to.
To simulate action keys in Applescript, use system event "keystroke" instruction.
Easy: start these applications, one by one, in your "chosen" space, click on and hold Dock's icon, move cursor to "Options" (below), select this one (of three) options:
– Current desktop (or: this desktop, or similar)
… which from now on will always open THIS application in THIS space.
There is no programmatic way in AppleScript to instruct your Mac to switch spaces/workspaces or even to return the identity (number) of the current desktop.
Switching may happen, though, if the relevant option in System Preferences, Mission Control, is set.
(Indirectly, comparing a desktop "picture" to a user-defined list empowers a script to get its "number".)

Why these icons don't combine while my taskbar buttons group policy is "always combine"?

my system is Win7 Ultimate 32bit, and my taskbar buttons group poliy is "Always combine, hide laybels".
There is one program that have some shortcuts, when I open that program by clicking different shortcuts, I found that the icons didn't combine as the policy says.
All these shortcuts are targeted to the same position.
Can anyone tell me why this happen and how to combine all these icons?
Thanks
PS:The system says that I am a new user and have no right to post images....
Applications do have some control over their taskbar appearance but the shortcut used to start them also matters. If one shortcut specifies a App Model Id and a different shortcut does not (One you created perhaps?) then Windows might decide that these are two different apps (Or the same app with separate "modes")
If the application does not call SetCurrentProcessExplicitAppUserModelID then the auto generated Id might also not match if you run 32 and 64 bit versions of the same app...

Observe any Window if it Moved on OSX

I want to observe any window on OSX if it is moved. I don't own the windows so i can't get to it directly so I think I have to use the Accessibility APIs. I found a solution for the current active Application here: How can my app detect a change to another app's window? but I can't figure out how I have to modify this that it works for any window which is open. I hope anybody could give me a hint in which direction I have to look.
As I mentioned in the comments, people usually only want to detect window-move events on focused windows. (As unfocused windows seldom move.) If you want to detect application switches, you can poke into this sample project by Apple that shows how to update iChat status with the frontmost application’s name. And as you said, there’s already a solution for an active window.

How to hide a window in Windows 7, just like desktop managers do

When I install a virtual desktop manager on Windows 7, and I switch to a different virtual desktop, all the current windows disappear, also disappearing from the Start Menu.
I want to hide some of a particular application's windows, but not all of them, in a similar manner. How can I hide a window like this?
In particular, I need to hide a VirtualBox Seamless mode window, so I'm not sure minimizing the window will work. It does, however, disappear when using virtual desktop managers.
The same window cannot appear on multiple desktops. If you need your application window to appear on multiple desktops you need to create a separate window for each desktop. The desktop a window appears on depends on the thread that creates the window. You can change the desktop thread assignment using the SetThreadDesktop function.
The answer is simply ShowWindow(SW_HIDE) and ShowWindow(SW_SHOW). I think "Virtual Desktop Managers" just hide windows and show them as necessary when the desktops change.

Resources