start batch file in fullscreen mode

谁都会走 提交于 2020-01-25 00:16:07

问题


How can I start a batch file in full-screen mode? I know that this question was asked before, but it wasn't actually answered.

unfortunately, I don't know reverse engineering, so I cant decompile the code.

Here is something I tested:

@if (@CodeSection == @Batch) @then
@echo off
rem Use %SendKeys% to send keys to the keyboard buffer
set SendKeys=CScript //nologo //E:JScript "%~F0"
start cmd.exe
%sendkeys% "(%{enter})"
goto :EOF
@end


// JScript section

var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.SendKeys(WScript.Arguments(0));

The idea is that it starts a cmd window, and (this part of the code %sendkeys% "(%{enter})") is supposed to simulate the user pressing [alt] + [enter]. But it doesn't work.

I wrote a little c# tool to send an alt+enter to the cmd window, but I'm looking for an internal method.


回答1:


If sendkeys parameter for "Alt-Enter" should be "%{enter}", then this line:

%sendkeys% "(%{enter})"

... should have not parentheses and there is one percent sign missing. Try:

%sendkeys% "%%{enter}"

See the example for "Alt-V" at this post




回答2:


I made an autoIT script, extremely simple.

Run("cmd.exe")
sleep (1000)
Send("!{enter}")

Unfortunately, this isn't what I want. I was looking for more of an actual command, not some other 3d party program.

:: edit

here: This is a link to the compiled 1 line skiddy script that I made.

Its a command line tool, so all you have to do is type fullscreen in a cmd window to toggle fullscreen mode.

In case you don't know how to use a command line tool, you have to be in the same directory as the file.



来源:https://stackoverflow.com/questions/24728958/start-batch-file-in-fullscreen-mode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!