Search found 1646 matches

by penpen
19 Apr 2019 16:02
Forum: DOS Batch Forum
Topic: Print_gann trader (dosprogram)
Replies: 1
Views: 9

Re: Print_gann trader (dosprogram)

According to https://www.printfil.com/efaq32.htm the Standard DosBox build doesn't support printing to LPT1-4 or COM1-4, but there are two links (given on their page) to other versions that should support that feature. Note that i am not familiar with neither the linked page nor dosbox, so i don't k...
by penpen
16 Apr 2019 06:04
Forum: DOS Batch Forum
Topic: HTA+Batch hybrid; sheet.cssRules.length fails when file is too large
Replies: 2
Views: 71

Re: HTA+Batch hybrid; sheet.cssRules.length fails when file is too large

I suspect that either the html comment has a maximum length, or the "<hta:...>" element must be within a given offset of the file, else some weird bug triggers... . I suggest to use a comment as short as possible and put the batch portion into a script tag. So hopefully the folllowing works (without...
by penpen
10 Apr 2019 06:16
Forum: DOS Batch Forum
Topic: automatically send an email
Replies: 3
Views: 69

Re: automatically send an email

Then that might help you: set /p host1= "Please Input IP: " set logfile=%host1%.log echo DEST = %host1% > %logfile% :Ping ^ timeout 1 > NUL ping %host1% -w 1000 -n 10 >> %logfile% IF '%ERRORLEVEL%'=='1' GOTO SEND_MAIL GOTO Ping :SEND_MAIL PowerShell.exe -NoProfile -ExecutionPolicy Bypass -file send_...
by penpen
09 Apr 2019 05:32
Forum: DOS Batch Forum
Topic: How to sort file contents based on pattern?
Replies: 4
Views: 59

Re: How to sort file contents based on pattern?

But obviously rhats not dynamic and I can't always gaurentee that will always be the case so I need to force it to grab the highest. Is this easy to achieve? Yes, just cut out the number in the filename using "tokens=2 delims=_." and then compare the numbers with the content of an environment varia...
by penpen
09 Apr 2019 04:56
Forum: DOS Batch Forum
Topic: automatically send an email
Replies: 3
Views: 69

Re: automatically send an email

If you don't want to loop after sending the mail, then why do you loop using "GOTO Ping"?
You could just remove it.


penpen
by penpen
29 Mar 2019 07:25
Forum: DOS Batch Forum
Topic: Change chrome homepage using batch
Replies: 18
Views: 470

Re: Change chrome homepage using batch

the relevant part of the JSON looks like "homepage":"http://www.google.com/" Maybe that location is outdated because here on work (where i won't test changing that and where i won't try to develope that), is: "homepage"="F48D3D60A2CB04D9DA09E30EB6E80736359385D1914AECCF128234DEA3C9EDCD" I doubt that...
by penpen
28 Mar 2019 17:29
Forum: DOS Batch Forum
Topic: Change chrome homepage using batch
Replies: 18
Views: 470

Re: Change chrome homepage using batch

@Boxof, i'm not sure if you noticed that liitle snipplet of text, but we need input from you to proceed:
penpen wrote:but you have to find someone with Chrome to do that, or you might post a sample configuration file and find out which data-field has to be changed.
penpen
by penpen
25 Mar 2019 16:52
Forum: DOS Batch Forum
Topic: Change chrome homepage using batch
Replies: 18
Views: 470

Re: Change chrome homepage using batch

Yes, you are right, but something like the following "jsonTest.js.bat" should be sufficient for most json files: @if (true==false) then /* @echo off cscript //nologo //e:JScript "%~f0" %* exit /b %errorlevel% */ @end function traverse(key) { var type = ({}).toString.call(key).match(/\s([a-zA-Z]+)/)[...
by penpen
25 Mar 2019 07:10
Forum: DOS Batch Forum
Topic: Change chrome homepage using batch
Replies: 18
Views: 470

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: 18
Views: 470

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: 9
Views: 266

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: 28688

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: 268

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: 268

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: 282

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