How can I specify on which monitor the console window is opened? - windows

I've currently connected two monitors via a dock to my notebook.
When I'm running my console application, the console window always pops up on the first monitor. How can I change that it's automatically opened on another monitor, e.g. on monitor 3? Maybe there is a property I need to modify?
It's very annoying to always drag the console window onto the monitor on which my IDE is opened.

Console applications (unlike GUI applications) don't create their own window; that's done by Windows, and in the case when you're running in an already created console, then you kinda inherit, e.g., cmd's window.
What you can do, though, is to find your window and move it to a different monitor.
Another option is to change the window manager settings for that application in the properties of the console window under Layout. Especially the check box »Let system position window«. To do so, first move the window where you'd like it to appear, then open the properties, go to the Layout tab, and just click »OK«.

Related

vscode on MacOS: getting navigation menu to show up in a full screen mode

Is there a way to get vscode show navigation menu i.e Code|File|Edit|... and the project name in a full screen mode on MAC. It's almost impossible to see the name of the project when having multiple instances of code open in full screen mode.
v1.42 has a new option that may help:
Controls if native full-screen should be used on macOS.
Disable this option to prevent macOS from creating a new space when going full-screen.
"window.nativeFullScreen": true,
I believe this is not what the full screen mode is made for. If you go full screen you are supposed to work almost exclusively in that application (only occasionally switching to other apps like mail, e.g. via command+tab). You can always have the menu bar (and the window title) appear when you move the mouse pointer to the top of the screen, however.
The name of the project is visible in the file explorer.
In this example, the project name (i.e. root folder) is testgit
You can always quickly show the file explorer using the keyboard shortcut Shift-Cmd-E.

How to determine title and additional infos from an open window for use with Autohotkey?

To access and control a window, dialog or popup with Autohotkey the title of that specific window is needed. For some windows the title can be read directly if its visible, but some windows hide it. The window class and the exe (ahk_class and ahk_exe) aren't visible at all. How to gather this information reliable?
Use the Window Spy tool, which is installed together with AHK, it can be started various ways:
Right click the tray icon of a running AHK script and select Window Spy
Start the AU3_Spy.exe in the AHK installation folder
Use the Windows search to search for Window Spy
You will get a window called Active Window Info with various infos about your current active (topmost) window. The first box is the one you need.
Example
The box gives title, class and .exe to detect the target window of which every line can be used to identify the window. Now you should activate the window you want to address and copy the information.
Hint: You can (un-)freeze the display with Win + A

How to open any built-in app through application

my mac os application is running in full screen mode.
On button click i'm opening finder window which allow me to open any another file or application but problem is that, when i open any another app, screen switches back to xCode and that application opens. Need to open selected app/file above same window.
I have tried:
**[[NSWorkspace sharedWorkspace] launchApplication:path];**
passing application path to launchAppication method
How can i do this?????
Help
The issue is basically because using [NSView enterFullScreenMode:withOption:] will set the app's [NSWindow level] to kCGMaximumWindowLevel - 1, so that all other app's windows will appear behind it.
This is kinda what you would expect from a fullscreen app, which implies system-modal behaviour.
I guess the only way of allowing another app to appear in front of the fullscreen app would be to lower the window level, however I have no idea what effect that would have.

Xcode: On debug, is there any way to prevent it from opening the navigator on the front-most window?

I'm trying to figure out how to use Xcode in a multi-window setup. I would like to have one window be my main window, and then have others that I use to do occasional spot editing. Here's the rub: I never want to have the navigator (or the debug console, for that matter) open in those other windows. I only want the navigator and console to open in the main window.
Right now, when I run the app the debug navigator and console open up in whichever window is frontmost (causing me to have both the main window and the secondary window with console pains and navigator open). Is there anyway to prevent the console and issue navigator from opening on the secondary window while preserving this behavior for the main window?
I'm not sure I fully understand what you want - but you can configure some of these things in the Xcode preferences under "Behaviors". Under "Running" you can click on "Starts" and it will show you the behaviors for when you run your application. You can set it to show a particular tab in the active window or a separate window. You can set up that tab to contain just the debugger. If it does show the debugger in the other tabs, you can minimize the debugger panes, and I believe it will save that state for the next time it launches. See here for more details.
Go to Xcode -> Behaviors -> edit behaviors. Now under build and running uncheck shows Navigator.
In Xcode Preferences > Behaviours > Runnings > Generates output, uncheck Show debugger with Current Views.

Accept mouse clicks without activating the application?

I am working on a utility application that controls other running applications. On certain input event my application displays a window, user can pick some operation from the window, the window disappears and control returns to the previous app. My problem is that clicking in my app’s window activates my application, thus removing focus from the previous application’s window. I can re-activate the previous application when my window closes, but I’d rather keep the original application activated all the time. Is that possible?
It's quite easy to to, just make your window an instance of NSPanel (a subclass of NSWindow), and set it as non-activating in Xcode/IB (or create it programatically, with NSNonactivatingPanelMask in the style mask).
One idea would be: while your app is running, try to keept track of the active window in the system.
After you activate your app and click the command button, restore the previous active window.
This is only an idea, I don't know how to do it on mac.

Resources