Bert Posted March 31, 2006 Share Posted March 31, 2006 (edited) I'm was wondering something - is it possible to have Scite report what line is active in your script in the output window, like when you add AutoItSetOption("TrayIconDebug", 1) to the beginning of a script? If not, no biggie. just wondering. I know consolewrite can do something like this, but is there a setting in Scite I can use? Edited March 31, 2006 by vollyman The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Valuater Posted March 31, 2006 Share Posted March 31, 2006 Tools > Add Trace Lines 8) Link to comment Share on other sites More sharing options...
Bert Posted March 31, 2006 Author Share Posted March 31, 2006 (edited) I tried that, and it introduced 5 errors. edit: ran tidy, still got errors >C:\Program Files\AutoIt3\SciTE\CompileAU3\CompileAU3.exe /beta /AU3Check /in "C:\Documents and Settings\a4mh3\Desktop\autoit scrips\UNPlus\unplus20.au3" >Running AU3Check (1.54.1.1) params: from:C:\Program Files\AutoIt3\beta C:\Documents and Settings\a4mh3\Desktop\autoit scrips\UNPlus\unplus20.au3(143,18) : ERROR: syntax error ConsoleWrite ^ C:\Documents and Settings\a4mh3\Desktop\autoit scrips\UNPlus\unplus20.au3(143,123) : ERROR: syntax error ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(144) : Case $msg = $optiontray' & @lf) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\a4mh3\Desktop\autoit scrips\UNPlus\unplus20.au3(144,3) : ERROR: missing Wend. Case ^ C:\Documents and Settings\a4mh3\Desktop\autoit scrips\UNPlus\unplus20.au3(142,8) : REF: missing Wend. Select ~~~~~~^ C:\Documents and Settings\a4mh3\Desktop\autoit scrips\UNPlus\unplus20.au3(130,38) : ERROR: _F6_Func(): undefined function. $keyA = HotKeySet($keySET, "_F6_Func") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\a4mh3\Desktop\autoit scrips\UNPlus\unplus20.au3(132,38) : ERROR: _key1_Func(): undefined function. $keyB = HotKeySet("^!x", "_key1_Func") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\a4mh3\Desktop\autoit scrips\UNPlus\unplus20.au3 - 5 error(s), 0 warning(s) !>AU3Check ended.rc:2 >Exit code: 0 Time: 0.554 Edited March 31, 2006 by vollyman The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Developers Jos Posted March 31, 2006 Developers Share Posted March 31, 2006 I tried that, and it introduced 5 errors. Which errors ?What about Opt("TrayIconDebug", 1) ? 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...
Bert Posted March 31, 2006 Author Share Posted March 31, 2006 (edited) I know I can do trayicondebug, I just wanted to see the output while the script ran from Scite. I see what Val was talking about, and I understand how it works. What I did notice was when I put in the traces, it broke the script. When I took them away, the script reported no errors. Here is one of the sections that the trace would break. I will show it both with and without traces. without trace: While 1 Select Case _NowTime() = $current Exit Case Not WinExists("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") sleep(500) if WinExists("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") then sleep(5) Else exit endif EndSelect _ToolbarDocked() Sleep(20) if Winactive("Unicenter Toolbar") then WinActivate("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") WEnd with traces - lines 109 to 139 While 1 ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(111) : Select' & @lf);### Trace Console Select ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(113) : Case _NowTime() = $current' & @lf);### Trace Console Case _NowTime() = $current ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(115) : Exit' & @lf);### Trace Console Exit ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(117) : Case Not WinExists("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe")' & @lf);### Trace Console Case Not WinExists("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(119) : sleep(500) ' & @lf);### Trace Console sleep(500) ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(121) : if WinExists("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") then ' & @lf);### Trace Console if WinExists("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") then ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(123) : sleep(5)' & @lf);### Trace Console sleep(5) ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(125) : Else' & @lf);### Trace Console Else ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(127) : exit' & @lf);### Trace Console exit ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(129) : endif ' & @lf);### Trace Console endif ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(131) : EndSelect ' & @lf);### Trace Console EndSelect ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(133) : _ToolbarDocked()' & @lf);### Trace Console _ToolbarDocked() ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(135) : Sleep(20)' & @lf);### Trace Console Sleep(20) ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(137) : if Winactive("Unicenter Toolbar") then WinActivate("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe")' & @lf);### Trace Console if Winactive("Unicenter Toolbar") then WinActivate("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(139) : WEnd' & @lf);### Trace Console WEnd error shown in output: C:\Documents and Settings\a4mh3\Desktop\autoit scrips\UNPlus\maintoolbar.au3(112,127) : ERROR: syntax error ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(113) : Case _NowTime() = $current' & @lf) Edited March 31, 2006 by vollyman The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Developers Jos Posted March 31, 2006 Developers Share Posted March 31, 2006 (edited) I know I can do trayicondebug, I just wanted to see the output while the script ran from Scite. I see what Val was talking about, and I understand how it works. What I did notice was when I put in the traces, it broke the script. When I took them away, the script reported no errors. Here is one of the sections that the trace would break. I will show it both with and without traces. without trace: While 1 Select Case _NowTime() = $current Exit Case Not WinExists("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") sleep(500) if WinExists("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") then sleep(5) Else exit endif EndSelect _ToolbarDocked() Sleep(20) if Winactive("Unicenter Toolbar") then WinActivate("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") WEnd with traces - lines 109 to 139 While 1 ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(111) : Select' & @lf);### Trace Console Select ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(113) : Case _NowTime() = $current' & @lf);### Trace Console Case _NowTime() = $current ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(115) : Exit' & @lf);### Trace Console Exit ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(117) : Case Not WinExists("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe")' & @lf);### Trace Console Case Not WinExists("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(119) : sleep(500) ' & @lf);### Trace Console sleep(500) ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(121) : if WinExists("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") then ' & @lf);### Trace Console if WinExists("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") then ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(123) : sleep(5)' & @lf);### Trace Console sleep(5) ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(125) : Else' & @lf);### Trace Console Else ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(127) : exit' & @lf);### Trace Console exit ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(129) : endif ' & @lf);### Trace Console endif ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(131) : EndSelect ' & @lf);### Trace Console EndSelect ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(133) : _ToolbarDocked()' & @lf);### Trace Console _ToolbarDocked() ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(135) : Sleep(20)' & @lf);### Trace Console Sleep(20) ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(137) : if Winactive("Unicenter Toolbar") then WinActivate("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe")' & @lf);### Trace Console if Winactive("Unicenter Toolbar") then WinActivate("Unicenter ServicePlus Service Desk", "http://usdp/CAisd/pdmweb.exe") ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(139) : WEnd' & @lf);### Trace Console WEnd error shown in output: C:\Documents and Settings\a4mh3\Desktop\autoit scrips\UNPlus\maintoolbar.au3(112,127) : ERROR: syntax error ConsoleWrite('>Error code: ' & @error & @lf & @lf & '@@ Trace(113) : Case _NowTime() = $current' & @lf) Did you load the latest SciTE4AU3UPD ? It contains a fix to avoid AddTraceLines to add a ConsoleWrite after a Select or Switch statement... Edited March 31, 2006 by JdeB 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...
seandisanti Posted March 31, 2006 Share Posted March 31, 2006 haha, did this because i was being stupid, and totally didn't think correctly about the output. thought others could get a laugh out of it. #include<file.au3> dim $file _FileReadToArray(@ScriptFullPath,$file) if @error Then MsgBox(0,"error","error") For $x = 1 to $file[0] ConsoleWrite(@LF & $file[@ScriptLineNumber] & @LF) Next Link to comment Share on other sites More sharing options...
Bert Posted April 1, 2006 Author Share Posted April 1, 2006 didn't think of that. I will update Scite. Has anyone made a Scite update tool? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
The Kandie Man Posted April 1, 2006 Share Posted April 1, 2006 No SCITE auto-updaters that i know of. Maybe i should write one. "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
Developers Jos Posted April 1, 2006 Developers Share Posted April 1, 2006 didn't think of that. I will update Scite. Has anyone made a Scite update tool?Is under development/testing ...I have added this to the next version of CompileAU3..It will check ones a day if there is an update available and if so will show that in the SciTE Output pane like:->************************************************************************************->There is a SciTE4Au3Upd installer available dated: 3/26/2006->Visit http://www.autoitscript.com/autoit3/scite to download latest version.->*********************************************************************************** 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...
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