Windows 8 cli to take screenshots [closed] - windows

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm using boxcutter and take screenshots via command line. I want a loop that runs for 4 hours and takes screenshots every 10 seconds. I CAN NOT get a .bat to do this. First, I can't figure out how to make the script sleep for 10 seconds. Below is my code and no matter what variation I try my prompt just flashes quickly and is gone, yes I have used some choice words on this gem.
ECHO ON
for /l %i in (1,1,10) do
E:\boxcutter\boxcutter.exe -f E:\screenshots\%i.png
ping -n 10 someserver.com
done
pause
Any help is appreciated.

Try this instead:
for /l %%i in (1,1,1440) do (
E:\boxcutter\boxcutter.exe -f E:\screenshots\%%i.png
ping -n 10 localhost>nul
)
pause
This will take screenshots 10 seconds apart for 1440 iterations (which is 4 hours). Note that I doubled the percent signs in the for loop since this is running in a batch file, and I corrected the syntax for for...do...
You'll find it much easier to troubleshoot batch files if you open a command prompt and run them from there rather than double-clicking them from Windows Explorer. The command prompt will stay open rather than flashing briefly and disappearing.

Related

WES7 has no 'CHOICE' . What are my options? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I made and tested simple batch script to launch one of two applications in windows 10 using the CHOICE attribute with a 30 second timeout and one START function set as the default.
I moved my batch file over to my target thin client running windows 7 embedded standard and upon executing i realized that WES7 does not support the choice command. I need this to be as simple as possible with just one button use (no enter key) but I'm struggling to figure out my alternatives here. Here is the batch i was using.
#ECHO OFF
CLS
ECHO =============
ECHO 1.first app
ECHO 2.second app
ECHO.
CHOICE /C 12 /T 30 /D 1 /M "Enter your choice by pressing 1 or 2:"
:: Note - list ERRORLEVELS in decreasing order
IF ERRORLEVEL 2 GOTO app2
IF ERRORLEVEL 1 GOTO app1
:app1
ECHO running app1
START app1.exe
goto begin
:app2
ECHO running app2
START app2.exe
goto begin
:End

Linux mint terminal output disappearing [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I'm running a script on terminal and it is supposed to produce a long output, but for some reason the terminal is just showing me the end of the result and I cannot scroll up to see the complete result. Is there a way to save all the terminal instructions and results until I type clear.
The script I'm using has a loop so I need to add the output of the loop if Ill be redirecting the output to a file.
Depending on your system, the size of the terminal buffer may be fixed and hence you may not be able to scroll far enough to see the full output.
A good alternative would be to output your program/script to a text file using:
user#terminal # ./nameofprogram > text_file.txt
Otherwise you will have to find a way to increase the number of lines. In some terminal applications you can go to edit>profiles>edit>scrolling tab and adjust your settings.
You can either redirect the output of your script in a file:
script > file
(Be careful to choose a file that does not exist otherwise the content will be erased)
Or you can buffer the output with less:
script | less

How do I stop a batch file retaining control of the command line [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Basically I wrote a very very simple batch script to shorten the opening of Notepad++. It accepts a single argument which it passes to Notepad++. The file is named npp.bat and is located in System32 and contains the commands:
#ECHO off
Notepad++ %1
As you can see, extremely simple, but it works as intended. However this is the first case I've had where a batch file retains control of the command line. It doesn't allow any more input until Notepad++ closes.
Basically what I'm wondering is if there is a Windows equivalent of the ampersand (&) operator in Linux
put start at the end!
#ECHO off
start "X" Notepad++ %1
start launches programs (and documents, and URLs) in a separate process
the "X" paramter is not actually needed in this example. start takes the first parameter if it's a quoted string as a window title for console applications, so if your are trying to run a command with spaces in the file name has spaces it'll get quotes and start has to see find something else first or it will steal the filename.
If you do start "c:\users\yourself\documents and settings\test one.doc" start will open a cmd window with the title c:\users\yourself\documents and settings\test one.doc instead of opening the document, start "X" "c:\users\yourself\documents and settings\test one.doc" will open the document.

How to get more than 40 windows in GNU screen under Debian [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am using the terminal program called screen, which can create several "virtual terminals" in a single "real" terminal (the words "virtual" and "real" here are quite relative, the "real" terminal can be a konsole tab as well, not necessarily tty1-tty6). The problem is that I cannot create more than 40 windows inside a single screen. When I try to create more, screen says "No more windows." After some googling I found that that this is controlled by something called MAXWIN, but I didn't find any information how to modify this MAXWIN. How can I increase the maximal number of windows inside a single screen?
I use Debian 6 "squeeze".
PS I understand that I can run several screen's in several "real" (in the above sense) terminals, but this makes it harder to use multiple display mode (screen -x).
That's a compile time option. Using strictly packages from upstream, it can't be done. If you wanted to compile screen yourself, you could accomplish this. Look in the config.h.in file. Near the top will be # define MAXWIN 40. Change that to your new limit.
(more info)

Vim slow performance when dealing with remote files [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm opening a file on a remote drive - it takes 3-4 seconds to open it - that's ok.
But afterwards, a lot of commands become really slow.
I'm typing :help vimrc - it takes 3-4 seconds to display.
I'm typing :setlocal nobuflisted - it takes 3-4 seconds.
It probably has something to to with those commands accesing the filesystem. If I do :setlocal list it works ok.
Also if I switch to another buffer, everthing is back to normal again.
Is there something I can do to improve performance?
Maybe the swap file is created in the remote directory and slows down your performance.
Try setting the default directory for swap and backup files on your local drive with:
set directory=/home/john/tmp
set backupdir=/home/john/tmp
Check your 'statusline' setting and autocmds on events like CursorMoved[I] and BufWinEnter.
I once had a function in my status line that invoked expand('%:p:h'); it caused a noticeable slowness as experienced by you. I fixed this by caching the lookups in a script-local Dictionary.

Resources