Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

v1.0.31 released: Functions (parameters and return values)


  • Please log in to reply
31 replies to this topic
Nemroth
  • Members
  • 278 posts
  • Last active: Dec 31 2011 10:53 PM
  • Joined: 07 Sep 2004
I know it's in the planned features, but I think that with the functions and local/global variables (witch are a major ehancement), a good thing would be the Select ... Case structure to make AHK a near structured scripting language.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
You probably know about "else if" already. In addition, the use of "in" can help simplify a lot of otherwise complex case ladders:

if color in purple,blue
....
else if color in black,gray,silver
...
else if color in red,yellow,orange
...
else ; This corresponds to the "default" or "otherwise" case.
...

I look at the above and see that although a case/switch construct would make it look a little neater, the benefit seems fairly low compared to some of the other things planned on the to-do list.

I do want to do it someday, it just seems like other things, such as more GUI control types, the ability to call DLLs, etc. seem more important. Contrary opinions are welcome.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.31.01:

Fixed sub-expressions in function parameters yielding incorrect result; e.g. Add(2*3,3). [thanks Lazlo]

Fixed open-parenthesis being seen as a syntax error if used after a command that lacks a first comma; e.g. MsgBox (). [thanks Laszlo]

http://www.autohotkey.com/download/

Nemroth
  • Members
  • 278 posts
  • Last active: Dec 31 2011 10:53 PM
  • Joined: 07 Sep 2004

You probably know about "else if" already. In addition, the use of "in" can help simplify a lot of otherwise complex case ladders


That's true... I must say I can't do anything else than to be agree with that, about witch I didn't think about !!! But I think the the Select ... case is more concise and more readable.

if color in purple,blue
....
else if color in black,gray,silver
...
else if color in red,yellow,orange
...
else ; This corresponds to the "default" or "otherwise" case.
...

becomes

Select color
case purple,blue
....
case black,gray,silver
...
case red,yellow,orange
...
default 
...

Thanks again for this major release.

toralf
  • Moderators
  • 4035 posts
  • Last active: Aug 20 2014 04:23 PM
  • Joined: 31 Jan 2005
I'm tying to download the v1.0.31.01. But when I install it, it says it is the v1.0.31.00 installer.
- Is this a problem of my internet connection cache?
- is it just a wrong number in the installer?
- is the download site not updated?

Does anyone have the same problem?
Ciao
toralf
 
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012

I'm tying to download the v1.0.31.01. But when I install it, it says it is the v1.0.31.00 installer.

I got the right installer, v1.0.31.01, so it may be your cashe.
> CCleaner: useful prog.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


niwi
  • Members
  • 140 posts
  • Last active: Feb 04 2013 02:51 PM
  • Joined: 27 Feb 2005
Hi,

I'm tying to download the v1.0.31.01.

I've got .01, too.

NiWi.

toralf
  • Moderators
  • 4035 posts
  • Last active: Aug 20 2014 04:23 PM
  • Joined: 31 Jan 2005
It must be due to the proxies we use at work. At home everything is fine. Thanks for the feedback.
Ciao
toralf
 
I use the latest AHK version (1.1.15+)
Please ask questions in forum on ahkscript.org. Why?
For online reference please use these Docs.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.31.02:

Fixed the Clipboard variable to avoid producing an error when a set of zero files was copied onto the clipboard. [thanks Serenity & Tekl]

Fixed GuiDropFiles and "Gui +/-Options" so that they don't remove window transparency and other effects. [thanks toralf]

Jerry
  • Members
  • 39 posts
  • Last active: Jun 05 2007 05:39 PM
  • Joined: 24 Jun 2004
Chris,
Just a little thing.
I just downloaded 1.0.31.02 and noticed that the help "recent changes" was not changed to reflect the changes.


Jerry

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Thanks for pointing out that oversight. I would never have noticed otherwise.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.31.03:

Fixed ImageSearch so that partial matches at the edges of the search region are not considered complete matches. [thanks Invalid User]

Fixed the inability of labels to contain parentheses, a bug introduced in v1.0.31. [thanks Jon]

http://www.autohotkey.com/download/

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
v1.0.31.04 contains only a single change:

Fixed various ways in which lines were being falsely detected as function calls. [thanks Payam & Jon]

http://www.autohotkey.com/download/

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Here are the changes for v1.0.31.05:

Fixed A_Index, A_LoopFileName, and similar variables when used in more than one parameter of a command that calls functions. In addition, a function may now access the caller's contents of these variables. [thanks corrupt]

Fixed inaccurate line numbers of function calls. This affects A_LineNumber, ListLines, and error dialogs. [thanks Lazlo]

http://www.autohotkey.com/download/

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
v1.0.31.06 contains only a single change:

ImageSearch is now much more useful: 1) Icons are supported (even ones containing transparent sections); 2) PNG, TIF, ICO, and other image formats are supported; 3) Approximate images may be found by allowing the image's colors to vary by a specified amount; 4) Matching is a little more lenient because the mystery-byte of each pixel color is ignored. [thanks Aurelian Maga]

http://www.autohotkey.com/download/