wimhek Posted November 21, 2009 Share Posted November 21, 2009 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 ? Link to comment Share on other sites More sharing options...
water Posted November 21, 2009 Share Posted November 21, 2009 (edited) 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 November 21, 2009 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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 More sharing options...
BugFix Posted November 21, 2009 Share Posted November 21, 2009 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 Link to comment Share on other sites More sharing options...
wimhek Posted November 21, 2009 Author Share Posted November 21, 2009 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 More sharing options...
wimhek Posted November 21, 2009 Author Share Posted November 21, 2009 (edited) 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 November 21, 2009 by wimhek Link to comment Share on other sites More sharing options...
Developers Jos Posted November 21, 2009 Developers Share Posted November 21, 2009 (edited) 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 November 21, 2009 by Jos argumentum and tarretarretarre 2 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 More sharing options...
wimhek Posted November 21, 2009 Author Share Posted November 21, 2009 Thank you , this works. Ik wil put this solution into MYUDF an implement it standard on all my scripts :-) 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