Switch window app by command line - windows

"Alt+Tab" is used to switch a windows app to foreground, does anyone know how to do it with command line? or any API?

Check out KeyStuff: http://www.richpasco.org/utilities/keystuff.html
It's a pretty handy command line utility for issuing various keyboard commands to Windows. I haven't tested it extensively, but entering the Alt-Tab command works for me.

Related

How can I open a new terminal tab in VSCode's integrated terminal using a shell script?

Question
I've seen lots of ways to open a new terminal "tab/pane/view" using an external Terminal app like the macOS Terminal app or iTerm using a shell script or Apple Script but is it possible to write a script that opens up two different VS Code integrated terminal "tabs/panes/views" in the current workspace?
My Use Case
I'm starting my application and I want the client side logs and server side logs to open in separate integrated terminal windows side-by-side when the build completes.
What I'm Not Looking For
I've seen lots of ways to open a new VSCode terminal tab from within the VSCode settings/UI/key commands/command palette but I specifically need a way to do it using a shell script.
Thanks!

Start the websocket server automatically on Windows without a visible command prompt window

I want to start a websocket server, like using the "php artisan websocket:serve", but that automatically start with windows, and without a windows of command prompt. I know how to do it on linux with supervisor, but i need to do that on Windows 7 with Xampp.
I currently use a batch file that starts automatically with Windows, although it works correctly, I wish the command prompt window would not remain permanently visible, since the PC is used for other business stuff, and sometimes the user closes by error the window, stopping the socket server.
Of course, thank you very much for your answers and excuse my bad English.
There are several ways to start windows process without visible console window. First you could create windows service, some software support it natively or you could use utility like NSSM. Second: You could start program via task scheduler and tune task properties. Third: You could use utility like CHP to start program without console window. Remember one thing: If you start program without console window (and it is not a windows service), the only way to stop it is taskkill command or GUI Taskmanager.
To initialize the websocket server on a windows machine, without the command prompt just set autoexec.bat to halt_threads 2.

ShellExecute fails opening On Screen Keyboard with UAC enabled

I am trying to programmatically open the windows 7 on screen keyboard (osk.exe) from my program.
I found a good guide for this on this page and it works quite well when UAC is turned off.
When UAC is turned on, it is not opening the program at all however, and I can't find why. No UAC prompt is shown when opening the keyboard from the start menu, so it doesn't appear to need administrative privileges.
Is it just because the executable is located in the windows system folder, and if so, is there another way to launch a program that would work?
The error returned is 3, ERROR_PATH_NOT_FOUND, possibly because 'sysnative' path is not working with UAC enabled.
Trying to run "osk.exe" without path also fails, with an error "Could not start the On Screen Keyboard"
Finally, running "C:\Windows\system32\osk.exe" fails with error code 5: SE_ERR_ACCESSDENIED when I tried to use it with redirection turned off (as suggested in this question)
I tested the c++ code sample you refer to in your message. The routine started either from VS devenv or as a standalone exe did always show the on-screen keyboard under any available UAC mode. My OS: Windows 7 Ult. SP1 64-bit.

Calling a command line in MONO on MAC OS X

I want to be able to call the automator or unix commands like ls from a mono app and ge the results back.
This can be accomplished on windows easily. The question is how is this done on the mac??
caveat: I've never written a char of mono in my life.
I imagine it's a matter of redirecting stdout and firing up a process. this linux forum shows that you can do pretty much that - OSX will behave mostly as a UNIX-like system for you, I reckon.
Oh by the way, if you want to fire up an OSX application, have a dig around inside the ".app" bundle. OSX shows these as a file, but they're actually directories. In the finder you can right-mouse click and "show package contents", or you can open up a terminal / command prompt and cd into them. For instance, you can launch the Automator like this from the terminal:
/Applications/Automator.app/Contents/MacOS/Automator
I don't know if you would want to go down this route, but if you're going to be interfacing with OSX (gui) apps, you might want to look at using Applescript as some "glue" between Mono and the app.

android emulator ui buttons from command line

I'd like to be able to access the emulator's ui buttons from the commandline or from a test script (e.g. the Back, Menu, or Home buttons.) Can this be done through the adb shell? Or does anyone know of a way to do this directly with OS X?
You can use the Emulator Console to do this.

Resources