| View previous topic :: View next topic |
| Author |
Message |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10450
|
Posted: Fri Apr 08, 2005 9:20 pm Post subject: v1.0.31 released: Functions (parameters and return values) |
|
|
Although this release has been extensively tested, quite a few low-level changes were made. It is recommended that mission-critical scripts be re-tested -- or that you wait two weeks for any bugs to get fixed -- prior to adopting this version.
Here are the changes for v1.0.31:
Fixed the inability of a timer to reset itself. For example, if "SetTimer, MyTimer" is done within the MyTimer subroutine, the timer will begin waiting for an entirely new interval to expire before running again.
Fixed syntax checker reporting parentheses inside of quoted strings as unbalanced.
Fixed GuiControl to be able to change the ReadOnly attribute of an Edit control. [thanks Bahri]
Changed expressions so that references to invalid dynamic variables such as Array%VarContainingSpaces% produces a runtime warning.
Lowered the precedence of string concatenation in expressions. Although this is unlikely to affect any scripts, if you have any doubt please consult the operator precedence table.
Improved string concatenation in expressions to work on anything (e.g. arrays and sub-expressions). In addition, a period can be used as a concatenation operator to improve readability.
Dynamic variables such as Array%i% are up to 1000 times faster. A script may now have several million variables without a large slow-down. [thanks Lazlo]
Improved the performance of GuiControl and GuiControlGet when used on a window that has hundreds of controls.
Expressions that use a lot of ANDs and ORs are faster due to short-circuit boolean evaluation.
Improved memory conservation in scripts that use thousands of variables by adding two new variable capacities: 1 and 6. Formerly, the smallest capacity other than zero was 63.
Added built-in variables A_LineNumber and A_LineFile, which contain the currently executing line number and the file name to which it belongs. [thanks toralf]
Added directive #ClipboardTimeout, which changes how long the script persists in trying to open the clipboard (default 1000 ms). [thanks Tekl & Jason Payam Ahdoot]
Added the ability to pass parameters and receive return values from functions. Functions also support local variables. In addition, ListVars can show the contents of local variables to help debugging. See functions for details.
http://www.autohotkey.com/download/ |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3005 Location: Minnesota
|
Posted: Fri Apr 08, 2005 9:44 pm Post subject: |
|
|
YES!!!!!!!
('nuff said) |
|
| Back to top |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2328
|
Posted: Sat Apr 09, 2005 7:46 am Post subject: |
|
|
WooHoo!! Thanks Chris . |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1715
|
Posted: Sat Apr 09, 2005 12:30 pm Post subject: |
|
|
That function parameter feature must've taken lot of time... no wonder it took you so long to release this one. Thanx Chris, and congratulations on another fine release! _________________
 |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10450
|
Posted: Sat Apr 09, 2005 12:54 pm Post subject: |
|
|
| Yes, a lot of code was added this time. The disadvantage of this is that compiled scripts will all probably be about 6 KB larger than they were before. |
|
| Back to top |
|
 |
Jon
Joined: 28 Apr 2004 Posts: 373
|
Posted: Sat Apr 09, 2005 1:10 pm Post subject: |
|
|
| That's brilliant. Thanks for all the work you've put into this version Chris. I've got a few scripts I'd like to re-write with functions to make the code neater and easier to update. |
|
| Back to top |
|
 |
CarlosTheTackle
Joined: 19 Oct 2004 Posts: 102
|
Posted: Sun Apr 10, 2005 3:44 am Post subject: |
|
|
I guess now we could do with a 'Functions repository' here on the forum to share functions. Chances are someone's already done a similar function to the one you need, so why re-invent the wheel.
I'll get the ball rolling by re-writing my 'Convert YYYYMMDDHHMMSS to Unix Epoch time' code as a function. |
|
| Back to top |
|
 |
dijiyd
Joined: 01 Apr 2004 Posts: 90 Location: Philippines
|
Posted: Sun Apr 10, 2005 4:13 am Post subject: |
|
|
Has probably been said many times before, but: Woohooo!!!! and Yeeaaaaaah!!!
Thanks Chris, must'ave been very hard adding new features and yet, still keep backwards-compatibility.
It'll probably be much easier to integrate scripts from now on, I mean, no more naming conflicts. Much. |
|
| Back to top |
|
 |
Nemroth
Joined: 07 Sep 2004 Posts: 262 Location: France
|
Posted: Sun Apr 10, 2005 12:12 pm Post subject: |
|
|
Wahooou !! The features are great !!! It's a major release.
Congratulations, and thanks a lot !!! |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10450
|
Posted: Sun Apr 10, 2005 3:21 pm Post subject: |
|
|
| CarlosTheTackle wrote: | | I guess now we could do with a 'Functions repository' here on the forum to share functions. | Good idea. I'll rename the Scripts forum to indicate that functions should also be posted there. |
|
| Back to top |
|
 |
niwi
Joined: 27 Feb 2005 Posts: 128 Location: Heidelberg, Germany
|
Posted: Sun Apr 10, 2005 7:21 pm Post subject: |
|
|
Hi Chris,
the arrays are processed really faster than in the earlier version. Thanks.
But the function-feature: now I have to redesign my big script on which I'm working...
Chris, you are the man...
NiWi. |
|
| Back to top |
|
 |
deguix
Joined: 26 Aug 2004 Posts: 72 Location: Everett - MA, USA
|
Posted: Mon Apr 11, 2005 12:56 am Post subject: |
|
|
Functions make scripting a lot easier! Thanks!
I'm going to update some of my scripts this week...  _________________ Working now on:
NSIS Wiki (NSIS) |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5007 Location: imaginationland
|
Posted: Mon Apr 11, 2005 2:23 am Post subject: |
|
|
Awesome!
What can we expect to get more of in built-in functions in future next releases? -It's really useful and might change how everybody scripts (v2 ). _________________
RegExReplace("irc.freenode.net/autohotkey", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2") |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3005 Location: Minnesota
|
Posted: Mon Apr 11, 2005 4:14 am Post subject: |
|
|
| Titan wrote: | Awesome!
What can we expect to get more of in built-in functions in future next releases? -It's really useful and might change how everybody scripts (v2 ). |
I think to have an AutoHotkey 2.0 would mean a revolutionary change that throws off the burden of backwards compatibilty. One thing I've always thought would be great is different "wrappers," different syntax sets that could suit different needs. Of course, that would take forever, and there might be more unforeseen improvements. We'll just have to wait and see. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10450
|
Posted: Mon Apr 11, 2005 1:16 pm Post subject: |
|
|
| Titan wrote: | | What can we expect to get more of in built-in functions in future next releases? | Certainly. If there's a way to do it without bloating the code, there should eventually be a function equivalent for every command that accepts an output variable. |
|
| Back to top |
|
 |
|