Jump to content

Recommended Posts

  • Replies 182
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

What the hell is all this non-sense about? ConsoleWrite("AutoIt version: " & @AutoItVersion & @CRLF) Local Writer = ConsoleWrite Writer("What the hell, this works?" & @CRLF) Writer = M

Yes, I intend to release a fully broken beta. /facepalm

Special Note: This is an alpha release. No installer is provided for this release, only the stand-alone SFX archive. This alpha release contains a couple major changes to the language which can radi

We have already discussed unreachable functions. The code should throw an error message but she may not have that error message implemented yet. This should not be possible:

Func MyUDF()
EndFunc

Global MyUDF = "anything"   ; Syntax error

That is supposed to generate an error with a message along the lines, "Unable to reassign function". This will be possible only due to scoping rules:

Func MyUDF()
    ConsoleWrite("MyUDF()" & @CRLF)
EndFunc

Func AnotherUDF()
    Local MyUDF = MyUDF
    MyUDF()
    MyUDF = ""
    ; Can no longer call MyUDF() from this scope
EndFunc

AnotherUDF()
MyUDF()
Link to post
Share on other sites

I've just uploaded a new alpha version. I also uploaded the current documentation source.

3.3.9.5 complete changelog:

AutoIt:

- Added: Empty arrays.

- Added: Functions are now first class objects which means variables can "point" to them and the function can be called through the variable.

- Added: The $ prefix for variables is now optional and can be omitted entirely.

- Added: Built-in functions that take a callback now be passed directly in addition to the old method of passing as a string. Built-in functions can also be passed now (be careful that the function you pass matches what the caller expects).

- Added: C++ style ternary operators: Local bResult = ("foo" = "bar") ? True : False

- Fixed: Redim allows initialization to non-array.

- Fixed #2166: StringToASCIIArray() and StringFromASCIIArray() did not correctly return an empty string when the start index is greater than the end index.

- Fixed #1901: 32-bit compiled scripts now work from the system32 directory on 64-bit Windows.

- Changed: Optional square brackets for array declaration with initialization.

Au3Check:

- Changed: Optional square brackets for array declaration with initialization.

There are a couple things I forgot to document on trancexx's behalf. There should now be an error when you attempt to re-assign a function name (the error message will change):

Func MyUDF()
EndFunc

Global MyUDF = "anything"

There's also a new feature that is not ready for use and thus is not documented. Some of the MVPs may have noticed it get added but it should not be used until you see it in the documentation. It is subject to change so keep that in mind if you stumble across it.

Link to post
Share on other sites

Number() (3.3.8.1)(3.3.9.4)

Not sure if this is something that already passed by somewhere else (a long time ago) ... but

Number(Bool, or 'Default') = Double(type) ... Double type output, instead of int(32/64), being intentional?

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to post
Share on other sites

... I could if I would ...

So is that a bonded 'Yes', or a tight up 'No'.

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to post
Share on other sites

Just a quick question:

How does this new version of AutoIT distinguish between variables and other words/identifiers now that the '$' is optional? does it just look it up in a table of keywords?

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Link to post
Share on other sites

Just a quick question:

How does this new version of AutoIT distinguish between variables and other words/identifiers now that the '$' is optional? does it just look it up in a table of keywords?

AutoIt searches in its tables for the name. The order should be this:

Assigning a variable: keywords (error if name exists), functions (error if name exists), variables

Using a variable/keyword: keywords, variables, functions

Calling a function: variables (error if found, but no function reference), functions

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to post
Share on other sites

What's the rationale for making VarGetType(1 = 1) etc. a Real and not Int?

It has unexpected consequences (well, in pathalogical uses the help file warns against):

ConsoleWrite(VarGetType(0 + (1=1)) & @LF)
ConsoleWrite(100000000000000 + (1=1) & @LF)
ConsoleWrite(1000000000000000 + (1=1) & @LF)
ConsoleWrite((10000000000000000 = 10000000000000000 + (1=1)) & @LF)

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to post
Share on other sites

Why do you care how it does it as long as it works?

I am building systems that mirror the behaviour of the Autoit interpreter. It is easier for me to implement new behaviour if I have some little idea of what goes on under the bonnet.

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...