Jump to content

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

IronAHK (alpha): cross platform .NET rewrite of AutoHotkey


  • Please log in to reply
581 replies to this topic
maul.esel
  • Members
  • 790 posts
  • Last active: Jan 05 2013 09:26 PM
  • Joined: 28 Feb 2011
Just a little question: As someone who's not experienced with programming, what will be the difference between those:
var := [color=orange]false[/color]
var := [color=orange]null[/color]
Regards
maul.esel
Join the discussion on The future of AutoHotkey
Posted Image Visit me on github Posted Image
Win7 HP SP1 64bit | AHK_L U 64bit

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
Setting a variable to null will delete it, false means the variable exists with a boolean type. The distinction is meaningless now but in future when we have the identity operator (===) it will be useful.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


maul.esel
  • Members
  • 790 posts
  • Last active: Jan 05 2013 09:26 PM
  • Joined: 28 Feb 2011
Hey again,

thanks for your answer.

I detected 2 bugs with #Include:[*:3elpg6q4]#including a directory will fail with

test.ahki:1 - Include file not found

code to reproduce:
#Include %A_ScriptDir%
[*:3elpg6q4]The other bug seems to be related to spaces and tabs :?
#Include gui.ahki ; works
 #include gui.ahki ; a space before the directive --> fails
leads to:

test.ahki:1 - Unrecognized directive

Some behavior different to AHK:
MsgBox
leads to an empty MsgBox instead of "Press OK to continue." as AHK does.

And as always, a curious question :lol:: Will it be possible to create DLLs with IronAHK that can be used from within other scripts :?:
Edit: Another curious question: when Eval() will ever be implemented, how far would this go? Would it for example be possible to load function definitions into memory?

Regards
maul.esel
Join the discussion on The future of AutoHotkey
Posted Image Visit me on github Posted Image
Win7 HP SP1 64bit | AHK_L U 64bit

IsNull
  • Moderators
  • 990 posts
  • Last active: May 15 2014 11:56 AM
  • Joined: 10 May 2007

Will it be possible to create DLLs with IronAHK that can be used from within other scripts

On the one hand, IA is compiled into a real .NET Application so technically yes, its possible to create an .NET Library.

Actually I see some problems upcoming due the fact of "smart compiling", and the fact that IA Scripts never get interpreted just compiled and native executed. That means its questionable what should be included in a compiled IA dll.
Its not that good if we have to load IA build-in Functions for each loaded script.

This goes also in the direction of the ideas which I had to change some bits in the current compiler logic and the way as a script actually gets compiled.

IMHO, the first step in this direction will be, allowing the use of the .NET Framework in IA, so IA Scripts also can reference/access 3th party libs.

when Eval() will ever be implemented, how far would this go? Would it for example be possible to load function definitions into memory?

This question goes in a very similar direction. Eval of IA Code will require to compile it at runtime, thus - reusing the IA Compiler.
So, this will require the Tokenizer/Parser/Compiler included in the IA App.

At this point I have to make one thing clear:

In .NET, Application size of produced libraries is not that a big deal. A compiled .NET App carrys nothing more than the compiled source code, as all StdLibs (the .NET Framework) must be preinstalled of the executing client.
So we don't face the same problems as C++ Programmers do in this case, as each header/static lib they include the code grows very fast.

The idea of the smart compiler was primary that it produces a single binary to make it very easy to deploy. So it might result in the fact that compiled IA Libraries also get merged into the main app when they are referenced in the IA Script.

IsNull
  • Moderators
  • 990 posts
  • Last active: May 15 2014 11:56 AM
  • Joined: 10 May 2007

The other bug seems to be related to spaces and tabs

test.ahki:1 - Unrecognized directive

Fixed in fixed directive parsing (use trimmed line)

Fixed DirectoryLookup in Lookup Directory of the script file rather than the executing IA compiler.

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
Haven't been here in a while and wanted to give IronAHK another go. The first page says you must uninstall before upgrading... How do you do that?

I have tried using,
sudo apt-get remove IronAHK

and get the message,
Unable to locate package IronAHK

and I tried to find the package using,
dpkg --list | less
but found nothing.

Apparently I'm not going about this the right way. Can someone please get me started in the right direction. Thanks

I also have a question about libraries. I saw above that #Include is functioning but what about libraries? Is there a lib folder somewhere?

IsNull
  • Moderators
  • 990 posts
  • Last active: May 15 2014 11:56 AM
  • Joined: 10 May 2007

The first page says you must uninstall before upgrading... How do you do that?

Are you sure that you have installed IronAHK with apt the first time?
Just install it with apt now.

Sidenote:
The last fixes targeting the #Include bugs arn't merged in the main branch yet.

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007

Are you sure that you have installed IronAHK with apt the first time?


APT? Not sure, I installed following the directions in this post,
http://www.autohotke...r=asc&start=359

Where can I read up and learn what apt is?

I guess it will be a while before library functions are included? Oh well, I have lot's I need to learn before getting to that point anyway. You have already brought this a long way in a relatively short time. Thanks for your efforts.

Frankie
  • Members
  • 2930 posts
  • Last active: Feb 05 2015 02:49 PM
  • Joined: 02 Nov 2008
Can someone explain how to compile this on Ubuntu? A while ago I followed the steps here, but they have since been outdated and I get errors. It appears that the project changed from debug to release builds.

Thanks
aboutscriptappsscripts
Request Video Tutorials Here or View Current Tutorials on YouTube
Any code ⇈ above ⇈ requires AutoHotkey_L to run

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
I haven't used IronAHK in a while but the instructions I had are,
ironahk --out compiled.exe Example.ahk
./compiled.exe
"compiled" is what your naming your compiled script and "Example" is the script your compiling.

The complete instructions I had for installing and compiling can be found in the last post on page 24.
http://www.autohotke...r=asc&start=359

Frankie
  • Members
  • 2930 posts
  • Last active: Feb 05 2015 02:49 PM
  • Joined: 02 Nov 2008
Thanks! Updated successfully.
aboutscriptappsscripts
Request Video Tutorials Here or View Current Tutorials on YouTube
Any code ⇈ above ⇈ requires AutoHotkey_L to run

Khine
  • Members
  • 58 posts
  • Last active: Jan 26 2012 02:52 PM
  • Joined: 17 Feb 2010
Peter-Darbyshires-iMac:IronAHK peterdarbyshire$ mono IronAHK.exe Example.ahk
Could not execute: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext

has anyone had this issue before?

OSX 10.6

Khine
  • Members
  • 58 posts
  • Last active: Jan 26 2012 02:52 PM
  • Joined: 17 Feb 2010
Peter-Darbyshires-iMac:IronAHK peterdarbyshire$ mono IronAHK.exe Example.ahk
Could not execute: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext

anybody? Can't figure it out for the life of me

Khine
  • Members
  • 58 posts
  • Last active: Jan 26 2012 02:52 PM
  • Joined: 17 Feb 2010
nevermind downgraded mono seem to solve it

Khine
  • Members
  • 58 posts
  • Last active: Jan 26 2012 02:52 PM
  • Joined: 17 Feb 2010
ImageSearch, FoundX, FoundY, 0, 0, 3000, 3000, 1.jpg
if not errorlevel
MsgBox, %FoundX% %FoundY%

What is the issue with this script on Mac with current IAK

getting this error

Could not execute: Invalid IL code in Program:Main (): IL_0016: stloc.1