avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • October 21, 2019, 12:21 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - highend01 [ switch to compact view ]

Pages: [1] 2 3 4 5 6 7next
You can't send "keystrokes" over a network, you need to send "messages" (to a program that listens to them on each client pc).
E.g. with https://autohotkey.c...on-of-winsock-tcpip/
If that still works...

#SingleInstance force
SetWorkingDir %A_ScriptDir%
FileEncoding UTF-8
SetBatchLines, -1

drive := "C:\"
file  := "Dummy.txt"
path  := drive . file
text  := "Dummy"

if FileExist(drive) {
    Loop {
        FileAppend, % text, % path

EmptyFile(file) {
    hFile := DllCall("CreateFile", Str, file, UInt, 0x40000000, UInt, 3, UInt, 0, UInt, 5, UInt, 0, UInt, 0)
    DllCall("CloseHandle", UInt, hFile)
    return hFile > 0 ? 1 : hFile

But ofc this empties the file before it gets overwritten...

OpenFile() would impose too many problems (no unicode, no > 128 file path length...)

#SingleInstance force
SetWorkingDir %A_ScriptDir%
FileEncoding UTF-8
SetBatchLines, -1

drive := "C:\"
file  := "Dummy.txt"
path  := drive . file
text  := "Dummy"

if FileExist(drive) {
    Loop {
        if FileExist(path)
            FileDelete, % path
        FileAppend, % text, % path

Sure, add the stuff from the stackoverflow link. Done.

Post New Requests Here / Re: Select Range of Files Via Batch File
« on: April 07, 2019, 11:16 AM »
findstr has a regex mode as well...

Who else would like to take the next step?
Maybe... You?

Google stopped working (again)?


Includes ways how to circumvent this restriction. Have fun learning a minimal amount of batch scripting!

You are kidding me, right?

That's the exact same thing, only in green...

@SETLOCAL EnableDelayedExpansion

REM 1 MB = 1048576 bytes
REM 157286400 = 150 MB
SET Max=157286400
SET Src=R:\tst_src
SET Dst=R:\tst_dst

IF EXIST "%Src%" (
    IF EXIST "%Dst%" (
        SET /a Size = 0
        FOR %%I IN ("%Src%\*") DO (
            SET /a Size += %%~zI
            IF !Size! GTR %Max% GOTO :EOF
            MOVE /Y "%%I" "%Dst%" >NUL 2>NUL

Use the last batch file I wrote and count up their size instead of count?

@SETLOCAL EnableDelayedExpansion

SET Max=10
SET Src=R:\a
SET Dst=R:\b

IF EXIST "%Src%" (
    IF EXIST "%Dst%" (
        SET /a Count = 1
        FOR /D %%I IN ("%Src%\*") DO (
            MOVE /Y "%%I" "%Dst%" >NUL 2>NUL
            IF !Count! == %Max% GOTO :EOF
            SET /a Count += 1

Write an .ahk script (and compile it), that removes all hyphens and line breaks with a single regex replace?

#SingleInstance Force

^+-:: ; Ctrl+Shift+-
Clipboard := RegExReplace(Clipboard, "(-+)?\r?\n")

Coding Snacks / Re: contextmenu addon feature (alike LevelZap)
« on: March 08, 2019, 08:07 AM »
Total Commander > search > search for TTF ; when found > feed to listbox > select all > move to 'dir'
What an effort...

XYplorer: Right click the folder, from the context menu: "Flatten folder", done...

A minor update (fixed a problem with the prune button (disabled or not when no results are found) and with the height of the string + button gadgets at the top)...

This version can "prune" (delete only the files with the smallest size and keep the one with the largest size) for each found folder...

Apart from that, the window is now resizable, and System Volume Information and $RECYCLE.BIN folders are now left out by default...

Use with care, you aren't asked if you're sure when you click the prune button^^
When the pruning is done, a log with all deleted files is copied to clipboard automatically...

Try this...

No threading for the scan, Cancel button is therefore useless atm...

Living Room / Re: Is there any compact portable browser?
« on: February 26, 2019, 02:58 PM »
How about a HTML 5 browser with a sporting size of 1,6 MB?

Sure, limited use (no tabs currently) but find a smaller one...

Have you done a search?
Rofl, seriously?

N.A.N.Y. 2019 / Re: NANY 2019 - DblEscClose
« on: November 30, 2018, 10:31 AM »
Windows Server 2012 R2 U3 x64

After starting it, on the first press of {ESC} the application fails (and exits) with:
Run time error  14
at line  52

Finished Programs / Re: DONE: clean the marked text
« on: October 09, 2018, 04:39 AM »
AHK doesn't need to be installed to be able to compile a script with it. Just use the current .zip:

Finished Programs / Re: DONE: clean the marked text
« on: October 09, 2018, 04:20 AM »
AHK (compile it, place it in start, use it's shortcut when a text with underscores is in the clipboard):

#SingleInstance Force

^+-:: ; Ctrl+Shift+- = Ctrl+_
Clipboard := RegExReplace(Clipboard, "[_]+", " ")

Finished Programs / Re: SOLVED: Quick PowerShell Question
« on: October 03, 2018, 02:14 AM »
The answer is in the documentation?

Finished Programs / Re: DONE: Tally folder contents by file date
« on: September 26, 2018, 04:07 AM »
My 2 cents...

TallyFiles.exe "path_1" "path_2" "path_X" [/fmt="yyyy-mm-dd" /date="c"]

- No dependencies
- It allows multiple paths in one call. If they contain spaces, double quotes are a necessity!
- Environment variables in paths are supported, e.g. "%windir%\Fonts"
- /fmt and /date are both optional (and can be used independently from each other)
- It should be clear that the same /fmt and /date values are used for all paths^^
- /fmt allows these elements:
  yyyy - 4 digit year
  yy   - 2 digit year
  mm   - 2 digit month
  dd   - 2 digit day
  hh   - 2 digit hour
  ii   - 2 digit minute
  ss   - 2 digit second
  The default is "yyyy-mm-dd"
- /date can be "c", "m" or "a" where "c" is the default

TallyFiles.exe "%windir%\Fonts"
will write a file named "Fonts.txt" into TallFiles.exe's location (in ascii format) with the creation date (sort method: ascending)

TallyFiles.exe "%windir%\Fonts" /date="m"
The same as above, this time with modified dates


The attachment contains a x86 and a x64 version...

Coding Snack Guidelines / Re: Simple logon-logoff timekeeper
« on: September 08, 2018, 03:13 PM »
Something like this?

Date and time fields are populated with the current time when the application is started
In and out buttons write to a file named "log.csv" (UTF-8, no BOM) in the SAME directory of the .exe file
(so don't put this in a UAC protected folder if you don't want to start it with admin permissions...)

Pressing {ESC} quits the application...

Entries look like this:

This should be easily importable into Excel...

Why don't you try to accomplish something on your own (like... forever)?

That would actually be a real improvement...

Pages: [1] 2 3 4 5 6 7next