AutoHotkey Community

It is currently May 27th, 2012, 3:59 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: January 19th, 2006, 11:41 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Here are the changes for v1.0.41:

Fixed "Transform HTML", which was broken by v1.0.40.02. [thanks Rabiator]

Improved syntax to support One True Brace (OTB) style with IFs, ELSEs, functions, and normal loops.

Added built-in variable A_AhkPath, which contains the full path and name of AutoHotkey.exe (if available).

Added directives #IfWinActive/Exist to enable selected hotkeys and hotstrings for only the windows you specify.


Last edited by Chris on January 23rd, 2006, 2:15 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2006, 8:30 am 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Thanks for the OTB, although it will require to change a lot in the Auto-Syntax-Tidy, I believe it is a good improvement.

_________________
Ciao
toralf
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2006, 10:09 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Yeah!
I don't care much for the OTB, as I don't use this style of coding, but it is nice for those which cannot live without it...

I eagerly awaited the context sensitive hotkeys.
Indeed, there was workarounds like:
Code:
$F9::
   appName = Create Folder
   WinGetClass winClass, A
   If winClass != ExploreWClass
   {
;      MsgBox 16, %appName%, Oops, wrong window...
      Send {F9}
      return
   }
but it wasn't very nice, adding a lot of code and not being very readable.
Your solution is nice, very well made (the idea of group of windows is excellent) and practical.

Congratulations, you are doing an excellent job on this software!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2006, 1:04 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
The OTB feature adds greater flexibility to the way scripters can code which is terrific. The window-specific hotkeys are also a useful addon. Thanks Chris.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2006, 2:30 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks. The #IfWin feature isn't as useful as I'd originally envisioned because I ran into some roadblocks when trying to implement it (such as thread-safety in the hook thread).

Hopefully the feature will get improved to support %Var% in parameters. Eventually, it may also allow duplicate hotkey labels as Evl suggested at http://www.autohotkey.com/forum/viewtopic.php?t=7485


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 20th, 2006, 6:40 pm 
Offline

Joined: December 28th, 2005, 10:46 am
Posts: 99
Chris wrote:
Hopefully the feature will get improved to support %Var% in parameters.
I would like to see that. Thanks for this very usefull release.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 21st, 2006, 4:16 pm 
Quote:
Improved syntax to support One True Brace (OTB) style with IFs, ELSEs, functions, and normal loops.
Kinda coincidence :D. I had a look at Perl two days ago. To get into the right mood for that, I've checked a script of one of my colleagues and have seen that style of coding for the first time (well, I'm not a programmer :roll:). Whopeee, that means that I can use the same technique with AHK & Perl.

Thx. 8)


Top
  
Reply with quote  
 Post subject:
PostPosted: January 21st, 2006, 11:25 pm 
Offline

Joined: March 2nd, 2004, 10:10 pm
Posts: 443
Location: SLC, Utah
With the #IfWin directives, can ahk_id be added as a WinTitle option? The use will be rare, so only if it doesn't add a lot of code size or time to add.

thanks,
beardboy


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2006, 12:34 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
As beardboy said, it would be handy - it would also be more consistent with other commands. To be useful though, it would need to be able to accept variables for the ID (as Chris already mentioned might be added).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2006, 3:37 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I believe ahk_id and ahk_pid are already supported. The only reason they're not mentioned is what Evl said: Without %Var% support, they would be useful only in unusual circumstances such as a script creating another script via FileAppend.

However, it might be of use that GroupAdd can add a series of ahk_id's or ahk_pid's to a group. You can then use that group with #IfWin. Also, you can keep adding more id's and pid's to such a group as long as you want -- and as long as the list doesn't get huge, performance shouldn't be affected much.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 22nd, 2006, 4:05 am 
Offline

Joined: March 2nd, 2004, 10:10 pm
Posts: 443
Location: SLC, Utah
Chris, thanks for the work around solution.

thanks,
beardboy


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2006, 11:17 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Here are the changes for v1.0.41.01:

Fixed AltGr hotkeys that send AltGr characters such as "<^>!a::Send \" in German. [thanks AGU]
Fixed Gui +Disable/AlwaysOnTop to work even if other options are present on the same line. [thanks evl]
Improved syntax to support having a command on the same line as an open-brace. [thanks segfault]

The tentative plan for the next major release is to support duplicate hotkeys and hotstrings for easier context sensitivity with the #IfWin directives.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2006, 11:27 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
Chris wrote:
Improved syntax to support having a command on the same line as an open-brace. [thanks segfault]

Nice one however this does not apply to OTB. Is this intentional?

For example this works:
Code:
Loop, 3
{ MsgBox, %n%
   n += 10
}
But not this (OTB):
Code:
Loop, 3 { MsgBox, %n%
   n += 10
}

_________________
GitHubScriptsIronAHK Contact by email not private message.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2006, 12:32 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Yes, it's intentional because the extra code size didn't seem justified given how rarely anyone would want to use such an ugly style :)

It is also documented on the Block page under the OTB section: "However, open-braces of the One True Brace style do not support commands to their right."


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2006, 9:28 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Well, I do find the first style (the one you just allowed) ugly too, perhaps that's why it is rarely used.
Ugly and impratical if you have to add a new command just before the first line of the block.
And with no clear advantage over the OTB style, ie. no gain of line. Well, at least, braces are aligned, I find this more readable than OTB.

But well, it is good to have flexibility and to please as much people as possible, as long this doesn't bloat the code. Which seems to be a true concern for Chris :-) I like that.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group