Jump to content
Sign in to follow this  
wimhek

How to clear or delete the scite console output

Recommended Posts

wimhek

After 1 hour of debugging, I found out that I was looking at the wrong Console output :-(

Question is : How to clear or delete the scite console output.

Q2. Can I clear the output from within an autoit script ?

Share this post


Link to post
Share on other sites
water

A1: Shift + F5 (see under Tools)

A2: You can automate the SciTe window like any other window. So simply send Shift + F5 to the SciTe window

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
BugFix

I can't see the problem. If you run an script with output to console (ConsoleWrite), so are cleared the console everytime the script runs again.


Best Regards BugFix  

Share this post


Link to post
Share on other sites
wimhek

I can't see the problem. If you run an script with output to console (ConsoleWrite), so are cleared the console everytime the script runs again.

Nope, the output is appended at the end, and after running of the script the console window skips to the first line (and displays the errors)

Even after topping and starting scite, the log is not deleted.

Share this post


Link to post
Share on other sites
wimhek

Thank You very much for your quick answer. Shift F5 indeed clearst the console output, but after running the script I got the old data back.

Edited by wimhek

Share this post


Link to post
Share on other sites
Jos

This is a methode to clear to Output pane during script execution:

For $x = 1 to 100
    ConsoleWrite($x & @CRLF)
Next
ConsoleWrite("clear output in 1 sec" & @CRLF)
Sleep(1000)
SendSciTE_Command("menucommand:420") ; Clear Output pane "IDM_CLEAROUTPUT"
ConsoleWrite("cleared" & @CRLF)
For $x = 1 to 100
    ConsoleWrite($x & @CRLF)
Next
Exit
;
; Send command to SciTE
Func SendSciTE_Command($sCmd)
    Local $Scite_hwnd = WinGetHandle("DirectorExtension")
    Local $WM_COPYDATA = 74
    Local $CmdStruct = DllStructCreate('Char[' & StringLen($sCmd) + 1 & ']')
    DllStructSetData($CmdStruct, 1, $sCmd)
    Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr')
    DllStructSetData($COPYDATA, 1, 1)
    DllStructSetData($COPYDATA, 2, StringLen($sCmd) + 1)
    DllStructSetData($COPYDATA, 3, DllStructGetPtr($CmdStruct))
    DllCall('User32.dll', 'None', 'SendMessage', 'HWnd', $Scite_hwnd, _
            'Int', $WM_COPYDATA, 'HWnd', 0, _
            'Ptr', DllStructGetPtr($COPYDATA))
EndFunc   ;==>SendSciTE_Command

Jos :)

Edited by Jos
  • Like 2

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
wimhek

Thank you , this works. Ik wil put this solution into MYUDF an implement it standard on all my scripts :-)

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×