Search the Community
Showing results for tags 'consolewrite()'.
-
Hello, I'm trying to call a Subscript using a Mainscript. This is my Mainscript: ;#pragma("AutoItExecuteAllowed", True) ConsoleWrite("Start Loop" & @CRLF) For $i = 1 To 3 ConsoleWrite("Looping..." & @CRLF) Sleep(1000) RunWait(@AutoItExe & " /AutoIt3ExecuteScript Subscript.au3") Next ConsoleWrite("Loop Finished" & @CRLF) This is my Subscript: _write15() ;ConsoleWrite("Hello" & @CRLF) MsgBox(0, "", "Hello") Func _write15() ;ConsoleWrite("15" & @CRLF) MsgBox(0, "", "15") EndFunc If I run exactly like above, it's working correctly. I can see the message boxes every time; first "Hello" and then "15". No problem at all. This is my output: +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. Start Loop Looping... Looping... Looping... +>18:07:37 AutoIt3.exe ended.rc:0 +>18:07:37 AutoIt3Wrapper Finished. BUT: If I comment MsgBox and open the ConsoleWrite in the Subscript, I cannot see "Hello" and "15" in the output window: _write15() ConsoleWrite("Hello" & @CRLF) ;MsgBox(0, "", "Hello") Func _write15() ConsoleWrite("15" & @CRLF) ;MsgBox(0, "", "15") EndFunc The output is the same as above: +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. Start Loop Looping... Looping... Looping... Loop Finished +>18:10:45 AutoIt3.exe ended.rc:0 +>18:10:45 AutoIt3Wrapper Finished. Is there a way that I can see "Hello" and "15" as ConsoleWrite in the output window? What I'm expecting is something like this: Start Loop Looping... 15 Hello Looping... 15 Hello Looping... 15 Hello Loop Finished Side note-1: I don't want to use #include <Subscript.au3> because I want to change and edit the content of Subscript any time I want. If I include Subscript.au3, even if I change the content while the Mainscript is running, I cannot see the changes until I start Mainscript again. Side note-2: I found #pragma("AutoItExecuteAllowed", True) in some other topics, but I couldn't make use of it, so I commented it.
-
ConsoleWrite('>Message here.' & @CRLF) outputs colored text (per + > - ! characters). ConsoleWrite('warning' & @TAB & '38' & @TAB & 'more text ...' & @CRLF) enables jump to line 38 on doubleclick. Using "jump to line" format, only red and pink text coloring seems possible (simply prefixing color directives to output-text disables jump to line functionality). Is it possible to combine the two (define custom color while keeping "jump to line" functionality)?
- 2 replies
-
- color
- ConsoleWrite()
-
(and 1 more)
Tagged with: