detect "line number" for error code

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Snickers76
Newbie
Posts: 12
Joined: Mon Mar 10, 2008 6:26 pm

detect "line number" for error code

Post by Snickers76 » Fri Mar 14, 2008 1:52 pm

Is there a function that can detect the current line of code so that I can output it into an error log?

For example

[code]
Let>k=%k%+1
ScreenCapture>X,Y,x,y,C:\whatever\%k%.bmp
WriteLn>Error found in Line %detectCurrentLineNumber% refer to %k%.bmp
[/code]

I have been manually inserting the corresponding line number; however, if I add code above it, naturally, it will change the line number. I of course forget to manually change that number and my error log is all jacked up.

User avatar
Marcus Tettmar
Site Admin
Posts: 7391
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Mar 14, 2008 3:45 pm

No don't think so, but it's such a sensible idea I wonder why it hasn't come up before. I'll add this to the list.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts