Jump to content

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

AutoHotkey as programming language


  • Please log in to reply
62 replies to this topic

Poll: Do you think people would use it as a programming language? (84 member(s) have cast votes)

Do you think people would use it as a programming language?

  1. YEAH!!! (57 votes [53.27%])

    Percentage of vote: 53.27%

  2. yes (20 votes [18.69%])

    Percentage of vote: 18.69%

  3. maybe (16 votes [14.95%])

    Percentage of vote: 14.95%

  4. not really (6 votes [5.61%])

    Percentage of vote: 5.61%

  5. NO WAY. (8 votes [7.48%])

    Percentage of vote: 7.48%

Vote Guests cannot vote
corrupt
  • Members
  • 2558 posts
  • Last active: Nov 01 2014 03:23 PM
  • Joined: 29 Dec 2004

if (stoploop) break

It turns out that supporting "any command" on the same line as an if-statement would take longer to implement that it was worth (expression parsing makes it difficult to do). In addition, the benefit seems low because scripts that use that style are generally thought to be less readable.

Thanks for looking into it Chris :) . I can live with the current syntax for If statements as it usually works out to be much easier to read at a glance and troubleshoot.

JSLover
  • Members
  • 920 posts
  • Last active: Nov 02 2012 09:54 PM
  • Joined: 20 Dec 2004

(expression parsing makes it difficult to do)

...I don't know what all is considered an expression on an if, but I'd require outer ( )'s...I think this might work...

if WinActive("blah")
	msgbox, hi
...which could cause ambiguity, but requiring outer parens, should clear it up...

if (WinActive("blah")) msgbox, hi
...if not "any command", how about break/return/continue/(any I forgot)...the short commands to end something.
Useful forum links: New content since: Last visitPast weekPast 2 weeks (links will show YOUR posts, not mine)

OMFG, the AutoHotkey forum is IP.board now (yuck!)...I may not be able to continue coming here (& I love AutoHotkey)...I liked phpBB, but not this...ugh...

Note...
I may not reply to any topics (specifically ones I was previously involved in), mostly cuz I can't find the ones I replied to, to continue helping, but also just cuz I can't stand the new forum...phpBB was soo perfect. This is 100% the opposite of "perfect".

I also semi-plan to start my own, phpBB-based AutoHotkey forum (or take over the old one, if he'll let me)
PM me if you're interested in a new phpBB-based forum (I need to know if anyone would use it)
How (or why) did they create the Neil Armstrong memorial site (neilarmstronginfo.com) BEFORE he died?

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
In addition to breaking existing scripts, requiring outer parentheses seems undesirable to me. But maybe you meant requiring them only when there's a same-line action present.

As for supporting break/return/continue on the same line as an if-statement, in my estimation the benefit is too small to justify the code size and development time.

I realize that decisions like this will displease a lot of people who like to write scripts in their own style. However, AHK isn't designed to please everyone -- I believe that even attempting to do so would be a losing battle that would do more harm than good in the long run.

Finally, a poll is always an option if you believe strongly that a certain alternate syntax should be supported even if it requires considerable development time and code size.