Jump to content

Au3Check.exe


tylo
 Share

Recommended Posts

Thanks, Valik

Here's another update v1.28

- fixed: COM methods/attribs couldn't have keyword names.

- fixed: Enums wasn't set const.

.. And yet another v1.29 :)

- fixed: a single variable on a line was accepted.

Ok. That's it for now....

(Attachments removed - see next post).

Edited by tylo

blub

Link to comment
Share on other sites

Au3Check v1.30

- added: check functions given in GUICtrlSetOnEvent, AdlibEnable, OnExitFunc.

/Add: Ups. I forgot a few event setting functions. Will update.

Edited by tylo

blub

Link to comment
Share on other sites

Ok,

1.31 : fixed: made a generic way in the .dat file to check UDF refs in SetOnEvent type functions.

I updated the included .dat with the new feature, and added a few missing tray functions:

%AdlibEnable 1 <UDF>

%Call 1 <UDF>

%GUICtrlSetOnEvent 2 <UDF>

%GUISetOnEvent 2 <UDF>

%TraySetItemOnEvent 2 <UDF>

%TraySetOnEvent 2 <UDF>

!TraySetItemOnEvent 2 2

!TraySetOnEvent 2 2

Edited by tylo

blub

Link to comment
Share on other sites

Ok,

1.31 : fixed: made a generic way in the .dat file to check UDF refs in SetOnEvent type functions.

I updated the included .dat with the new feature, and added a few missing tray functions:

%AdlibEnable 1 <UDF>

%Call 1 <UDF>

%GUICtrlSetOnEvent 2 <UDF>

%GUISetOnEvent 2 <UDF>

%TraySetItemOnEvent 2 <UDF>

%TraySetOnEvent 2 <UDF>

!TraySetItemOnEvent 2 2

!TraySetOnEvent 2 2

<{POST_SNAPBACK}>

Au3Check for beta, too...Very good.

Thanks, tylo. :)

Link to comment
Share on other sites

v1.32

- Fixed a small issue with line continuation within strings: whitespaces after the _ was not accepted. Thanks MHz for reporting that.

/add: reuploaded with improved error message. No functional change.

Edited by tylo

blub

Link to comment
Share on other sites

As, always with new features, a few things were overlooked. :)

- 1.34 : improved checking on assignment with new operators and COM objects.

(will reupload in a while with a fix)

Edited by tylo

blub

Link to comment
Share on other sites

As, always with new features, a few things were overlooked. :whistle:

- 1.34 : improved checking on assignment with new operators and COM objects.

(will reupload in a while with a fix)

<{POST_SNAPBACK}>

tylo,

One more COM-thingy: AU3Check V1.34 does currenty not accept the line format:

$Variable=$COMVariable(<expression>)

For example, it fails in my Scriptomatic.au3 on the line:

$strDict[$i][$dictItem] = String($objDict($objKey))

Regards,

-Sven

Link to comment
Share on other sites

Thanks Sven. v1.35 fixes this. In addition, you will get warning on variables that are declared global in functions only. It is prefered to declared all globals on top of file.

Edited by tylo

blub

Link to comment
Share on other sites

Thanks Sven. v1.35 fixes this. In addition, you will get warning on variables that are declared global in functions only. It is prefered to declared all globals on top of file.

<{POST_SNAPBACK}>

Hello Tylo,

Thanks for the quick fix....and I have again another for you.

Au3Check does not seem to like the line:

$bHasDates = false ; Flag: output has date fields

Very strange, because you incorporated the true/false keywords in version 1.33

Regards,

-Sven

Link to comment
Share on other sites

Hello Tylo,

Thanks for the quick fix....and I have again another for you.

Au3Check does not seem to like the line:

$bHasDates = false  ; Flag: output has date fields

Very strange, because you incorporated the true/false keywords in version 1.33

Regards,

-Sven

<{POST_SNAPBACK}>

Hm. I don't think it is true/false which is the problem, because they should work fine in 1.35, but I need to see the error message you get.

Btw: Are any of the following lines allowed? In that case I need to update...

1) $var().func() ; Call a COM func.

2) $var().prop = 1 ; Modify a COM property

3) $var().value() = 1 ; This shouldn't be allowed, right ?

4) $var.value() = 1 ; Neither should this ?

Edited by tylo

blub

Link to comment
Share on other sites

Tylo,

My apologies. My eyes were not functioning properly when I saw the error message.

The error came NOT from Au3Check. Somehow during the installation of SciTE it used an older AutoIt.exe version to execute the script.

>"C:\Program Files\AutoIt3\SciTe\CompileAU3\CompileAU3.exe" /run /ErrorStdOut /in "C:\Documents and Settings\sven\Desktop\Scriptomatic.au3"   

>Running AU3Check...

>AU3Check Ended.

>Running: C:\PROGRA~1\AutoIt3\AUTOIT~1.ORG /ErrorStdOut  "C:\Documents and Settings\sven\Desktop\Scriptomatic.au3"   

C:\Documents and Settings\sven\Desktop\Scriptomatic.au3 (323) : ==> Unknown function name.:

$bHasDates = false  ; Flag: output has date fields

$bHasDates = ^ ERROR

So that was no problem at all.

About the COM Syntax: I haven't found examples yet for number 3 and 4, but they should all be allowed.

Everything in front of the '=' sign can be a mix of COM-properties or COM-method (aka Functions). So you could get very complex lines like:

$oWorksheets("Sheet1").Range("a1:g1").Borders.Item($xlEdgeBottom).LineStyle = $xlDouble

(Hint for future AutoIt-COM users: Use the WITH-statement to prevent such long lines :-] )

Examples for the first two:

1) $var().func() ; Call a COM func.

$oRange = $Worksheets("Sheet1").Range("a1:g1")

2) $var().prop = 1 ; Modify a COM property

$Worksheets(1).Visible = False

3) $var().value() = 1 ; This shouldn't be allowed, right ?

who knows an example?

4) $var.value() = 1 ; Neither should this ?

who knows an example?

Regards,

-Sven

Link to comment
Share on other sites

v1.39

I cleaned up some small errs I made in previous versions, plus added an extra tests on enums. Updated .dat file, and included an updated TextPad .syn file.

I may take a break on this for a while now. :)

blub

Link to comment
Share on other sites

v1.39

I cleaned up some small errs I made in previous versions, plus added an extra tests on enums. Updated .dat file, and included an updated TextPad .syn file.

I may take a break on this for a while now.  :)

<{POST_SNAPBACK}>

I agree with the break if you swith to Bool functions :D
Link to comment
Share on other sites

Not sure if this intended or a bug in Au3Check.

The following code:

#include <GuiListView.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("MyGUI", 392, 322,(@DesktopWidth-392)/2, (@DesktopHeight-322)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)


GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;
    EndSelect
WEnd
Exit

produces the following error

C:\Documents and Settings\Gary\My Documents\Projects\_GUICtrlListBoxClear.au3(3,79) : ERROR: $WS_CLIPSIBLINGS previously declared as a 'Const'
If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Gary\My Documents\Projects\_GUICtrlListBoxClear.au3 - 1 error(s), 0 warning(s)

I would think that if we are asking if it is declared not to declare it, and if it isn't then do so, should not be an error if it is already declared.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

Keep in mind that Au3Check is a syntax checker, not an interpreter. If you don't wish to obey proper syntax and want to use questionable code like that, then don't run the syntax checker. Or, as Larry says:

Patient: Doctor, it hurts when I do that.

Doctor: Don't do that.

There are at least 3 alternate ways to get around that error.
  • The correct way.
    #include <GUIConstants.au3>
    Since that is a standard include, any properly configured AutoIt installation will find it.
  • This will pass syntax checking but is ugly:
    Global $_WS_CLIPSIBLINGS = 0x04000000
    If IsDeclared("WS_CLIPSIBLINGS") Then $_WS_CLIPSIBLINGS = $WS_CLIPSIBLINGS
  • This method may generate a "variable used but not declared error" in some situations:
    If Not IsDeclared("WS_CLIPSIBLINGS") Then Assign("WS_CLIPSIBLINGS", 0x04000000, 2)
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...