Sign in to follow this  
Followers 0
junkew

scripting/compiler directive

2 posts in this topic

Can I put code in thats syntax checked only if its the right version. More or less some kind of a scripting/compiler directive

; Needs latest beta v3.2.11.5 (beta) for optimal results

if @AutoItVersion = "3.2.11.5" Then

$iPos = StringInStr($BMP1Data, $searchFor, 2, 1, $iPos+1)

Else

$iPos = StringInStr($BMP1Data, $searchFor)

end if

AU3Check gives now errors where I would like to see warnings or nothing at all when I do not run this in version 3.2.11.5 (I can offcourse press the button continue anyway but is there another way)

Share this post


Link to post
Share on other sites



I would change the flag within Au3Check.dat for the earlier version of AutoIt.

1. Go to your AutoIt3 folder and open Au3Check.dat with a text editor.

2. Search for the line below.

!StringInStr 2 4

3. Change the line as below.

!StringInStr 2 6

4. Save the file and Au3Check should not complain anymore hopefully.

If you do the above, then make sure you do not use more then 4 parameters for StringInStr() in any of your 3.2.10.0 or earlier scripts without conditional version check because Au3Check will no longer warn you of your mistake (but AutoIt may when you run it).

:)

Share this post


Link to post
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
Sign in to follow this  
Followers 0