Search found 1638 matches

by penpen
25 Mar 2019 07:10
Forum: DOS Batch Forum
Topic: Change chrome homepage using batch
Replies: 8
Views: 180

Re: Change chrome homepage using batch

Not quite. The global JSON object will be provided by the browser. It's not accessible from the script engine for stand-alone scripts. Well you could just copy the json object into a worker jScript - it's just a regular java script object (and ECMA-Script should cover that). "test.bat": @echo off s...
by penpen
24 Mar 2019 12:06
Forum: DOS Batch Forum
Topic: Change chrome homepage using batch
Replies: 8
Views: 180

Re: Change chrome homepage using batch

Well "json" is short for JavaScript Object Notation, so if that is correct then you probably can do that using JavaScript. So yes you should be able to do that with a hybrid jScript/batch file... but you have to find someone with Chrome to do that, or you might post a sample configuration file and f...
by penpen
24 Mar 2019 11:28
Forum: DOS Batch Forum
Topic: Directory "file dates" keep changing (for DIR) - Win 10
Replies: 8
Views: 123

Re: Directory "file dates" keep changing (for DIR) - Win 10

Maybe you could use some command line argument of the "dir"-command, such like "/T".


penpen
by penpen
23 Mar 2019 10:53
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 80
Views: 27744

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

To be honest, i never needed such a tool: Most of the time it was sufficient to be able to convert from utf-16le to all installed codepages. (So i never tried to convert from codepage to utf-16le, so i never checked if that was possible.) utf-8le -> any installed codepage: @echo off :: needed files:...
by penpen
19 Mar 2019 06:51
Forum: DOS Batch Forum
Topic: Splitting PDFs by page count with pdfgrep and pdftk
Replies: 5
Views: 179

Re: Splitting PDFs by page count with pdfgrep and pdftk

is there a way to add the next page as well to all the 2 page letters Yes, of course: @echo off setlocal enableExtensions enableDelayedExpansion type "pages.txt" set "_1page=" set "_2page=" <"pages.txt" set /p "line_1=" set /a "next=line_1+1" :: line_2 == %%~a for /f "skip=1 usebackq" %%a in ("page...
by penpen
16 Mar 2019 07:32
Forum: DOS Batch Forum
Topic: Splitting PDFs by page count with pdfgrep and pdftk
Replies: 5
Views: 179

Re: Splitting PDFs by page count with pdfgrep and pdftk

It sounds lie you only are searching for omething lie that: @echo off setlocal enableExtensions enableDelayedExpansion type "pages.txt" set "_1page=" set "_2page=" <"pages.txt" set /p "line_1=" set /a "next=line_1+1" :: line_2 == %%~a for /f "skip=1 usebackq" %%a in ("pages.txt") do ( echo("!line_1!...
by penpen
13 Mar 2019 06:58
Forum: DOS Batch Forum
Topic: Simple log function does not work with some characters (such as parentheses or variables)
Replies: 6
Views: 187

Re: Simple log function does not work with some characters (such as parentheses or variables)

I think the number of circumflex accents is wrong. so the following might work (currently untested, posting from my mobile phone):

Code: Select all

call :Write_Log - [Info]	- The script was executed under the account: "!currend_user!" ^^^^^("Run as Administrator", from Windows Vista^^^^^).
penpen
by penpen
13 Mar 2019 06:41
Forum: DOS Batch Forum
Topic: help for creating batch file
Replies: 1
Views: 91

Re: help for creating batch file

is there any way I can merge them into a smarter file, maybe with an "IF" command or anything like that, so that it checks to see which adaptor is enabled and disable it, and vice-versa? It could be a yes; it depends on the source code you have. Maybe you should consider also positing that sources....
by penpen
09 Mar 2019 03:28
Forum: DOS Batch Forum
Topic: Batch program for running process
Replies: 1
Views: 129

Re: Batch program for running process

I'm not sure what you exactly want to achieve. If you only want to send an email, whenever your batch ends "on its own", then just make sure the last command in your batch sends an email (using third party or vbs/js/powershell/... script - just search this forum for the words "send email" without th...
by penpen
06 Mar 2019 10:51
Forum: DOS Batch Forum
Topic: UTF-8 bug
Replies: 19
Views: 609

Re: UTF-8 bug

WinXP was even more buggy. In order to not crash the default WinXP consoIe, i first had to change the batch to: @echo off &setlocal (chcp 65001 & type "bug_test.txt" & chcp 850) That's (a part of) the output i got: ┬┤ÔòùÔöÉÔö£ÔòØ├ö├®┬╝Ôö£ÔòØ├ö├®┬╝Ôö£ÔòØ├ö├®┬╝Ôö£ÔòØ├ö├®┬╝Ôö£ÔòØ├ö├®┬╝ Ôö£ÔòØ├ö├®├®┬╝ Ô...
by penpen
05 Mar 2019 18:17
Forum: DOS Batch Forum
Topic: UTF-8 bug
Replies: 19
Views: 609

Re: UTF-8 bug

That is irritating because they must have cared for such an issue... but forgotten to use that for utf-8... . I agree. Besides of that code page 932 is a MBCS according to your explanation. DBCSs would always use two bytes. Although I'm not familiar with 932 in particular. I hear alot that DBCS alw...
by penpen
05 Mar 2019 15:06
Forum: DOS Batch Forum
Topic: UTF-8 bug
Replies: 19
Views: 609

Re: UTF-8 bug

I'm unsure why DBCSs seem not to suffer from this bug... . Guess why. Buffers are usually declared with an even size. Thus, an even number of bytes will always fit. In DBCS like Microsoft Windows code page 932 there are also single byte characters (such as 'a'), but as seen above, i couldn't split ...
by penpen
05 Mar 2019 07:17
Forum: DOS Batch Forum
Topic: UTF-8 bug
Replies: 19
Views: 609

Re: UTF-8 bug

No, there are no BOM characters in the middle of the text. That are just converted UTF-8 characters that have been incompletely read. You were right, it was the "REPLACEMENT CHARACTER" (EF BF BD around ~1-2 am it was too similar for me to the bom = EF BB BF). I think now it's getting quite clear th...
by penpen
04 Mar 2019 19:05
Forum: DOS Batch Forum
Topic: UTF-8 bug
Replies: 19
Views: 609

Re: UTF-8 bug

After viewing the output, it might just be a console display error. The additional characters are all bom values probably indicating how many unknown character parts are found: The first part at the end of the type command's read buffer may contain multiple bytes, while the following are single byte...
by penpen
04 Mar 2019 17:14
Forum: DOS Batch Forum
Topic: UTF-8 bug
Replies: 19
Views: 609

Re: UTF-8 bug

The BOM has not been removed but shows up as blank. That part is no bug. Since Unicode 2.0 (i'm unsure, could also be v1.1) the utf-8 bom is the character "ZERO WIDTH NO-BREAK SPACE". When using rasterfonts you are allowed to use a non zero width bo-break space, although it is recommended to do oth...