Search found 19 matches

by WiVi71
27 Nov 2020 14:27
Forum: DOS Batch Forum
Topic: Is it possible restore overwrited contents like F7-Selection?
Replies: 2
Views: 3286

Is it possible restore overwrited contents like F7-Selection?

0.gif https://www.dostips.com/forum/viewtopic.php?p=34890#p34890 F7-Multiline selector restores the contents behind the selection after the select is done. I tried DECSCA(\e CSI Ps " q) with DECSC to restore overwrited contents but these ones were not supported on batch. Is there any other options ...
by WiVi71
27 Nov 2020 11:15
Forum: DOS Batch Forum
Topic: Error level IF/THEN
Replies: 2
Views: 3221

Re: Error level IF/THEN

HELLO! Thanks for coming by, I have a simple script that has an error level If/Then function but when running the script I get both error based messages upon completion when I should only be seeing one based upon its success or failure. I am not a "coder" I have no real experience or formal educati...
by WiVi71
13 Nov 2020 14:29
Forum: DOS Batch Forum
Topic: ANSI Escape Code does not works with (start) command
Replies: 5
Views: 4945

ANSI Escape Code does not works with (start) command

@echo off chcp 65001> nul for /F %%A in ('echo prompt $E ^| cmd') do set ESC=%%A echo %ESC%[2;2H[2,2] pause> nul ( echo %ESC%[4;4H[4,4] pause> nul ) ( start "" http://example.org echo %ESC%[6;6H[6,6] pause> nul ) Output: [2,2] [4,4] ←[6;6H[6,6] Tested on Microsoft Windows [Version 10.0.18363.592] I...
by WiVi71
04 Oct 2020 16:54
Forum: DOS Batch Forum
Topic: c-sharp's class does not outputs anything
Replies: 1
Views: 2565

c-sharp's class does not outputs anything

Since VBScript's Sendkey doesn't support UTF-8 characters, I am making a code uses C-Sharp's SendKeys.SendWait. Also, to prevent malicious use, I am adding simple passwords checks. but there was a problem while doing this. using System; using System.Diagnostics; using System.Runtime.InteropServices;...
by WiVi71
04 May 2020 14:33
Forum: DOS Batch Forum
Topic: Using for command starts/ends with double quote.
Replies: 2
Views: 3688

Re: Using for command starts/ends with double quote.

The cause and cure was explained in detail somewhere here in this forum, but my google-fu isn't strong enough (at least tonight). Maybe someone has bookmarked that or remembers why that goes wrong. If i remember right my workaround was, to just add an echo command and to not use delayedExpansion in...
by WiVi71
01 May 2020 16:39
Forum: DOS Batch Forum
Topic: Using for command starts/ends with double quote.
Replies: 2
Views: 3688

Using for command starts/ends with double quote.

I'm making a code to get some value from website with curl and sed. The website will include code that starts with name and ends with value with double quote. <div style="display:none;"> something="somethig" categoryNo="[numbers]" </div> In this code, I need [numbers]. Here is the code that I made t...
by WiVi71
14 Apr 2020 14:58
Forum: DOS Batch Forum
Topic: Can't parse arguments to variable
Replies: 5
Views: 5626

Re: Can't parse arguments to variable

After a few attempts, I thought there was a limit to comparing strings containing complex double quotes or parentheses using IF command without error. For example, IF "/SetCustomHeaders "User-Agent: Opera/9.60 (Windows NT 6.0; U; en) Presto/2.1.1"" == "" Command... didn't work. So, I tried to write...
by WiVi71
13 Apr 2020 13:45
Forum: DOS Batch Forum
Topic: Can't parse arguments to variable
Replies: 5
Views: 5626

Re: Can't parse arguments to variable

The comparison with your IF line does not work out as you would expect. If you want to know what goes wrong then you have to evaluate the displayed errors. For successful troubleshooting, it has proven useful to switch on the echo and thus to find something in the last displayed lines that leads to...
by WiVi71
12 Apr 2020 11:45
Forum: DOS Batch Forum
Topic: Can't parse arguments to variable
Replies: 5
Views: 5626

Can't parse arguments to variable

I am making a script that parses /SET1 OP1 OP2 /SET2 OP3 to /SET1 "WORD" OP1 OP2 /SET2 "WORD" OP3 The /SET... always starts with /Set and does not include double quotes. and /OP... may or may not contain double quotes and multiple spaces. This is the code I made to parse the arguments into variables...
by WiVi71
07 Apr 2020 19:45
Forum: DOS Batch Forum
Topic: edit lines in FIND comand
Replies: 2
Views: 3356

Re: edit lines in FIND comand

Hi programmers, I'm facing the following task: I have the file "c:\folder\a.txt" with the following content: a b a b c So I use the following batch: find "a" < c:\folder\a.txt >> c:\folder\b.txt and I obtain the c:\folder\b.txt with the following content: a a Now, what if I want to add a string aft...
by WiVi71
21 Mar 2020 19:35
Forum: DOS Batch Forum
Topic: Using Double Pipe in IF command
Replies: 5
Views: 6149

Re: Using Double Pipe in IF command

Also, FOR /F %A IN ('"ECHO WOW"') DO (TIMEOUT 1 && ECHO WOW || ECHO OHH) Worked. I don't see any reason for the for-loop of that command, just use pure conditional-chaining ("&&") and conditional-execution operator ("||"): TIMEOUT 1 && ECHO WOW || ECHO OHH I'm also not fully sure how that for-loop ...
by WiVi71
21 Mar 2020 18:41
Forum: DOS Batch Forum
Topic: Win10: Move cursor position to 0,0
Replies: 4
Views: 6719

Re: Win10: Move cursor position to 0,0

Antonio did something like that before using Windows 8.1: https://www.dostips.com/forum/viewtopic.php?f=3&t=6760 Outdated.PNG The codes we used before(timeout 1 > con) moved cursor position to 1,0 So you should have used a script to lift the cursor position up one line to move the cursor to 0,0 @ec...
by WiVi71
21 Mar 2020 17:13
Forum: DOS Batch Forum
Topic: Using Double Pipe in IF command
Replies: 5
Views: 6149

Re: Using Double Pipe in IF command

I don't think, that WiVi71 tries to use the conditional-execution operator "||" as a conditional-OR operator. @WiVi71 In all the examples you gave, you have used the character COMMA (','). That character is a delimiter and must be escaped, so the following might help you: IF . EQU ^, DISM || ECHO P...
by WiVi71
21 Mar 2020 16:28
Forum: DOS Batch Forum
Topic: Win10: Move cursor position to 0,0
Replies: 4
Views: 6719

Win10: Move cursor position to 0,0

I found that " FOR /F %A IN ('"TIMEOUT 1 > CON"') DO REM " command shows a different output than "TIMEOUT 1 > CON" command(In Windows 10). FOR_TIMEOUT.PNG The command moved the cursor position to 4,0 Also, several special characters were displayed on the screen. So, this code moves cursor position t...
by WiVi71
19 Mar 2020 12:40
Forum: DOS Batch Forum
Topic: Using Double Pipe in IF command
Replies: 5
Views: 6149

Using Double Pipe in IF command

I'm trying to use a double pipe or double ampersand in IF command, but it doesn't work as I expected. > IF . EQU , DISM || ECHO POO || is not expected This does not work. > IF . EQU , (DISM || ECHO POO) || is not expected This does not work either. > IF . EQU , DISM ||(ECHO POO) > IF . EQU , ('DISM ...