Jump to content

How to clear or delete the scite console output


wimhek
 Share

Recommended Posts

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

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