Earthshine Posted April 1, 2021 Share Posted April 1, 2021 (edited) No There is no way to display the console with word wrap that I know of and frankly I would never want to. I detest word wrap in most cases Edited April 1, 2021 by Earthshine Danyfirex 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Sylice Posted April 1, 2021 Share Posted April 1, 2021 Hey there, thanks for the response. I had previously written my own logger with a GUI Edit window but it has a lot less features than yours does so I've switched to yours. But mine had WordWrap in it (I don't actually recall if I set it/enabled it or if it's just enabled by default on a GUICtrlCreateEdit control by default). Anyway, as to your settings, I can start your list for you, I've figured out most of them I think: Global $hLoga0 = _LogaNew() $iLogGuiW = 580 $iLogGuiH = 240 $sLogaFontSize = '9' ; set a universal font size $hLoga0.Name = 'Automation Log' $hLoga0.Format = ' {LevelName} {Message}' $hLoga0.FilePath = $sPathJob & '\' & 'Auto.log' $hLoga0.LogFileAutoFlush = False ; false makes it wipe log on each run $hLoga0.LogToFile = True $hLoga0.LogToGUI = True $hLoga0.Width = $iLogGuiW $hLoga0.Height = $iLogGuiH $hLoga0.Left = @DesktopWidth-$iLogGuiW-84 $hLoga0.Top = @DesktopHeight-$iLogGuiH-60 $hLoga0.GUIBkColor = '0x000000' $hLoga0.Trans = '230' $hLoga0.TraceFontColor = '0xfff0a7' $hLoga0.TraceFontSize = $sLogaFontSize $hLoga0.DebugFontColor = '0xffab64' $hLoga0.DebugFontSize = $sLogaFontSize $hLoga0.InfoFontColor = '0xd0d0d0' $hLoga0.InfoFontSize = $sLogaFontSize $hLoga0.WarnFontColor = '0x53b6ff' $hLoga0.WarnFontSize = $sLogaFontSize $hLoga0.ErrorFontColor = '0x4a22a8' $hLoga0.ErrorFontSize = $sLogaFontSize $hLoga0.FatalFontColor = '0x0000FF' $hLoga0.FatalFontSize = $sLogaFontSize _LogaRefreshSettings($hLoga0) Danyfirex 1 Link to comment Share on other sites More sharing options...
Sylice Posted April 2, 2021 Share Posted April 2, 2021 I figured out the answer to my own question, word wrap can be "enabled" by removing the "horizontal scroll" ($WS_HSCROLL) setting from the _GUICtrlRichEdit_Create inside of your function __CreateLogGUI on (or near) line 902 in Loga.au3: Local $hRitchEdit = _GUICtrlRichEdit_Create($hGUI, "", 0, 0, $iWidth, $iHeight, $ES_READONLY + $ES_MULTILINE + $WS_VSCROLL + $ES_AUTOVSCROLL) Also I noticed that the Console kept printing out the font name on the line right after the log message. Not sure if this was intentional or an oversight/bug, but that can be fixed by commenting out the: ConsoleWrite($iFontName & @CRLF) on (or near) line 724 Danyfirex 1 Link to comment Share on other sites More sharing options...
Danyfirex Posted April 2, 2021 Author Share Posted April 2, 2021 Thank you Sylice. I'll fix that issue. I think I forgot to remove that line. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Marc Posted May 18, 2021 Share Posted May 18, 2021 If you find the time, could you replace your consolewrites with Func _ConsoleWrite($s) ConsoleWrite(BinaryToString(StringToBinary($s, 4), 1)) EndFunc taken from Jos here? Would allow it to write special characters like äöüß into the console 😀 best regards, Marc Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL) Link to comment Share on other sites More sharing options...
Danyfirex Posted May 18, 2021 Author Share Posted May 18, 2021 I'm not sure about It because I can write soecuak characters without that trick. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Marc Posted May 18, 2021 Share Posted May 18, 2021 (edited) Funny... hm, are your scripts UTF-8 encoded? I made this the default for my scripts... Edit 2021-05-20: Found the reason! I screwed up my user options file (has been grown and changed over the years). After going to "Options - Open User Options File" in Scite, I removed everything in it and just left "NewFileEncoding=UTF8BOM" as content. Now the german characters display normaly. And I thought, this behaviour would be normal, hehe... Edited May 20, 2021 by Marc found solution Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL) Link to comment Share on other sites More sharing options...
Danyfirex Posted May 18, 2021 Author Share Posted May 18, 2021 Yes It's UTF-8. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
mike2003 Posted July 30, 2021 Share Posted July 30, 2021 I see one small problem. If you use the GUI window and close it. Now the script starts calling interrupts and all programs lose focus. #include <Date.au3> #include "Loga.au3" Global $sSettings1='LogToGUI="true", TraceFontSize="15", Width="1000", FilePath="t:\output.log", Format="{Symbol}{LevelName} {Message} ' & @TAB & 'Error={Error} Extended={Extended}", Name="Write Log File 4 Test" ' Global $hLoga1=_LogaNew($sSettings1) While 1 _LogaTrace("I'm Trace " & _NowTime()) Sleep (1000) WEnd And further. If I do not use the first char {Symbol}. then the program will cut the output by one character. Trace] not [Trace] Link to comment Share on other sites More sharing options...
Danyfirex Posted July 30, 2021 Author Share Posted July 30, 2021 Hello. @mike2003 thank you for showing the issue. Updated on GitHub. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now