Is it possible to move the command prompt to a certain position on the screen? - command-line

As the title says, is it possible? I've searched all over the internet in order to find it, but whatever variation of my search query I come up with, I end up getting results which are about the move command which is used to move files/folders, instead of the actual prompt.
When doing
mode /?
The only result I can remotely relate to the appearance of the prompt is the Display mode,
(mode con:cols=x lines=y)
As I've said, I can't find any documentation about this & I'm extremely curious, can it be done? I know it can be done in Visual Studio to set a position where it should show it's dialog, so I'm presuming it can be done...
PS: If it can be done, what value should I use to have it perfectly centered when using these size settings?
mode con:cols=50 lines=15
Thank you in advance.
Yorrick

You cannot do so directly from a batch file. However, you can write a small program to do that. The relevant Windows API function is MoveWindow.

Related

Configure VS Code output window for python to jump to last line of output window?

I am sorry if the question doesn't make sense, I didn't really know how to phrase it properly.
What I am trying to achieve is similar to how it works in the command prompt when running a python file. When I run a python file from the command prompt, the command prompt window will jump to the last outputted line during the running of the program, so what is currently being outputted is always visible. However in my current VS Code set up, the output window will not jump to the last line as it is printed, and I have to scroll through the output window to see what is happening with the program.
I am currently using the latest version of VS Code and using the code-runner extension as well. Please let me know if what I am asking does not really make sense.
Thanks
As far as I understand your question, I would like to answer it.
To Auto-Scroll to the last output, you can just click on the Lock Icon near the Clear Console icon.

Powershell extend desktop to a display and disable that display on a programmatic toggle?

wanting to do as the title says. I have a display that I only use occasionally and I'd like to find a faster way of enabling/disabling it. Can someone point me in the right direction, or let me know of a program that can do this? I'm also looking for a way to change the default playback device. Thanks!
NirSoft have a tool that has command line support, I've not tried it on Windows 10 but it worked fine on Windows 7 when I last used it.
http://www.nirsoft.net/utils/multi_monitor_tool.html

Rainmeter '!SetVariable' fails to work run in command line

I have a couple of Rainmeter skins on top of my taskbar that act as a cooler clock, and in order to keep the skins above the taskbar, I have the following code:
[Rainmeter]
Update=500
OnUpdateAction=!ZPos #ZAxis#
[Variables]
ZAxis=1
So that keeps the skins above the taskbar, but it also keeps it above things like youtube running fullscreen. I got an AutoHotKey script that will run a program when a window becomes fullscreen and when it closes fullscreen, so I told it to launch "%PathToRainmerer%\Rainmeter.exe" !SetVariable "ZAxis" "-1" Skin.ini and "1" on the un-fullscreen, but nothing happened.
I checked everything to make sure the AHK script was working, and I even tried to run Rainmeter.exe with the parameters using a shortcut, but nothing worked. I also set up a Meter with Text=#ZAxis# and it stayed at one. I'm guessing the issue is with the syntax, but I can't find proper documentation (probably because I'm so bad at researching). I can provide more details on polite request.
Please remember that kind and respectful comments are greatly appreciated.
Try "\pathtorainmeter\rainmeter.exe" !activateconfig "mainskin folder\skin subfolder" "skin.ini"
Worked for me

Marking/commenting Matlab code?

Is there any way to mark Matlab code (in Matlab) via some kind of add-on? I'm looking for something similar to what Microsoft Word has with its "Review" mode where you can highlight a certain phrase/section and make a comment on the side. When I say "comment", I don't mean the regular code comments that you do with "%" in Matab.
I've googled for this, but I couldn't find anything. Anyone know if something like this exists that I may have missed? It would really help me when I'm reading someone else's code and I have to keep track of things / make comments for certain lines. Even if commenting isn't possible, it would be nice to be able to highlight certain lines via some kind of "highlighter" like the one in Word.
No. This isn't possible.
In fact, most editors and IDEs (if not ALL of them) that I know don't even support this feature as each IDE will have to be specific in the way this is implemented (à la Trojanian). The only thing that I can think of is if you print out the code in PDF, then use bubbles within the PDF viewer to tack on your comments.
However, if you want to highlight a specific line in your editor, you'll have to set this up in your settings. Go to preferences, then in the Editor / Debugger options, choose the Display option, then choose Highlight Current Line. Choose whichever colour you see fit. I'm running MATLAB R2013a on Mac OS, and this is the window I get:
You'll see the Highlight Current Line feature. Change that to whichever colour you want. I have it as gray because I do like having the current line highlighted.

Let a window display above a fullscreen window in GTK+

I have a full-screen window (winA) and another window (winB) which is always on top.
Now I need to let winB display above winA, while winA is still above any other windows.
How to do this in GTK+? Thanks. (Maybe this needs Xlib?)
PS1: I won't use POPUP windows because it will put all the windows under it. I just need put winB on winA but not all the others. For example, if I am watching videos in the fullscreen mode, I wouldn't like to see winB. But if winA it's here, winB is just above it.
PS2: winA & winB are in the same program. In this case, it may simplify the solution.
The main way to tell the window manager to keep winB above winA is through the "transient for" hint, set in GTK+ with gtk_window_set_transient_for().
If your window is not a dialog, the behavior may not come out quite how you'd like; you could try setting a semantic hint with gtk_window_set_type_hint() and see if that gets you anywhere.
But the behavior is basically going to vary with window manager (which is intended). So you kind of need to just live with that and assume people will use a WM that works how they want it to.