Jump to content

Scite adds filepath information to script


rmckay
 Share

Recommended Posts

Hello,

I've added ConsoleWrite lines to functions I've created.  The format for the ConsolWrite statements is (@CRLF & $sPath  &  '('  &  @ScriptLineNumber  &  ') : *** Func _ABC() ***: '  &  @crlf ).  $sPath  is defined as the filepath to the file containing the function - Local $sPath = "C:\Users\Owner\Documents\AutoIt\NT8 Download Replay Data\DownloadReplayFunctions02.au3" 

Local $sPath = "C:\Users\Owner\Documents\AutoIt\NT8 Download Replay Data\DownloadReplayFunctions02.au3"
    ConsoleWrite(@CRLF & $sPath  &  '('  &  @ScriptLineNumber  &  ') : *** Func _oMenuItemHistoricalData() ***: '  &  @crlf )

The result is that I can access the functions from the Scite output window when the function is located in another file which is included in the main file.  For some reason Scite adds a line to the code when I switch to the Include file from the output window.

974445229_ScreenshotofConsoleWriteStatement.thumb.png.37b567d5370af78f03acf8204cd25749.png

Why does the line get added to the script and can I stop if from appearing?

Thanks,

Link to comment
Share on other sites

  • Developers
47 minutes ago, rmckay said:

Why does the line get added to the script and can I stop if from appearing?

This is because The SciTE error lexer thinks that this SciTEoutput line  is and error and will show them as such with with inline errors enabled.

Jos

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

  • Developers
19 minutes ago, rmckay said:

Can I enable/disable the "inline errors

Sometimes I wonder why I made the helpfile... ;) :

Quote
error.inline
style.error.0
style.error.1
style.error.2
style.error.3
To see error messages interspersed with the source code, set error.inline=1.
Different visual styles are used for different severities: style.error.0 is the default; style.error.1 for warnings; style.error.2 for errors; and style.error.3 for fatal errors. The severity of a message is inferred from finding the text "warning", "error", or "fatal" in the message.

.. but first things first: when I run the provided example, I do not get the line added, only when clicking it, it will jump to it and put a yellow maker in front.
Do you see the same with that example:

Local $sPath = "C:\Users\Owner\Documents\AutoIt\NT8 Download Replay Data\DownloadReplayFunctions02.au3"
ConsoleWrite(@CRLF & $sPath  &  '('  &  @ScriptLineNumber  &  ') : *** Func _oMenuItemHistoricalData() ***: '  &  @crlf )

As far as I remember it will only add these inline error markers for lines that contain " : error:" or ": warning:".

Jos

Edited by Jos

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

35 minutes ago, Jos said:

I wonder why I made the helpfile...

If it's any consolation, at the other end of the spectrum are freaks like myself, who tend to (speed)read an entire Help file to get a sense of the scope, modus operandi, and perhaps unsuspected capabilities of a particular piece of software. Having written large Help files myself (and even recorded a series of tutorial videos once), I do commiserate though.:D Perhaps you can glean some comfort from the fact that your digital footprint will probably outlast any physical one you leave on this Earth...;)

Link to comment
Share on other sites

@Jos 

Your help files are great. I can't believe the effort you've put in to create them.  Thanks for all the hard work.  The problem is that I wasn't smart enough to do a search for the right topic🤥

21 hours ago, Jos said:

I do not get the line added, only when clicking it, it will jump to it and put a yellow maker in front.

Yes, I get the same result.  If I start the main script and the open the #include file with the functions the error doesn't show and there's no yellow marker.  When I click on the link the yellow marker appears and all of the functions with a link have an error line appear.

Thanks

@RTFC

I thought I went through all of the help topics but I only vaguely remember even seeing the error line subject, let alone any details.  I think my focus need to be fixed😉

Thanks 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...