Jump to content

Recommended Posts

Posted

Oh, I'm sorry. I've seen your hint but didn't get right.

CV tells about Button8 and it is working! Excellent. Again, thank you!

  • 2 weeks later...
Posted

Hello.

I set some things for PuTTY with this script, including default logging to C:\temp\Putty-Logs

For translation to English pls. use Deepl or google translate, TIA.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=Z:\PuTTY-setColor-Logging-defaults.exe
#AutoIt3Wrapper_Res_Description=PuTTY logging aktivieren und Farben besser definieren
#AutoIt3Wrapper_Res_Fileversion=1.0.0.13
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#AutoIt3Wrapper_Res_SaveSource=y
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_Run_Au3Stripper=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <File.au3>
#include <array.au3>
#include <Date.au3>

$title = StringLeft(@ScriptName, StringInStr(@ScriptName, ".", 0, -1) - 1) & ", v" & FileGetVersion(@ScriptFullPath)
$Key = "HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings"

$LogFilePath = "c:\\temp\\Putty-Logs\\" ; Trailing "\"
$LogFileSuffix = "-PuTTY-LOG.txt"
$LogFilePathWin = StringReplace($LogFilePath, "\\", "\") ; mit trailing "\"


DirCreate(StringTrimRight($LogFilePathWin, 1)) ; trailing BACKSLASH abschneiden
$Val = "LogFileName"
$Type = "REG_SZ"
$Wert = $LogFilePath & "&H__&Y-&M-&D_&T" & $LogFileSuffix
$WinLogFileName = StringReplace($Wert, "\\", "\")
RegWrite($Key, "LogFileName", $Type, $Wert)

RegDelete($Key, "Hostname")
RegDelete($Key, "WinTitle")

#Region Color-Settings anpassen, default Werte für Titel etc. wegschreiben.
RegWrite($Key, "Colour0", $Type, "220,220,187")
RegWrite($Key, "Colour2", $Type, "10,20,40")
RegWrite($Key, "Colour14", $Type, "111,111,222")
RegWrite($Key, "Colour15", $Type, "150,150,255")

$Type = "REG_DWORD"
RegWrite($Key, "TryPalette", $Type, 1)
RegWrite($Key, "ANSIColour", $Type, 1)
RegWrite($Key, "BoldAsColour", $Type, 2)
#EndRegion Color-Settings anpassen, default Werte für Titel etc. wegschreiben.

RegWrite($key,"LogType",$Type,1) ; Logging default an

MsgBox(64,$title,"PuTTY Color und Logging Defaults wurden gesetzt (HKCU)." & @CRLF & @CRLF & _
    "Wird PuTTY direkt auf einen Host gestartet, so wird automatisch ""all printable output"" gespeichert in einer " & _
    "LOG Datei im Verzeichns " & $LogFilePathWin)



;~ Windows Registry Editor Version 5.00

;~ [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]
;~ "Present"=dword:00000001
;~ "LogFileName"="c:\\\\temp\\\\Putty-Logs\\\\&H__&Y-&M-&D_&T-PuTTY-LOG.txt"
;~ "LogType"=dword:00000001
;~ "LogFileClash"=dword:ffffffff
;~ "LogFlush"=dword:00000001
;~ "TermWidth"=dword:00000080
;~ "TermHeight"=dword:00000060
;~ "Font"="Courier New"
;~ "FontIsBold"=dword:00000000
;~ "FontCharSet"=dword:00000000
;~ "FontHeight"=dword:0000000a
;~ "FontQuality"=dword:00000000
;~ "FontVTMode"=dword:00000004
;~ "UseSystemColours"=dword:00000000
;~ "TryPalette"=dword:00000001
;~ "ANSIColour"=dword:00000001
;~ "Xterm256Colour"=dword:00000000
;~ "BoldAsColour"=dword:00000002
;~ "Colour0"="220,220,187"
;~ "Colour1"="255,255,255"
;~ "Colour2"="10,20,40"
;~ "Colour3"="85,85,85"
;~ "Colour4"="0,0,0"
;~ "Colour5"="0,255,0"
;~ "Colour6"="0,0,0"
;~ "Colour7"="85,85,85"
;~ "Colour8"="187,0,0"
;~ "Colour9"="255,85,85"
;~ "Colour10"="0,187,0"
;~ "Colour11"="85,255,85"
;~ "Colour12"="187,187,0"
;~ "Colour13"="255,255,85"
;~ "Colour14"="111,111,222"
;~ "Colour15"="150,150,255"
;~ "Colour16"="187,0,187"
;~ "Colour17"="255,85,255"
;~ "Colour18"="0,187,187"
;~ "Colour19"="85,255,255"
;~ "Colour20"="187,187,187"
;~ "Colour21"="255,255,255"

 

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...