Search found 10 matches
- 30 Jan 2017 02:14
- Forum: DOS Batch Forum
- Topic: What is "=::" and does its value ever changes?
- Replies: 13
- Views: 15357
Re: What is "=::" and does its value ever changes?
No, your examples can be explained by how undefined variable expansion works when extensions are enabled: m The example below helps to demonstrate the issue: @echo off set "undefined=" echo %undefined:~0,10% --- OUTPUT --- ~0,10 The =:: variable actually does exist at some level on some m...
- 30 Jan 2017 02:04
- Forum: DOS Batch Forum
- Topic: What is "=::" and does its value ever changes?
- Replies: 13
- Views: 15357
Re: What is "=::" and does its value ever change?
This is what i get when i try to write %=::% into a file named test12__ then try to open it:
No, seriously, i actually got that.
Opening it manually just reveals "Echo is ON", and i see that it's just 0x00. What??
Code: Select all
test12__.txt is not a valid Win32 application.
No, seriously, i actually got that.
Opening it manually just reveals "Echo is ON", and i see that it's just 0x00. What??
- 30 Jan 2017 01:56
- Forum: DOS Batch Forum
- Topic: A way to use C in (Pure) batch
- Replies: 4
- Views: 5912
Re: A way to use C in (Pure) batch
Well, not so pure because you have to have a compiler. That' not a reason why it shouldn't be hybrid: Any hybrid needs another executable to use the same file in different ways. For example a typical JScript/bat hybrid needs cmd.exe (for batch) and CScript.exe/WScript.exe (for JScript). The main re...
- 29 Jan 2017 15:07
- Forum: DOS Batch Forum
- Topic: Where is my mistake ?
- Replies: 5
- Views: 5572
Re: Where is my mistake ?
aGerman wrote:Variablenerweiterung
Love the small length of that word.
-Nuno, a portuguese speaker.
- 29 Jan 2017 14:18
- Forum: DOS Batch Forum
- Topic: A way to use C in (Pure) batch
- Replies: 4
- Views: 5912
Re: A way to use C in (Pure) batch
An example of what can be done (This is a color text program, in this case): // >nul 2>&1 & @echo off int dummy0(void) { // >nul 2>&1 int i; // >nul 2>&1 & goto bat return 0; // >nul 2>&1 } // >nul 2>&1 #include <windows.h> #include <stdlib.h> int main(int argc, char* arg...
- 29 Jan 2017 08:26
- Forum: DOS Batch Forum
- Topic: A way to use C in (Pure) batch
- Replies: 4
- Views: 5912
A way to use C in (Pure) batch
Well, not so pure because you have to have a compiler. This batch file uses tcc. Works fine for me: // >nul 2>&1 & @echo off int dummy0(void) { // >nul 2>&1 int i; // >nul 2>&1 & goto bat return 0; // >nul 2>&1 } // >nul 2>&1 #include <stdio.h> int main(void) { printf(&qu...
- 27 Jan 2017 14:51
- Forum: DOS Batch Forum
- Topic: obfuscated hello world won't print hello world
- Replies: 4
- Views: 5778
obfuscated hello world won't print hello world
I'm trying to create a (very) obfuscated "Hello World!" in batch. However, this gives an error or displays nothing rather than displaying "Hello WorlD!" set/a_=5-4>nul&&set/a.=5-5>nul&&set "m=^%^t^m^p^:^~^5^,%_%%"&&set "q=%^t^m^p^:^~%.%,%_%%...
- 30 Dec 2016 04:34
- Forum: DOS Batch Forum
- Topic: How to speed up a batch script
- Replies: 16
- Views: 30489
Re: How to speed up a batch script
As of i know, a single batch command takes exactly 1 millisecond to execute.
This is proven when you do:
that it takes 1 second to finish.
This is proven when you do:
Code: Select all
echo 1
echo 2
echo 3
...
echo 999
echo 1000
that it takes 1 second to finish.
- 28 Dec 2016 15:21
- Forum: DOS Batch Forum
- Topic: BAPI.BAT: a Batch API, for batch.
- Replies: 0
- Views: 7199
BAPI.BAT: a Batch API, for batch.
I am making a API for Batch called "BAPI". V1.0: Currently it's only feature is "colortext" and "colortextf", a color text tool. "colortext" uses powershell, and findstr if powershell is not supported (and a error if findstr isn't around...). "colortextf&...
- 30 Nov 2016 12:31
- Forum: DOS Batch Forum
- Topic: Strange bug when CMD /? is redirected to CON
- Replies: 7
- Views: 6502
Re: Strange bug when CMD /? is redirected to CON
When i try this is the result i get: Starts a new instance of the Windows command interpreter CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF]racter. cs. The only problem is it has a bunch of umm..'s and in the command line it acts like a single line. http://i.imgur.com/26LAy7w.png