Rapide Posted September 6, 2019 Share Posted September 6, 2019 (edited) Is there any way to see Consolewrite output when script is opened directly and not executed from editor? Curious. Edit: I am running a script and I want to see the consolewrite output of it (without terminating it ofcourse)😱 Edited September 6, 2019 by Rapide Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted September 6, 2019 Share Posted September 6, 2019 2 hours ago, Rapide said: Is there any way to see Consolewrite output when script is opened directly and not executed from editor? Curious. Compile it as CUI or make a GUI with an Edit control that you use as a Console Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
Rapide Posted September 6, 2019 Author Share Posted September 6, 2019 2 hours ago, FrancescoDiMuro said: Compile it as CUI or make a GUI with an Edit control that you use as a Console Is there any other way? Making GUI sounds like a long and even slightly difficult alternative for new people like me. As I said earlier, I am already running several scripts directly and don't want to terminate it, and start over everything again. I wonder if its possible to make another script to get Consolewrite() value or a variable value of the previous running script? Link to comment Share on other sites More sharing options...
jchd Posted September 6, 2019 Share Posted September 6, 2019 I use this to be able to write to console in any case (compiled or not): Global $CW = @Compiled ? __ConsoleWrite : _ConsoleWrite Func __ConsoleWrite(ByRef $s) Local Static $hCon = __ConsoleInit() DllCall("kernel32.dll", "bool", "WriteConsoleW", "handle", $hCon, "wstr", $s & @LF, "dword", StringLen($s) + 1, "dword*", 0, "ptr", 0) Return EndFunc ;==>__ConsoleWrite Func __ConsoleInit() DllCall("kernel32.dll", "bool", "AllocConsole") Return DllCall("kernel32.dll", "handle", "GetStdHandle", "int", -11)[0] EndFunc ;==>__ConsoleInit ; Unicode-aware ConsoleWrite Func _ConsoleWrite($s) ConsoleWrite(BinaryToString(StringToBinary($s & @LF, 4), 1)) EndFunc ;==>_ConsoleWrite I setup the SciTE console to Unicode, so that's why the last function is needed. Use it like that: $CW("some text" & @LF) Bilgus and Earthshine 2 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Earthshine Posted September 6, 2019 Share Posted September 6, 2019 (edited) I use log4a.au3 logger and set it to create a log file if running compiled. Otherwise it right to the console Edited September 6, 2019 by Earthshine My resources are limited. You must ask the right questions 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