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.46 released: SubStr() and more expression operators
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Announcements
View previous topic :: View next topic  
Author Message
SamuelPlentz



Joined: 26 Jul 2006
Posts: 8

PostPosted: Mon Dec 04, 2006 11:03 am    Post subject: Reply with quote

Goyyah wrote:
Code:
LV_ModifyCol(1,"60 Integer"), LV_ModifyCol(2,"60 Integer"), LV_ModifyCol(3,"36 Center")
LV_ModifyCol(4,"36 Integer"), LV_ModifyCol(4,"36 Center"),  LV_ModifyCol(6,"100")


There are 2 ModifyCols on column 4. One should be for column 5.
_________________
www.SamuelPlentz.de.vu
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 5721

PostPosted: Mon Dec 04, 2006 11:07 am    Post subject: Reply with quote

SamuelPlentz wrote:
There are 2 ModifyCols on column 4. One should be for column 5.


Thanks! Very Happy
_________________
SKAN - Suresh Kumar A N
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 5721

PostPosted: Tue Dec 05, 2006 5:55 pm    Post subject: Reply with quote

Dear Mr.Chris, Smile

I never knew about ternary operator before it was included in AHK. I find it very useful and convenient.

Many thanks. Smile
_________________
SKAN - Suresh Kumar A N
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Fri Dec 15, 2006 7:38 pm    Post subject: Reply with quote

NOTE: Although this release has been extensively tested, several low-level enhancements were made. If you have any mission-critical scripts, it is recommended that you retest them and/or wait a few weeks for any bugs to get fixed.

Here are the changes for v1.0.46.01:

Fixed comma-separated declaration initializers such as "local x = 1, y = 2" to work even when immediately below an if/else/loop statement.

Fixed comma-separated expressions so when the leftmost item is an assignment, it will occur before the others rather than after. [thanks Laszlo]

Changed and fixed function-calls so that any changes they make to dynamic variable names, environment variables, and built-in variables (such as Clipboard) are always visible to subsequent parts of the expression that called them.

Changed: When a multi-statement comma is followed immediately by a variable and an equal sign, that equal sign is automatically treated as a := assignment. For example, all of the following are assignments: x:=1, y=2, a=b=c

Changed comma-separated expressions to produce the following effects: 1) the leftmost /= operator becomes true divide rather than EnvDiv; 2) blank values are not treated as zero in math expressions (thus they yield blank results).

Improved the performance of expressions by 5 to 20% (depending on type).

Improved the new assignment operators such as .= to support the Clipboard variable (even in comma-separated expressions).

Improved the .= operator so that it doesn't require a space to its left.

Improved GUI controls to accept static variables as their associated variables (formerly only globals were allowed).

Added option HwndOutputVar to "Gui Add", which stores a control's HWND in OutputVar. [thanks Corrupt & Toralf]
Back to top
View user's profile Send private message Send e-mail
toralf



Joined: 31 Jan 2005
Posts: 3842
Location: Bremen, Germany

PostPosted: Sun Dec 17, 2006 10:51 pm    Post subject: Reply with quote

Thanks a lot for the HwndOutputVar. It will help me a lot.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sun Dec 17, 2006 11:21 pm    Post subject: Reply with quote

You're welcome.

In today's v1.0.46.02, environment variables have been fixed to work properly as input variables in various commands such as StringLen and StringReplace (broken by 1.0.44.14). [thanks Camarade_Tux]
Back to top
View user's profile Send private message Send e-mail
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Tue Dec 19, 2006 1:56 am    Post subject: Reply with quote

In today's v1.0.46.03, ListView's floating point sorting has been fixed to produce the correct ordering. [thanks oldbrother/Goyyah/Laszlo]
Back to top
View user's profile Send private message Send e-mail
SKAN



Joined: 26 Dec 2005
Posts: 5721

PostPosted: Tue Dec 19, 2006 8:27 am    Post subject: Reply with quote

Chris wrote:
ListView's floating point sorting has been fixed to produce the correct ordering.


Thanks for the wonderful support. Smile
_________________
SKAN - Suresh Kumar A N
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Fri Dec 22, 2006 10:30 am    Post subject: Reply with quote

Hi Skan (DeveloperFormerlyKnownAsGoyyah) Very Happy
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Tue Jan 02, 2007 1:16 pm    Post subject: Reply with quote

In v1.0.46.04, the inability to pass the result of an assignment (:=) to a ByRef parameter has been fixed. [thanks Titan]
Back to top
View user's profile Send private message Send e-mail
SKAN



Joined: 26 Dec 2005
Posts: 5721

PostPosted: Tue Jan 02, 2007 3:33 pm    Post subject: Reply with quote

Nice.. Thanks Mr.Chris. Smile

Code:
HexColorCode := toHex( X := chr(127) chr(127) chr(127) )
MsgBox, % HexColorCode

toHex(ByRef b, l = 0) { ; Titan
   f := A_FormatInteger, p := &b - 1
   SetFormat, Integer, h
   Loop, % l ? l : VarSetCapacity(b)
      h .= *++p ; unaries rox ur sox!!
   SetFormat, Integer, %f%
   Return, RegExReplace(RegExReplace(h, "0x(.)(?=0x|$)", "0$1"), "0x")
} ; http://www.autohotkey.com/forum/viewtopic.php?p=97593#97593

_________________
SKAN - Suresh Kumar A N
Back to top
View user's profile Send private message
Laszlo



Joined: 14 Feb 2005
Posts: 3959
Location: Pittsburgh

PostPosted: Tue Jan 02, 2007 4:52 pm    Post subject: Reply with quote

The above example does not work if the parameter is assigned a literal string, or an expression containing a literal string.
Code:
HexColorCode := toHex( X := " " )


AHK gives the following error:
---------------------------
xxx.ahk
---------------------------
Error: Caller must pass a variable to this ByRef parameter.

Specifically: X := " " )

Line#
003: SetBatchLines,-1
---> 005: HexColorCode := toHex( X := " " )
006: MsgBox,HexColorCode
008: {
009: f := A_FormatInteger, p := &b - 1
010: SetFormat,Integer,h
011: Loop,l ? l : VarSetCapacity(b)
012: h .= *++p
013: SetFormat,Integer,%f%

The program will exit.
---------------------------
OK
---------------------------
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Wed Jan 03, 2007 2:00 am    Post subject: Reply with quote

Thanks. I should probably just remove all the syntax checking for ByRef parameters. Without it, runtime errors will be displayed instead, which seems acceptable.
Back to top
View user's profile Send private message Send e-mail
corrupt



Joined: 29 Dec 2004
Posts: 2391

PostPosted: Wed Jan 03, 2007 6:20 am    Post subject: Reply with quote

toralf wrote:
Thanks a lot for the HwndOutputVar. It will help me a lot.
Yes, thanks Chris Smile . That will come in very handy. Sorry for the delayed response - I haven't had much time available for coding lately Sad .
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Jan 04, 2007 6:37 pm    Post subject: Reply with quote

Here are the changes for v1.0.46.05:

Fixed the Input command to allow named end keys like {F9} to work even when the shift key is being held down (broken by v1.0.45). [thanks Halweg]

Fixed inability of "Gui Show" to focus the GUI window when the tray menu is used both to reload the script and to show the GUI window. [thanks Rnon]

Fixed inability to pass some types of assignments (:=) to a ByRef parameter. [thanks Laszlo]
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 Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 2 of 8

 
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