Jump to content

Syntax check: scite lite VS Scite full


t0nZ
 Share

Recommended Posts

Hi to all, this my first post, but i used autoit from 2004, and i have readed so many post ...

I have used scite lite for all my projects, and I liked to use external tools like Koda outside the editor.

Now I'am working on a interesting script, and I just have start using Scite Full.

Question: why the syntax check reports a lot more warnings (es. undeclared variables) ?

How to configure the syntax check ?

Thanks in advance.

Link to comment
Share on other sites

  • Developers

Hi to all, this my first post, but i used autoit from 2004, and i have readed so many post ...

I have used scite lite for all my projects, and I liked to use external tools like Koda outside the editor.

Now I'am working on a interesting script, and I just have start using Scite Full.

Question: why the syntax check reports a lot more warnings (es. undeclared variables) ?

How to configure the syntax check ?

Thanks in advance.

This warning normally means that the script is coded "badly" or you are really missing variables.

Maybe you could show an "small"example were you get this au3chek warning so we can see what is happening.

You could ofcourse just not run au3check but I prefer that it tell me the mistakes I made.

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

This warning normally means that the script is coded "badly" or you are really missing variables.

Maybe you could show an "small"example were you get this au3chek warning so we can see what is happening.

You could ofcourse just not run au3check but I prefer that it tell me the mistakes I made.

Really I know my code is coded "badly" and I want to clean my code from warnings in the final versions of my works.

But now my exact question is: So Scite lite don't use aucheck, but an embedded syntax checker less precise ???

Bytheway I show you an example of the warnings that scite lite don't show:

"

>"C:\Programmi\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /AU3Check /in "C:\Programmi\AutoIt3\Examples\NSC_test\CPA_da.au3"

+>13:39:20 Starting AutoIt3Wrapper v.1.10.1.14 Environment(Language:0410 Keyboard:00000410 OS:WIN_XP/Service Pack 3 CPU:X86 ANSI)

>Running AU3Check (1.54.13.0) params:-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 from:C:\Programmi\AutoIt3

C:\Programmi\AutoIt3\Examples\NSC_test\CPA_da.au3(13,7) : WARNING: 'Local' specifier in global scope.

Local $DIRSIZETOT

~~~~~~^

C:\Programmi\AutoIt3\Examples\NSC_test\CPA_da.au3(21,52) : WARNING: $mainwindow possibly not declared/created yet

$mainwindow = GUICreate("CPA_da", 600, 600, 200, 5)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

"

Link to comment
Share on other sites

  • Developers

Really I know my code is coded "badly" and I want to clean my code from warnings in the final versions of my works.

But now my exact question is: So Scite lite don't use aucheck, but an embedded syntax checker less precise ???

Bytheway I show you an example of the warnings that scite lite don't show:

"

>"C:\Programmi\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /AU3Check /in "C:\Programmi\AutoIt3\Examples\NSC_test\CPA_da.au3"

+>13:39:20 Starting AutoIt3Wrapper v.1.10.1.14 Environment(Language:0410 Keyboard:00000410 OS:WIN_XP/Service Pack 3 CPU:X86 ANSI)

>Running AU3Check (1.54.13.0) params:-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 from:C:\Programmi\AutoIt3

C:\Programmi\AutoIt3\Examples\NSC_test\CPA_da.au3(13,7) : WARNING: 'Local' specifier in global scope.

Local $DIRSIZETOT

~~~~~~^

C:\Programmi\AutoIt3\Examples\NSC_test\CPA_da.au3(21,52) : WARNING: $mainwindow possibly not declared/created yet

$mainwindow = GUICreate("CPA_da", 600, 600, 200, 5)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

"

The internal (AutoIt3) lexer doesn't do more than lexer for valid lines but only reports errors when they are encountered. Au3check is trying to interpret the script and reports on (possible) issues like using a variable before it has seen it declared. The first warning just tells you that you have a "Local" statement in the main part of your script which implies that the variable is Global and not local.

by the way: where have you defined these parameters: params:-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 as this tells au3check to report all possible issues?

Possibly you have this in your script:

#AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6

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

The internal (AutoIt3) lexer doesn't do more than lexer for valid lines but only reports errors when they are encountered. Au3check is trying to interpret the script and reports on (possible) issues like using a variable before it has seen it declared. The first warning just tells you that you have a "Local" statement in the main part of your script which implies that the variable is Global and not local.

by the way: where have you defined these parameters: params:-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 as this tells au3check to report all possible issues?

Possibly you have this in your script:

#AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6

Jos

Yes ! I have exactly that line, and seems Scite lite ignored it, and this fine to me.

Now I proceed with Scite full, and with more polished code :)

And I want to check the meaning of these params.

Thank you

Link to comment
Share on other sites

  • Developers

Yes ! I have exactly that line, and seems Scite lite ignored it, and this fine to me.

Now I proceed with Scite full, and with more polished code :)

And I want to check the meaning of these params.

Thank you

Just so you understand:

The SciTE4Autoit3 (lite) that comes with the AutoIt3 installer, will run AutoIt3.exe directly when you press F5 and thus totally ignores any Directive it doesn't recognise.

The SciTE version that comes with the SciTE4AutoIt3 installler is configured to run AutoIt3Wrapper.exe which gives you all the extra options and uses the Directives that start with "#AutoIt3Wrapper_".

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...