View Full Version : MaxScript Listener -- how to mark...
MerlinEl 12-20-2006, 07:43 AM example:
-- Error occurred in switchSemaphore(); filename: E:\Car Trace\ct9.ms; position: 4416
is there any way mark this line in my script?
manualy is not mutch easy to find it :D
|
|
ypuech
12-20-2006, 10:36 AM
Hi,
If you cannot locate the error, maybe the error comes from an undefined value : search for values state using print (I love print debug in MAXScript...:)).
MerlinEl
12-20-2006, 12:47 PM
I like to put "format" or "print" variables to listener to , but sometimes is no time for this :)
if is posible do somethink like this ............
when i get: -- Error occurred in position: 4416
fn getTextIn file lineNum =
(
local f= openFile "foo.ms" mode:"r+"
local count = 0
while not eof f do -- read until reach end of file
(
local line=readline f -- read in a line
count += 1
if count == lineNum do
(
format "Error in line:%\ndata:%\n" lineNum line
)
)
close f
)
After i can copy the string from listener and search for it but
better should be mark the line to blue in opened script in max window
ypuech
12-20-2006, 01:16 PM
Hi Rene,
Thanks for the explanation.
I've found some functions to interact with the listener : see "Controlling the Listener Contents and the Insertion Point" in the reference.
Maybe setListenerSel does what you want.
Deadalus
12-20-2006, 01:56 PM
(I love print debug in MAXScript...:)).
espece de maso! :)
ypuech
12-20-2006, 02:13 PM
espece de maso!
Yes :), but print is better than MAXScript debugger that does nothing interesting!
example:
-- Error occurred in switchSemaphore(); filename: E:\Car Trace\ct9.ms; position: 4416
is there any way mark this line in my script?
manualy is not mutch easy to find it :D
Press Ctrl+J and enter the number there.
This was added to Max 8 but was undocumented until Max 9 because nobody told me ;)
MerlinEl
12-20-2006, 03:17 PM
nop!
In "Controlling the Listener Contents" I find only how manipulate him self ,
nothing about selecting text in script window.
like this screenshot:
http://mithrillgate.server3000.net/micra/tools/ScreenShotMarkText.JPG
but mabe is not posible to do it.. anyway thanks for help Yannick ;)
MerlinEl
12-20-2006, 03:22 PM
This is it! Thanks bobo :thumbsup:
ypuech
12-20-2006, 03:38 PM
Hi,
Rene, excuse me for the confusion.
Thanks for the tip Bobo :thumbsup:, very useful this one :).
CGTalk Moderation
12-20-2006, 03:38 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.