topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • September 21, 2019, 12:21 PM
  • 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
1
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...

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

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


if FileExist(drive) {
    Loop {
        EmptyFile(path)
        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...)

4
#NoEnv
#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
    }
}

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

6
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...

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

8
Google stopped working (again)?

https://stackoverflo...32-bits-of-precision

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

9
You are kidding me, right?

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

@SETLOCAL EnableDelayedExpansion
@ECHO OFF

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
        )
    )
)

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

11
@SETLOCAL EnableDelayedExpansion
@ECHO OFF

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
        )
    )
)

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

#NoEnv
#SingleInstance Force

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

13
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...

14
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)...


15
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...

16
Try this...

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

17
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...

https://www.radsix.com/

18
Have you done a search?
Rofl, seriously?

19
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:
---------------------------
DblEscClose
---------------------------
Run time error  14
at line  52
---------------------------
OK   
---------------------------


20
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: https://autohotkey.com/download/ahk.zip

21
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):

#NoEnv
#SingleInstance Force

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


22
Finished Programs / Re: SOLVED: Quick PowerShell Question
« on: October 03, 2018, 02:14 AM »
The answer is in the documentation?
https://docs.microso...em?view=powershell-6

23
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

E.g.:
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

etc.

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

24
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:
in/out,mm/dd/yyyy,hh:mm:ss
Example:
in,09/08/2018,22:05:29
out,09/08/2018,22:06:14

This should be easily importable into Excel...

25
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