AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

v1.0.31 released: Functions (parameters and return values)
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Announcements
View previous topic :: View next topic  
Author Message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10450

PostPosted: Fri Apr 08, 2005 9:20 pm    Post subject: v1.0.31 released: Functions (parameters and return values) Reply with quote

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
View user's profile Send private message Send e-mail
jonny



Joined: 13 Nov 2004
Posts: 3005
Location: Minnesota

PostPosted: Fri Apr 08, 2005 9:44 pm    Post subject: Reply with quote

YES!!!!!!!

('nuff said)
Back to top
View user's profile Send private message
corrupt



Joined: 29 Dec 2004
Posts: 2328

PostPosted: Sat Apr 09, 2005 7:46 am    Post subject: Reply with quote

WooHoo!! Thanks Chris Smile .
Back to top
View user's profile Send private message Visit poster's website
Rajat



Joined: 28 Mar 2004
Posts: 1715

PostPosted: Sat Apr 09, 2005 12:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10450

PostPosted: Sat Apr 09, 2005 12:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Jon



Joined: 28 Apr 2004
Posts: 373

PostPosted: Sat Apr 09, 2005 1:10 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
CarlosTheTackle



Joined: 19 Oct 2004
Posts: 102

PostPosted: Sun Apr 10, 2005 3:44 am    Post subject: Reply with quote

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
View user's profile Send private message
dijiyd



Joined: 01 Apr 2004
Posts: 90
Location: Philippines

PostPosted: Sun Apr 10, 2005 4:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Nemroth



Joined: 07 Sep 2004
Posts: 262
Location: France

PostPosted: Sun Apr 10, 2005 12:12 pm    Post subject: Reply with quote

Wahooou !! The features are great !!! It's a major release.
Congratulations, and thanks a lot !!!
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10450

PostPosted: Sun Apr 10, 2005 3:21 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
niwi



Joined: 27 Feb 2005
Posts: 128
Location: Heidelberg, Germany

PostPosted: Sun Apr 10, 2005 7:21 pm    Post subject: Reply with quote

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... Wink

Chris, you are the man... Razz

NiWi.
Back to top
View user's profile Send private message
deguix



Joined: 26 Aug 2004
Posts: 72
Location: Everett - MA, USA

PostPosted: Mon Apr 11, 2005 12:56 am    Post subject: Reply with quote

Functions make scripting a lot easier! Thanks!

I'm going to update some of my scripts this week... Very Happy
_________________
Working now on:
NSIS Wiki (NSIS)
Back to top
View user's profile Send private message
Titan



Joined: 11 Aug 2004
Posts: 5007
Location: imaginationland

PostPosted: Mon Apr 11, 2005 2:23 am    Post subject: Reply with quote

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 Razz).
_________________

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
View user's profile Send private message Visit poster's website
jonny



Joined: 13 Nov 2004
Posts: 3005
Location: Minnesota

PostPosted: Mon Apr 11, 2005 4:14 am    Post subject: Reply with quote

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 Razz).


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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10450

PostPosted: Mon Apr 11, 2005 1:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Announcements All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group