Search found 143 matches

by DOSadnie
22 Oct 2023 08:57
Forum: DOS Batch Forum
Topic: Timeout with GUI adjustments breaks its design after first second passes
Replies: 16
Views: 65410

Re: Timeout with GUI adjustments breaks its design after first second passes

My fingers slipped and I performed a double pastng of what I had in the clipboard at that time This is the code I have @echo off cls echo/ echo Info about what the script will do echo/ setlocal EnableDelayedExpansion rem Get an ASCII CR (13) character for /F %%a in ('copy /Z "%~F0" NUL') do set "CR=...
by DOSadnie
16 Oct 2023 11:05
Forum: DOS Batch Forum
Topic: Showing a continuous countdown while executing other commands in background
Replies: 2
Views: 14326

Re: Showing a continuous countdown while executing other commands in background

I see there are some options in doing this, thank you But as they seem too complex for my limited skills, for now I will most likely be using something simple as this: @echo off setlocal enabledelayedexpansion :: Set the length of the countdown: set LENGTH_OF_THE_INITIAL_COUNTDOWN=2 :: Initial messa...
by DOSadnie
16 Oct 2023 10:56
Forum: DOS Batch Forum
Topic: Timeout with GUI adjustments breaks its design after first second passes
Replies: 16
Views: 65410

Re: Timeout with GUI adjustments breaks its design after first second passes

Yes, I am sure; this is the code cut out from UTF-8 BAT file saved on my volume @echo off cls echo/ echo Info about what the script will do echo/ setlocal EnableDelayedExpansion rem Get an ASCII CR (13) character for /F %%a in ('copy /Z "%~F0" NUL') do set "CR=%%a" rem Create a file with *just* 3 sp...
by DOSadnie
14 Oct 2023 08:08
Forum: DOS Batch Forum
Topic: Timeout with GUI adjustments breaks its design after first second passes
Replies: 16
Views: 65410

Re: Timeout with GUI adjustments breaks its design after first second passes

I also just now tried going back [https://www.dostips.com/forum/viewtopic.php?f=3&t=10871&p=69159#p68888] and after all settling on seeing 3 2 1 But I get 3 2 1 with this script utilizing the >>set<< trick @echo off setlocal enabledelayedexpansion echo. echo. Info about what the script will do echo....
by DOSadnie
14 Oct 2023 07:05
Forum: DOS Batch Forum
Topic: Timeout with GUI adjustments breaks its design after first second passes
Replies: 16
Views: 65410

Re: Timeout with GUI adjustments breaks its design after first second passes

It produces

Code: Select all

   Info about what the script will do

   Info Executing in:

   Info 3The   2The   1The   The script has been executed

   Info [Press any key to close this CMD window]
and leaves that spacesFile.txt file behnd
by DOSadnie
13 Oct 2023 10:50
Forum: DOS Batch Forum
Topic: Showing a continuous countdown while executing other commands in background
Replies: 2
Views: 14326

Showing a continuous countdown while executing other commands in background

Is it possible at all using just a single window created by BAT or PS1 script to see one rather long countdown while in the background the very same file will be firing up other commands? And if the user decided to interrupt the whole process to be able to close that window thus effectively stopping...
by DOSadnie
13 Oct 2023 10:18
Forum: DOS Batch Forum
Topic: Timeout with GUI adjustments breaks its design after first second passes
Replies: 16
Views: 65410

Re: Timeout with GUI adjustments breaks its design after first second passes

Due to not being able to come up with a properly working BAT , I decided to use this PS1 script instead Write-Host "Line of text at the very top" Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host ...
by DOSadnie
13 Oct 2023 08:49
Forum: DOS Batch Forum
Topic: How to interrupt script by closing the CMD window with any key?
Replies: 7
Views: 28547

Re: How to interrupt script by closing the CMD window with any key?

[...] I need to be able using physically keyboard to interrupt that countdown before further steps are executed - but using countdown in form of timeout makes >> w << incapable of interacting with CMD window This is an alternative method timeout /t 5 | findstr /R ".0$" > nul && goto continue || exi...
by DOSadnie
13 Oct 2023 08:12
Forum: DOS Batch Forum
Topic: Stop visible countdown from constantly scrolling its content to bottom of PowerShell window
Replies: 5
Views: 20249

Re: Stop visible countdown from constantly scrolling its content to bottom of PowerShell window

The Windows Console [conhost.exe] it is supposedly not possible to see digits of a countdown at the bottom of window while also retaining ability to scroll it up an not have the view being thrown back down after passing of another second - but the new Windows Terminal [windowsterminal.exe] however w...
by DOSadnie
26 Sep 2023 04:36
Forum: DOS Batch Forum
Topic: Stop visible countdown from constantly scrolling its content to bottom of PowerShell window
Replies: 5
Views: 20249

Re: Stop visible countdown from constantly scrolling its content to bottom of PowerShell window

I meant: how do I limit scrolling down to just where the counting takes place? Because your script makes it possible to scroll down through excess of empty lines I reworked both test into this script # Win32 API wrapper class Add-Type Console -NS Win32 -MemberDefinition @' [DllImport("kernel32.dll")...
by DOSadnie
22 Sep 2023 05:59
Forum: DOS Batch Forum
Topic: batchfile fails to delete unwanted files
Replies: 15
Views: 9925

Re: batchfile fails to delete unwanted files

What do mean by
Sebastian42 wrote:
22 Sep 2023 03:26
I have no trouble 'manually' deleting files with the extension .jsonlz4, preceded by '==
[...]
?

Maybe it is the cause behind also your BAT scripts not being able to do this task?
by DOSadnie
21 Sep 2023 01:46
Forum: DOS Batch Forum
Topic: Move flashing prompt sign away from left edge of PowerShell window
Replies: 7
Views: 23403

Re: Move flashing prompt sign away from left edge of PowerShell window

I have managed to co come up with a partial solution This script $COUNTDOWN = 3 Write-Host Write-Host " Endng in" Write-Host Write-Host " $COUNTDOWN" Write-Host Write-Host " seconds" Write-Host Start-Sleep -Seconds $COUNTDOWN Write-Host Write-Host Write-Host " Script has been executed" Write-Host Wr...
by DOSadnie
18 Sep 2023 07:30
Forum: DOS Batch Forum
Topic: Stop visible countdown from constantly scrolling its content to bottom of PowerShell window
Replies: 5
Views: 20249

Re: Stop visible countdown from constantly scrolling its content to bottom of PowerShell window

Thank you; this works as a standalone test PS1 file

But how do I incorporate this into that test script of mine from my initial post?