Jump to content

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

Integrating Lua into AutoHotkey


  • Please log in to reply
38 replies to this topic
  • Guests
  • Last active:
  • Joined: --

You can just go and use Ranorex.

...**** THAT...PAYWARE! NO!...

Lua's current syntax sucks...it's fine if they keep it & call it LuaDumbass, but they need to create a JavaScript-like syntax...with if(){} not if then else...& "&& || !" not "and or not"...also the way they convert x="10"+1 to 11 is really dumb...it should equal 101...+ is concat (& add) not anything else!...

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
:lol:
Posted Image

  • Guests
  • Last active:
  • Joined: --
i agree if ahk is going to intergrate external language it must be lua not else. why? lua is in second position of simplicity ranking right after autohotkey. intergrating lua does not mean that we just get more commands. we will get much possibilities. wxlua is good sample. and many other lua-bindings. intergrating lua may require less effort than adding more standard windows controls that ahk missing currently. if you could learn ahk. there will not be any problem of learning lua.

Fry(^)
  • Guests
  • Last active:
  • Joined: --

AHK lang sucks IMO.


Thats crazy talk.

AHK does not suck

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
Our dear anonymous guest is a good troll...
If he wants JavaScript syntax, just use JavaScript, I don't see where the problem is.
I love C-like syntax, but I have absolutely no problem with Lua syntax, which is simple and terse, and probably much more readable for the newcomer than C syntax, with so much symbols to memorize.
And unlike what he writes, + is for better for addition only, not for concat...
Autoconversion of types is common in some languages, Perl trying hard to make it in every possible form (like "x" * 10 giving "xxxxxxxxxx"...)

Back to original idea, I only skimmed, but I don't see the interest to embed a language into another.
I was playing with the idea of using the code of AHK as library supported by Lua, but it is too much work, and as long as AHK is GPL (still need some bits to be rewritten to get rid of it), I wouldn't take this work anyway.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006

Back to original idea, I only skimmed, but I don't see the interest to embed a language into another.

Nobody said that. The point was to totaly remove the weakest part of the AHK - its language. Not to embade Lua into the current form of AHK - that is horror. :)
Posted Image

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

The point was to totaly remove the weakest part of the AHK - its language.

Thousands of users seem to disagree... or they'd be using lua instead of AHK...

Tuncay
  • Members
  • 1945 posts
  • Last active: Feb 08 2015 03:49 PM
  • Joined: 07 Nov 2006

Thousands of users seem to disagree...

... does not mean, that all of them knows about Lua and the advantages what we could have ...

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

Thousands of users seem to disagree...

... does not mean, that all of them knows about Lua and the advantages what we could have ...

True, but it likely means that the majority of them like the current syntax/functionality. The suggestions here sound like the outcome would end up being lua with AHK functionality added in - not the other way around... unless I'm misunderstanding...

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: May 02 2019 09:16 PM
  • Joined: 21 Dec 2007
Relative new commer and Newb here
but I agree the syntax of ahk is ..... well clunky the language alone
the functionality is great
and what is it people finds so objectionable to a strict well defined language that is simple and well defined

i use vb js php fluently
of them my fav is php of course
but to much flexibility leads to poor development initiatives because it creates to many obsticals
ahkvar:="this is text"
ahkvar= % "this is text"
ahkvar=this is text
ahkvar=
(
this is text
)
seriously i could go on and on why why do we need so many ways to set text yes im aware one is expression one is forced expression one is text
one is multi line
good god
concatenate if you need all of that instead
ahkvar="text"
is all thats needed
variables dont need to be in quotes any how and we have a concatenation and new line characters already


sorry im done now just figured i would add to this rant
Never lose.
WIN or LEARN.

engunneer
  • Moderators
  • 9162 posts
  • Last active: Sep 12 2014 10:36 PM
  • Joined: 30 Aug 2005
:= and = will be merged into just = in v2 of ahk

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

seriously i could go on and on why why do we need so many ways to set text yes im aware one is expression one is forced expression one is text
one is multi line
good god
concatenate if you need all of that instead

ahkvar="text"
is all thats needed
variables dont need to be in quotes any how and we have a concatenation and new line characters already

The main reason was likely to allow stuff like
a = blah
myvar := a
%myvar% = Hello World
MsgBox % "blah = " . blah
Do ya feel it now? Do ya? huh? Do ya? :lol: :wink:

tank
  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: May 02 2019 09:16 PM
  • Joined: 21 Dec 2007

seriously i could go on and on why why do we need so many ways to set text yes im aware one is expression one is forced expression one is text
one is multi line
good god
concatenate if you need all of that instead

ahkvar="text"
is all thats needed
variables dont need to be in quotes any how and we have a concatenation and new line characters already

The main reason was likely to allow stuff like
a = blah
myvar := a
%myvar% = Hello World
MsgBox % "blah = " . blah
Do ya feel it now? Do ya? huh? Do ya? :lol: :wink:


all of which can be accomplished without the need for all of the insain ways it is done in ahk
in most other lang's
Never lose.
WIN or LEARN.

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

all of which can be accomplished without the need for all of the insain ways it is done in ahk
in most other lang's

AutoHotkey isn't the only language that I use... What's so insane about the current methods? They are very simple...

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006

What's so insane about the current methods? They are very simple...

They are unintuitive, error prone and generaly very limited in expressivness. You also don't have some basic programming mechanisms.

It didn't matter much when AHK was generaly used for 10 - 50 line scripts. Today AHK is used more broadly so now it does matter.

Also, Lua is separately developed wich means that functionality could change on its own, and language on its own by the team of dedicated ppl.

About "simple" part, to me, Lua is easier to learn and understand.
Posted Image