supadodger Posted October 2, 2010 Share Posted October 2, 2010 is it possible to write a whole script to a log file? so you can see exactly what its doing like trayicondebug but without going to every line and creating a filewrite Link to comment Share on other sites More sharing options...
JohnOne Posted October 3, 2010 Share Posted October 3, 2010 There is probably something close, but I've never looked at them Search example scripts for autoit debugger / visual debugger AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Valuater Posted October 3, 2010 Share Posted October 3, 2010 #include <debug.au3> It's built-in now Hope that can help 8) Link to comment Share on other sites More sharing options...
supadodger Posted October 3, 2010 Author Share Posted October 3, 2010 #include <debug.au3>It's built-in nowHope that can help8)im a little lost.i need filewriteline("mylogfile.log",debugreport())something like that...ive had 1 too many bottles of wine but i know i am close... Link to comment Share on other sites More sharing options...
supadodger Posted October 3, 2010 Author Share Posted October 3, 2010 glasses of wine... glasses not bottles LOL Link to comment Share on other sites More sharing options...
JohnOne Posted October 3, 2010 Share Posted October 3, 2010 (edited) You are going to have to write something from where you want to get info from. If you dont want to use the standard UDF then write your own debug function, and have it report from each of your script functions. Or use @error in each function. EDIT: For instance Func _MyFunc() ;.... MyCode ConsoleWrite("Exited from _MyFunc() with error: " & @error) Return EndFunc Edited October 3, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
jaberwacky Posted October 3, 2010 Share Posted October 3, 2010 In SciTE I use Tools > Trace: Add Trace Lines It will output to the console however. To remove: Tools > Trace: Remove ALL Trace Lines Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
JohnOne Posted October 3, 2010 Share Posted October 3, 2010 In SciTE I use Tools > Trace: Add Trace LinesIt will output to the console however.To remove: Tools > Trace: Remove ALL Trace LinesEven better ^^^Never even seen that, I miss so much in scite, because there is so much. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 3, 2010 Moderators Share Posted October 3, 2010 JohnOne,Just put #AutoIt3Wrapper_Run_Debug_Mode=Y at the top of the script - but be prepared for a very long scroll through the output pane!M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JohnOne Posted October 3, 2010 Share Posted October 3, 2010 Cheers M23 good to know. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
supadodger Posted October 3, 2010 Author Share Posted October 3, 2010 Even better ^^^Never even seen that, I miss so much in scite, because there is so much.this worked great because i changed all the consolewrites to filewrite THANK YOU.i should have stopped working on my script last night after i felt the buzz but i was so close to finishing and then at some point i couldnt figure out why it was stuck in an infinite loop only when compiled... Link to comment Share on other sites More sharing options...
JohnOne Posted October 3, 2010 Share Posted October 3, 2010 Its always a good idea to get some sleep when you are like that, I've stayed up all night trying to solve an error, then after some sleep, realizing how simle the problem actually is. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
jaberwacky Posted October 3, 2010 Share Posted October 3, 2010 JohnOne,Just put #AutoIt3Wrapper_Run_Debug_Mode=Y at the top of the script - but be prepared for a very long scroll through the output pane!M23even better ^^^ Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
supadodger Posted October 3, 2010 Author Share Posted October 3, 2010 even better ^^^i need it to a log file not console though... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 3, 2010 Moderators Share Posted October 3, 2010 supadodger, This will copy the contents of the SciTE output pane to a file - will that do? #AutoIt3Wrapper_Run_Debug_Mode=Y #include <GUIConstantsEx.au3> OnAutoItExitRegister("_Copy_SciTE") $hGUI = GUICreate("Test", 500, 500) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _Copy_SciTE() Local $hSciTE_Wnd = WinGetHandle("[CLASS:SciTEWindow]") $sText = ControlGetText($hSciTE_Wnd, "", "[CLASS:Scintilla; INSTANCE:2]") $sText = StringToBinary($sText ,2) $sText = BinaryToString($sText, 1) $sText = String($sText) $hFile = FileOpen(@ScriptDir & "\SciTE_Outout.txt", 2) FileWrite($hFile, $sText) FileClose($hFile) EndFunc M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
supadodger Posted October 3, 2010 Author Share Posted October 3, 2010 supadodger, This will copy the contents of the SciTE output pane to a file - will that do? #AutoIt3Wrapper_Run_Debug_Mode=Y #include <GUIConstantsEx.au3> OnAutoItExitRegister("_Copy_SciTE") $hGUI = GUICreate("Test", 500, 500) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _Copy_SciTE() Local $hSciTE_Wnd = WinGetHandle("[CLASS:SciTEWindow]") $sText = ControlGetText($hSciTE_Wnd, "", "[CLASS:Scintilla; INSTANCE:2]") $sText = StringToBinary($sText ,2) $sText = BinaryToString($sText, 1) $sText = String($sText) $hFile = FileOpen(@ScriptDir & "\SciTE_Outout.txt", 2) FileWrite($hFile, $sText) FileClose($hFile) EndFunc M23 i got it using the trace feature of scite and then search & replace all the consolewrites with filewrites but i will save this thread for future use... 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