Search found 3158 matches

by aGerman
18 Jun 2018 15:13
Forum: DOS Batch Forum
Topic: Way to replace string in word DOC ?
Replies: 4
Views: 139

Re: Way to replace string in word DOC ?

I found some kind of bug in the return value of the Find.Execute method that makes the return value of the script rather ambiguous. E.g if you have the word abcx in your document and you want to replace abc , but only the whole word (using option /w). The Execute method returns true because it found...
by aGerman
16 Jun 2018 05:26
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 70
Views: 13720

Re: CONVERTCP.exe - Convert text from one code page to another

Most of the projects at SourceForge have this structure. People who only want to use the tool are not interested in the source code or in a lot of verbose information. That way users can download only the files they need.

Steffen
by aGerman
15 Jun 2018 10:54
Forum: DOS Batch Forum
Topic: Way to replace string in word DOC ?
Replies: 4
Views: 139

Re: Way to replace string in word DOC ?

Okay here it goes ... Save with extension .bat @if (0)==(0) echo off &setlocal EnableExtensions DisableDelayedExpansion &set "wordrepl=cscript //nologo //e:jscript %~fs0" :: Usage: :: %wordrepl% FileName Find Replace [/i] [/w] [/a] [/b] [/e] [/p] :: FileName path of the Word document :: Find text to...
by aGerman
15 Jun 2018 04:54
Forum: DOS Batch Forum
Topic: Way to replace string in word DOC ?
Replies: 4
Views: 139

Re: Way to replace string in word DOC ?

It's possible to automate MS Word, provided it was installed on the machine where you use the script. The ActiveX interface can't be accessed by Batch but a JScript hybrid could come in handy in that case. I'll try to write some lines of code this evening...

Steffen
by aGerman
14 Jun 2018 10:13
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 70
Views: 13720

Re: CONVERTCP.exe - Convert text from one code page to another

Version 5.1 behaves the same as version 5.0. I only changed the way that strings of the internal lookup table are saved in order to shrink the file size of the binaries. Virustotal scans of version 5.1: x86: https://www.virustotal.com/en/file/9612f482e5261e68712ebf8bb4beda5af6ea3bfc9d926062bd602afe8...
by aGerman
19 May 2018 08:11
Forum: DOS Batch Forum
Topic: Any other bat to exe converters/wrappers?
Replies: 11
Views: 365

Re: Any other bat to exe converters/wrappers?

Ed Dyreen wrote:
19 May 2018 07:14
better performance
The reason for uglyninja's question was that he observed bad performance. It's unlikely that it performs better with an additional process for the unpacking of the script than running cmd.exe directly. The latter has to be run anyway.

Steffen
by aGerman
19 May 2018 02:59
Forum: DOS Batch Forum
Topic: How do i return a string from cpp program to caller batch file?
Replies: 8
Views: 208

Re: How do i return a string from cpp program to caller batch file?

Child processes inherit environment variables from the parent process. But it doesn't work vice versa. The value of an environment variable that was changed in the child process isn't accessible in the parent process. I assume your example is about using CALL to run another batch code where it would...
by aGerman
18 May 2018 17:10
Forum: DOS Batch Forum
Topic: Any other bat to exe converters/wrappers?
Replies: 11
Views: 365

Re: Any other bat to exe converters/wrappers?

viewtopic.php?p=36858#p36858
No idea why people think they need to wrap Batch scripts into self-extractors.

Steffen
by aGerman
18 May 2018 17:04
Forum: DOS Batch Forum
Topic: How do i return a string from cpp program to caller batch file?
Replies: 8
Views: 208

Re: How do i return a string from cpp program to caller batch file?

You can parse strings written to the StdOut in a FOR /F loop.

In your C++ code you would have something like

Code: Select all

std::cout << "whatever string value" << std::endl;
And in the Batch script

Code: Select all

for /f "delims=" %%i in ('program.exe') do set "result=%%i"
Steffen
by aGerman
12 May 2018 14:03
Forum: DOS Batch Forum
Topic: Write variable content in file at specific point
Replies: 2
Views: 161

Re: Write variable content in file at specific point

Writing at a certain position isn't possible. You can either append new content at the end or you can write the whole file new. Does your SQL script only consist of the two lines that you posted? In that case you might be able to write it using the parameter variable without a temporary file like th...
by aGerman
12 May 2018 11:30
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 70
Views: 13720

Re: CONVERTCP.exe - Convert text from one code page to another

Version 5.0 supports passing aliases (such as MIME types or IATA numbers) rather than only code page IDs. That enables you to pass e.g. UTF-8 instead of 65001. A list of supported aliases is uploaded on SourceForge, too. Virustotal scans of version 5.0: x86: https://www.virustotal.com/en/file/a1c30c...
by aGerman
07 May 2018 11:33
Forum: DOS Batch Forum
Topic: 40 000 files search and delete
Replies: 3
Views: 159

Re: 40 000 files search and delete

a string like "forwardaction=0" or "forwardaction=0.0" and a file name to an image like "imagefilename=myfile.jpeg" Very unusual for JSON. Things like "forwardaction": 0 would look more like JSON. I need to go through all of those .json files and whenever the string "forwardaction=0" or "forwardact...
by aGerman
07 May 2018 11:14
Forum: DOS Batch Forum
Topic: plz help me
Replies: 2
Views: 117

Re: plz help me

A thread without any meaningful topic? No further information about your game and what problems you're facing? Good luck!

Steffen
by aGerman
07 May 2018 01:53
Forum: DOS Batch Forum
Topic: Create nul and all ascii characters with only batch
Replies: 110
Views: 35380

Re: Create nul and all ascii characters with only batch

@batmanbatman To make it easier for you to provide the informations that Carlos requests you could run info.bat to be found there: https://www.dostips.com/forum/viewtopic.php?f=3&t=7420&p=49133#p49133 After you run the script an editor window will pop up. Just copy the whole content and paste it to ...
by aGerman
06 May 2018 13:50
Forum: DOS Batch Forum
Topic: Help with basic Hello.html script
Replies: 3
Views: 165

Re: Help with basic Hello.html script

As I wrote, HTML is off-topic in this forum...
You have 2 span tags in your source text. Why not only have one with both settings for color and font size?

Hint: Write the HTM file by hand first and see how it behaves.

Steffen