🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Loek Thu, 05 Nov 2026 18:48
Naja
#5
Author: Loek
Date: Thu, 05 Nov 2026 18:48
45 lines
2097 bytes
[code=ahk]
#SingleInstance Force
#NoTrayIcon
#NoEnv
#Persistent

OnClipboardChange("ClipChanged")
Return

ClipChanged(type) {
	; Alleen tekst opslaan (type 1)
	if (type == 1) {
		
		; --- 1. PROGRAMMA'S UITSLUITEN ---
		; Haal de naam op van het programma waaruit momenteel wordt gekopieerd
		WinGet, activeProcess, ProcessName, A
		
		; Vul hier de .exe namen in van programma's die je wilt negeren (gescheiden door een komma)
		excludedProcesses := "notepad.exe,calc.exe" 
		
		; Als het actieve programma in de uitsluitingen staat, stop dan hier (sla niets op)
		if InStr("," . excludedProcesses . ",", "," . activeProcess . ",")
			return

		; --- 2. DATUM EN TIJD ---
		now := A_Now
		FormatTime, date, now, yyyy-MM-dd
		FormatTime, time, now, HH:mm:ss:%A_msec%

		; --- 3. MAXIMAAL 5 REGELS TEKST ---
		limitedText := ""
		Loop, Parse, Clipboard, `n, `r ; Loop door elke regel van het klembord
		{
			if (A_Index > 5) ; Zodra we bij regel 6 aankomen, stoppen we met lezen
				break
				
			; Voeg de regel toe, en voeg een enter (`n) in voor elke regel behalve de eerste
			limitedText .= (A_Index = 1 ? "" : "`n") . A_LoopField
		}

		; --- 4. OPSLAAN NAAR BESTAND ---
		FileAppend, % Format("|{}| {}`n", time, limitedText), % Format("D:\Mijn Data\Klembord\{}.txt", date)
	}
}
[/code]
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads