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 

Gathering ideas for AutoHotkey v.2
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Sun Nov 26, 2006 7:36 pm    Post subject: Gathering ideas for AutoHotkey v.2 Reply with quote

Disclaimer: this first message isn't official, ie. it comes from me, not from Chris.
So it expresses only ideas I have on what this v.2 should be, although I believe some of the ideas here were expressed by Chris (or others).
This topic is open for discussion, of course.

First, a bit of history, it might help to understand the need for a v.2.
In prehistoric times, there were AutoIt 2, a scripting language for Windows whose syntax was more or less batch-like, setting values in the environment to manage "variables", having only the most primitive operations (Add, Sub, Mult, Div), with a rigid syntax (easy to parse) of command followed by parameters.
To do more complex computations, you had to use an external program!
Then, Chris created AutoHotkey based on AutoIt 2 syntax, to keep a compatibility with hundred of scripts, compatibility that was dropped by the AutoIt team.
The above limitations being annoying, he improved the syntax, introducing expressions.
To keep compatibility, he made a second syntax, using := to assign the result of an expression, and parenthesis around the condition of an If to evaluate it like an expression (with annoying exceptions...).
It was a good thing, but with time, it proved to be very confusing to newbies, that wrote stuff like:
Code:
a = b * (c - d)
x = %y% + %z%
If val = var - 1
If (%a% = %b%)
and so on...

So, one of the main motivation for the v.2 is, AFAIK, to simplify and make consistent this syntax, at the cost of dropping the original compatibility with AutoIt 2.
Note that the later isn't any more a must have, old AutoIt 2 scripts are probably long forgotten and obsolete, and the number of AutoHotkey scripts is probably much bigger!

Some people fantasied and proposed more changes, so AHK would look more like their favorite programming language (often JavaScript...).
Chris made clear that he wants to keep the changes to a minimum, to avoid unnecessary fluff and to keep the original flavor of AHK.
Other people seems to find AutoHotkey easy to learn and to use due to old syntax, ie. lack of quotes around strings, of parentheses around command arguments, etc.

So let's try to walk the thin line between those opposed goals.
Note I propose NOT to discuss here major new features, like improvement of API structure support or true arrays, as they already have their own topics.

So, let see these two tripping syntax differences.

Following Chris (IIRC), I propose that in v.2, = acts like :=, ie. it expects an expression on the right.
So a = It's cool would generate a syntax error message.
Perhaps := would be kept as is, to ease the transition, but discouraged.
Now, I believe we should keep literal assignment, as it is convenient, and I like the dereferencing.
To avoid any ambiguity, it could have a very different symbol, so there would be no ambiguity by using it.
I propose to use <<. It is graphically explicit, and would please Unix (and perhaps Dos) users, and C++ programmers too (stream-like syntax...).
Code:
a <<  ; Set var to be empty
s << Quickly set a long string (auto-trimmed)
%refToVar% << Result: %res%`n(%nb% lines)

I propose that, since there is no ambiguity at all (no command possible on the same line), that If is always followed by an expression, even if there is no parentheses.
Code:
If a = y - x
If bCond1 and (bx or by)
If foo >= bar {  ; For those liking the OTB
If (c >= 0x41 && c <= 0x61) ; Parentheses can be there in all cases

Making the parentheses optional is, I believe, in the spirit of AHK, by not forcing to use symbols that are not needed. Simpler, faster to type, flexible.

Other points that have been discussed:

- Drop the obsolete convention that space is a concatenation symbol in expressions. Let the space-dot-space be the official and only symbol. Here again, too much possibilities are confusing, and the old convention proved to bring ambiguity and bugs.

- A symbol to allow to allow putting several commands on the same line.
It is not obvious, because lot of commands take a "naked" string as last parameter, and such a string can end with any symbols. So I proposed to allow such separator only to separate expressions. And Chris proposed to use the comma to this end.
This is a good idea: it has already a special meaning as separator, has no meaning in expressions, and is separator in C/C++ too.

- Make deprecated a number of commands that proved to be unused by most people, of obscure meaning, or that have been obsoleted by expressions.
They would live in some versions, then would dissappear. That would make the binary smaller, the manual lighter and less intimidating. In the interim phase, they would be banished in common purgatory page, so curious people could still find them if meet in a script, but the manual would be still simplified.
No exhaustive list yet, but good candidates are the compound If (IfEqual, IfNotEqual, ...), the primitive operations (EnvAdd, EnvSub, ..., retaining the special += and += seconds), some directives changing behavior of scripts, most Transform commands which are replaced by functions, etc.

I would like also to remind an old wish: to concatenate strings to the end of a variable, a very common operation.
Code:
var .= result . "`n"
res <<< result`n

OK, that's all for now, but I might come back to augment this list, and you can, too!
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Last edited by PhiLho on Mon Nov 27, 2006 11:06 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 3626
Location: Belgrade

PostPosted: Mon Nov 27, 2006 12:46 am    Post subject: Reply with quote

Quote:
Drop the obsolete convention that space is a concatenation symbol in expressions. Let the space-dot-space be the official and only symbol. Here again, too much possibilities are confusing, and the old
convention proved to bring ambiguity and bugs.

I think that space is more convienient then dot. So can you tell me more about those problems related to it ?

Quote:
So I proposed to allow such separator only to separate expressions

I would like to see full separator. Especially with proposed <<
for witch it can be made not to work, and to act like a regular symbol. U don't put much naked strings in other cases and if = finish as := it will be even less...


Other things seem nice to me.
_________________
Back to top
View user's profile Send private message MSN Messenger
toralf



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

PostPosted: Mon Nov 27, 2006 8:14 am    Post subject: Reply with quote

Thanks Philho,
The sugguestions you gave are very well thought through and I support these changes. I wouldn't hessitate to rewrite some of my codes to follow such a new syntax, since I see the benefit.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Thalon



Joined: 12 Jul 2005
Posts: 640

PostPosted: Mon Nov 27, 2006 10:21 am    Post subject: Reply with quote

I like your ideas Smile

Quote:
I propose that, since there is no ambiguity at all (no command possible on the same line), that If is always followed by an expression, even if there is no parentheses.
Code:
If a = y - x
If bCond1 and (bx or by)
If foo >= bar {  ; For those likeing the OTB
If (c >= 0x41 && c <= 0x61) ; Parentheses can be there in all cases

So to compare with a String it would be
Code:
if foo = "bar"
?

Quote:
Although a variable name may consist entirely of digits, this is generally used only for incoming command line parameters. Such numeric names cannot be used in expressions because they would be seen as numbers rather than variables.
Would it make sense to remove this (if possible)? This is another inconsistence some new users do not understand.
Code:
if (Var1 = 1 OR Var1 = "String")
If you set the quote-char around "1" it will not work without any shown reason or error.

Thalon
_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum
SacredVault


Last edited by Thalon on Mon Nov 27, 2006 2:15 pm; edited 1 time in total
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Mon Nov 27, 2006 11:21 am    Post subject: Reply with quote

majkinetor wrote:
I think that space is more convienient then dot. So can you tell me more about those problems related to it ?
There is a bug report about this. In short, the following code doesn't work:
Code:
x = abc
y = fgh
MsgBox % &x " / " &y
and it might have other problems I don't precisely recall. And Chris see this notation as old and obsolete, and I agree. Too ambiguous in a language where everything is string...

majkinetor wrote:
I would like to see full separator. Especially with proposed << for witch it can be made not to work, and to act like a regular symbol. U don't put much naked strings in other cases and if = finish as := it will be even less...
Sorry, but I don't understand this remark (beside the first sentence). I don't see the relation with <<.

Thalon wrote:
Which IIRC?
Question IIRC = If I Recall Correctly... I tend to use these frequently used abbreviations, sorry (AFAIK, IMHO, etc.).

Thalon wrote:
So to compare with a String it would be
Code:
if foo = "bar"
?
I wasn't too sure where your remark started, you forgot the quotes. I figured out. So, yes, If foo = "bar" will be the same as If "bar" = foo.

I agree also with your idea on the old convention of command line arguments: while we change the language, let's drop it.
One solution, if true arrays come in in time, is to put these arguments in an array, eg. A_CmdLineArg or something like that.

A note on <<. I forgot it was used in expressions, but there is no ambiguity, because it stands on a line of its own, not on the right of = or in a command or a function call.
Now, if this is confusing, we can use <- which is unambiguous and still explicit. I would avoid <= for example, first because it is also used in expressions, and because I want to avoid the use of =, to eliminate any ambiguity and confusion with expression assignment.

Thanks for the nice comments. Most of the ideas has been already discussed, so this is a collective work.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Mon Nov 27, 2006 12:54 pm    Post subject: Reply with quote

There is a point I forgot to mention.
Although these changes will not be a revolution (like using another language), it will create lot of points of incompatibility. Chris plans to make a program or a script to automatically adjust v.1 scripts to the new v.2 rules.

But do we need to distinguish the old scripts from the new ones?

Should we keep the same extension? Of course, we can tweak the registry if we want to change this at our own level, but an official support would be better.
Should we have .ahk2 scripts? Or .ah2, if we absolutely want to stick to 3 letter extension? (No real need here.)

Likewise, perhaps we should create a new code tag (code2?) with distinct colors, so we can see at a glance which AHK is necessary to run it.
Otherwise, we will have lot of newbies complaining that a script found on the forum doesn't work with latest version of AutoHotkey!
Not sure that's such a hot idea, as lot of people will forget to use the new tag... Perhaps we need a separate forum!
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Thalon



Joined: 12 Jul 2005
Posts: 640

PostPosted: Mon Nov 27, 2006 2:21 pm    Post subject: Reply with quote

I added the quotes when rereading my post (before reading yours ^^) and came to the correct meaning of IIRC reading another english forum Wink

I think I would prefer to keep the old scripts under .AHK with old runtime and don't convert most of my scripts. So .AHK2 would be a good ending in my eyes...

Thalon
_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum
SacredVault
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Mon Nov 27, 2006 2:33 pm    Post subject: Reply with quote

Yes, a distinct extension would allow this: to have two runtimes.
It would avoid the chore of updating all old scripts, and to quickly test an old script from the forum, while new scripts would be written to target the new version.
And old scripts could be updated progressively, the change of extension allows to keep scripts in the same folder while seeing which ones are still to be converted.
Plus I already changed the Scintilla's lexer for AHK from ahk to ahk1, in provision for the v.2. Since SciTE mostly choose the lexer from the extension, we must have a way to distinguish them.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
foom



Joined: 19 Apr 2006
Posts: 386

PostPosted: Mon Nov 27, 2006 2:52 pm    Post subject: Reply with quote

PhiLho wrote:
Now, I believe we should keep literal assignment, as it is convenient, and I like the dereferencing.
To avoid any ambiguity, it could have a very different symbol, so there would be no ambiguity by using it.
I propose to use <<. It is graphically explicit, and would please Unix (and perhaps Dos) users, and C++ programmers too (stream-like syntax...).
I don't like the << because its the same as = in blue. In my opinion literal assignment should be banned completely. I don't understand why you all want to have this simple assignment when its the most ambiguous thing in ahk which leads to errors. Just changing the operators will not attenuate the problem of ahk and that is the lack of consistency. Which however is not only because of the assignment operators.
There are many special cases like
Loop, Parse, InputVar , CSV
If var in ,,1,2,3
literal quote:=""""
Escaping character is a farce in ahk because its just limited to string assignment and there is again an exception to ".
(Personal side-note: I hate the escape-char to be ` because on my German keyboard i need to press the accent key twice and backspace to get a single accent. When creating list delimited by a newline this is becoming a real pain in the arse) I mention this because now there is regexp and in regexp we have again an consistency issue with escaping some chars like newline and tab. There should be only one legal way.
Since \ is the escape character from many other very popular languages it should become the default escape-character because it will be easier to do a transition from or to other languages.
Same goes for strings. String should be clearly marked by enclosing them in quotes. If one would like to take it even one step further the options in commands could even be enclosed by quotes although i can live with the options of commands being threated as strings by default since most of the time evaluation operations aren't needed in commands options. However one could take this even one step further one more time and replace all commands with functions in which however options would have to be enclosed in quotes since they are passed as string to the function. But i don't like this idea since i appreciate that commands are much faster than functions in ahk.

Regarding the broken scripts issue i have a very easy solution. Create a new "Scripts And Functions" forum and rename the old "Scripts And functions" forum to "Old Scripts And Functions Archive". Creating a new topic in this forum should be disabled. One could look for scripts in this archive and ask if someone is willing to convert them to the new syntax by just replying to the related topic. Or if the developer of a script has converted his script to the new syntax he could edit his topic and redirect to the new "Scripts And Function" forum where his new script resides.
Back to top
View user's profile Send private message
toralf



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

PostPosted: Mon Nov 27, 2006 3:03 pm    Post subject: Reply with quote

foom wrote:
(Personal side-note: I hate the escape-char to be ` because on my German keyboard i need to press the accent key twice and backspace to get a single accent. When creating list delimited by a newline this is becoming a real pain in the arse)
Personal reply: Type the accent once and hit the spacebar.

Edit: I'm not very fond of using a new extention. Although I can follow your arguments, I just doesn't feel right.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Thalon



Joined: 12 Jul 2005
Posts: 640

PostPosted: Mon Nov 27, 2006 4:10 pm    Post subject: Reply with quote

toralf wrote:
foom wrote:
(Personal side-note: I hate the escape-char to be ` because on my German keyboard i need to press the accent key twice and backspace to get a single accent. When creating list delimited by a newline this is becoming a real pain in the arse)
Personal reply: Type the accent once and hit the spacebar.
Or press the accent once and write normal afterwards Wink
Code:
`k = Shift + Accent and a "k" afterwards...
Quote:
don't like the << because its the same as = in blue.
Hmm.. it's not the same, because it is much more different to ":=" or "=", so it's marked as string as well as with quote-characters...

Thalon
_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum
SacredVault
Back to top
View user's profile Send private message
JSLover



Joined: 20 Dec 2004
Posts: 542
Location: LooseChange911.com... the WTC attacks were done by the US Gov't... the official story is a lie...

PostPosted: Mon Nov 27, 2006 4:19 pm    Post subject: Re: Gathering ideas for AutoHotkey v.2 Reply with quote

PhiLho wrote:
I propose that, since there is no ambiguity at all (no command possible on the same line), that If is always followed by an expression, even if there is no parentheses.

...I don't care if if's require parens or not, but if they ARE there it needs to support commands on the same line...

Code:
;//work...
if a=y-x
   msgbox, works

;//work...
if (a=y-x)
   msgbox, works

;//fail...
if a=y-x msgbox, oops

;//work...
if (a=y-x) msgbox, yay

...& about this...

Code:
;//fail?...
if foo>=bar {  ; For those liking the OTB

;//work...
if (foo>=bar) {  ; For those liking the OTB

PhiLho wrote:
- Drop the obsolete convention that space is a concatenation symbol in expressions.

...no!!!...space-dot-space...1) looks dumb...2) is too much to type...I want + to be a concat operator...with no space around it...I h a t e s p a c e d o u t c o d e...it's hard to read...see...

PhiLho wrote:
Let the space-dot-space be the official and only symbol. Here again, too much possibilities are confusing, and the old convention proved to bring ambiguity and bugs.

...the "old" convention only had bugs in ONE obscure code snippet (that I think you posted)...that snippet could be fixed by either...1) using space-dot-space...2) using parens around the parts the needed eval'd 1st...

PhiLho wrote:
- A symbol to allow to allow putting several commands on the same line.

...semi-colon.

PhiLho wrote:
And Chris proposed to use the comma to this end.

...I still don't understand how comma can work, but I'm open (sorta) to examples...but semi-colon is better...either leave the comment char space-semi & make command sep be no-space-semi...or change the comment char to space-semi-semi & make the command sep be semi, space on either side or not...examples...

Code:
;//Proposal 1...
;//space-semi = comment
;//no-space-semi = command sep
a=1;b=2         ;comment
a=1; b=2        ;comment

;//Proposal 2...
;//space-semi-semi = comment
;//semi = command sep
a=1;b=2         ;;comment
a=1; b=2        ;;comment
a=1 ; b=2       ;;comment

;//Proposal 3...
;//3 or more spaces or 2 or more tabs = comment
;//semi = command sep
a=1;b=2         ;comment
a=1; b=2        ;comment
a=1 ; b=2       ;comment

PhiLho wrote:
I would like also to remind an old wish: to concatenate strings to the end of a variable, a very common operation.

...ok at 1st I didn't know what you meant, your pseudo-code was confusing...did you mean...

Code:
var="wow"
var=var "wee"

...in that case += should do strings too...

Code:
var="wow"
var+="wee"

PhiLho wrote:
I agree also with your idea on the old convention of command line arguments: while we change the language, let's drop it.

...we have to drop it...since expressions see numbers as numbers, we won't be able to access them once = means :=...

PhiLho wrote:
One solution, if true arrays come in in time, is to put these arguments in an array, eg. A_CmdLineArg or something like that.

...I not sure why we need "true arrays" for this, I suggest built-in vars (that will become arrays once they exist)...

Code:
A_Params            Number of params
A_Param0            0th command line parameter...possibly same as A_ScriptName?...like
                    in batch files the 0th param is the name the program was called with
                    in uncompiled script this would be AutoHotkey.exe or possibly the
                    full path to the AutoHotkey.exe that ran it...(so I think this would be
                    different than A_ScriptName)...
A_Param1            1st param
A_Param2            2nd param
A_ParamN            Nth param
A_ParamsAll         All params from 1 to N
A_CmdLine           Contents of GetCommandLine() API...only if different than what's available above
                    for example, this might include the 0th param, when A_ParamsAll wouldn't...

PhiLho wrote:
Should we keep the same extension?

...f*** yes...

PhiLho wrote:
Should we have .ahk2 scripts?

...f*** no...

PhiLho wrote:
Likewise, perhaps we should create a new code tag (code2?)

...what?...on the forum?...ok yes, but not code2...
    [code] = like it is now
    [codescroll] = textarea or other scrollable box
    [codehl] = code with highlighter (color)
...or I can try to code some nice JavaScript to toggle different code styles...saving the last chosen or default to a cookie...then we only need one code tag...or perhaps the code tag used would specify what that post wants to default to, but clicking would still toggle...

PhiLho wrote:
Otherwise, we will have lot of newbies complaining that a script found on the forum doesn't work with latest version of AutoHotkey!

...ah, yes, those forever newbies...I propose a #Version directive...new scripts can say #Version 2...& when run on an old version it would complain...issue a new version 1 that understands this & rejects scripts declaring #Version 2...& version 2 would reject scripts...1) not declaring #Version 2 or declaring #Version 3...this could get more specific...for example #Version 1.0.45.03 & people would immediately know they need to update/downdate their AHK for that script...(I posted a RegEx script & they didn't have regex yet)...

PhiLho wrote:
Perhaps we need a separate forum!

...omg what?
_________________

Home • Click image! • Blog
Back to top
View user's profile Send private message Visit poster's website
foom



Joined: 19 Apr 2006
Posts: 386

PostPosted: Mon Nov 27, 2006 5:13 pm    Post subject: Reply with quote

Thalon wrote:

I forgot to mention that it sometimes gets pasted on a position you don't want it because it waits for the next character to see if it can modify it like è.
Quote:
don't like the << because its the same as = in blue.
Hmm.. it's not the same, because it is much more different to ":=" or "=", so it's marked as string as well as with quote-characters...

It is the same. PhiLho suggestet to replace = by << because = is taking the place of :=.

Regarding the seperator. Why the heck isn't it changed completely like to $. This would eliminate the need of spaces around the dot. And the current implementation of concatenation is fubar. There are often post in the Ask For Help forum which are because of operations failing because of concatenation issues.


Last edited by foom on Mon Nov 27, 2006 5:20 pm; edited 2 times in total
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 3626
Location: Belgrade

PostPosted: Mon Nov 27, 2006 5:18 pm    Post subject: Reply with quote

JSLover wrote:
...the "old" convention only had bugs in ONE obscure code snippet
Yup, lover is right.

So if I have to choose between
a+b
a . b
a b

I chose the last one.

JSLover wrote:

- A symbol to allow to allow putting several commands on the same line..
..semi-colon.

We already had discussion about this and ppl tend to stick with ; as comment. Don't want to discuss anymore this topic, but I think full command separation is needed.
If we stick to expressions only then, again, Python has a very nice thing for it:

PhilHo & others proposition is:
    a=0, b=Func(x)


In Python you write:
    a, b = 0, Func(x)


witch is very nice for some situations, like switch:
    a, b = b, a


So, the imprtant thing to note here is that if naked strings are dropped (that is, if you can only specified strings between " ") then things we recently discussed about separators, comments etc musts be rediscussed with this new information since one of the bigest problem was litteral string occurance in the code. If this is changed we don't have this problem any more

JsLover wrote:
...I don't care if if's require parens or not, but if they ARE there it needs to support commands on the same line...

reading my thoughts..

About number variables example like:
Code:
if 0<1
   MsgBox parameters not correct


should be killed as fast as can. I was very confused when I saw this...

JsLover wrote:
...I not sure why we need "true arrays" for this

Your A_Param approach appears to me to be in AHK spirit, but that question is usualy done via array, so I support PhiLho here. If nothing else, it is good to follow "principle of last surprise" as parameteras are in array in countless number of languages.


About extensions, I think we should have single one and add new directive for it . As old scripts will fade away in time this is natural...
_________________
Back to top
View user's profile Send private message MSN Messenger
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Mon Nov 27, 2006 5:22 pm    Post subject: Reply with quote

foom wrote:
I don't like the << because its the same as = in blue. In my opinion literal assignment should be banned completely. I don't understand why you all want to have this simple assignment when its the most ambiguous thing in ahk which leads to errors.
I don't agree. It is ambiguous because people are used to use = to assign expressions. Making it distinctive should suppress this confusion while keeping a useful operator. I prefer to write:
Code:
a = %a%%val% values in %test%`n
; than
a := a . val . " values in " . test . "`n"
; and
a =
(
one
two
three
)
; instead of
a := "one`ntwo`nthree"
More readable, easier to maintain, avoid writing very long lines, avoid using the dreaded `...

Quote:
(Personal side-note: I hate the escape-char to be ` because on my German keyboard i need to press the accent key twice and backspace to get a single accent. When creating list delimited by a newline this is becoming a real pain in the arse)
See my remark above for the list... And on French keyboard, I have to hit AltGr+(7|è) to get this char, and it is a dead key, needing another char after it (can be space). But if this other char isn't a vowel, it has no side effect. Actually, I just added ^²::Send ``%A_Space% to my permanent script for quick access... AHK provides the pain, but also the solution!

Quote:
I mention this because now there is regexp and in regexp we have again an consistency issue with escaping some chars like newline and tab.
No, you can use `n and `r in a regular expression too.

Quote:
Since \ is the escape character from many other very popular languages it should become the default escape-character because it will be easier to do a transition from or to other languages.
Very bad idea, it will make a pain to write Windows paths, regular expressions (all \ doubled like in Java, the horror!) and so on.

Quote:
Regarding the broken scripts issue i have a very easy solution. Create a new "Scripts And Functions" forum and rename the old "Scripts And functions" forum to "Old Scripts And Functions Archive". Creating a new topic in this forum should be disabled.
There are also useful scripts in the Ask for Help section... And people might want to be able to still publish scripts for AHK 1.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 1 of 9

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


Powered by phpBB © 2001, 2005 phpBB Group