MCode Tutorial (Compiled Code in AHK)

Helpful script writing tricks and HowTo's
Alibaba
Posts: 427
Joined: 29 Sep 2013, 16:15
Location: Germany

Re: MCode Tutorial (Compiled Code in AHK)

03 Oct 2013, 06:32

Maybe you should also advert to the possibility of using C.
"Nothing is quieter than a loaded gun." - Heinrich Heine
User avatar
nnnik
Posts: 2899
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: MCode Tutorial (Compiled Code in AHK)

03 Oct 2013, 08:12

Of C and ASM.
Recommends AHK Studio
Alibaba
Posts: 427
Joined: 29 Sep 2013, 16:15
Location: Germany

Re: MCode Tutorial (Compiled Code in AHK)

03 Oct 2013, 08:38

Yes, right.
"Nothing is quieter than a loaded gun." - Heinrich Heine
User avatar
Gio
Posts: 380
Joined: 30 Sep 2013, 10:54
Location: Brazil

Re: MCode Tutorial (Compiled Code in AHK)

03 Oct 2013, 09:19

This is a great tutorial. Thanks Nnnik.

I wonder how many people in the AHK community have moderate to deep assembly knowledge. There is yet a lot to be achieved with it. Comercial security and a true compiler are long awaited news.

My knowledge may be on the moderate level, though i've mostly studied concepts and debugged code. Not that much coding done by myself atm.
"What is suitable automation? Whatever saves your day for the greater matters."
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!
Alibaba
Posts: 427
Joined: 29 Sep 2013, 16:15
Location: Germany

Re: MCode Tutorial (Compiled Code in AHK)

03 Oct 2013, 20:35

Thanks for this great Tutorial and translating it into german and posting it twice also!
"Nothing is quieter than a loaded gun." - Heinrich Heine
User avatar
nnnik
Posts: 2899
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: MCode Tutorial (Compiled Code in AHK)

04 Oct 2013, 02:20

Thanks back.
But there is still a part that's missing.
Bentschi said he also had some problems with something similar.
Recommends AHK Studio
User avatar
nnnik
Posts: 2899
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: MCode Tutorial (Compiled Code in AHK)

10 Nov 2013, 10:10

Finally found out what the problem was.
Now I'm working on some additional stuff again.
Recommends AHK Studio
User avatar
nnnik
Posts: 2899
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: MCode Tutorial (Compiled Code in AHK)

20 Nov 2013, 05:29

Fuck some part has gone missing :O
Recommends AHK Studio
User avatar
nnnik
Posts: 2899
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: MCode Tutorial (Compiled Code in AHK)

03 Dec 2013, 12:42

I added it again.
Recommends AHK Studio
User avatar
nnnik
Posts: 2899
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: MCode Tutorial (Compiled Code in AHK)

05 Dec 2013, 07:37

Also feel free to share any MCode function you've created here.
I might need some good examples for further chapters.
Recommends AHK Studio
Bentschi
Posts: 18
Joined: 02 Oct 2013, 18:45

Re: MCode Tutorial (Compiled Code in AHK)

05 Dec 2013, 08:26

How about perlin noise?

Code: [Select all] [Expand] [Download] (Script.ahk)GeSHi © Codebox Plus



Good example:
GLuint tex = renderCloud(512, 512, 75, 0.5);

This is the best perlin noise function i've found on the net.
Maybe you want to change the code into GDI/GDI+
Also try to change the octaves variable to 3 (makes a nice effect)
User avatar
nnnik
Posts: 2899
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: MCode Tutorial (Compiled Code in AHK)

05 Dec 2013, 11:38

Thanks that's exactly what I'm searching for.
But float/double to int conversion wont work unless you add the /Qifist option with the compiler.
I already suggested to use it.
Recommends AHK Studio
Bentschi
Posts: 18
Joined: 02 Oct 2013, 18:45

Re: MCode Tutorial (Compiled Code in AHK)

05 Dec 2013, 13:04

I'll PM you a new version of the generator...
Bentschi
Posts: 18
Joined: 02 Oct 2013, 18:45

Re: MCode Tutorial (Compiled Code in AHK)

06 Dec 2013, 07:20

I've done some tests on the newer version on the generator, and QIfist works fine.
QIfist is now also in the older version until the new version comes.
GeekDude
Posts: 816
Joined: 02 Oct 2013, 22:13

Re: MCode Tutorial (Compiled Code in AHK)

11 Mar 2014, 15:03

First off, a great example of using machine code to extend AHK's functionality is this long-integer library http://www.autohotkey.com/board/topic/1 ... c-library/

Second off, why not actually call it what it is: machine code? You say MCode *everywhere*, but never actually explain it stands for machine code.
User avatar
nnnik
Posts: 2899
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: MCode Tutorial (Compiled Code in AHK)

11 Mar 2014, 16:21

I thought that was obvious.
Recommends AHK Studio
User avatar
joedf
Posts: 6278
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: MCode Tutorial (Compiled Code in AHK)

16 Mar 2014, 12:07

maybe could host the generator also??? because i still dont get how to do it with GCC :P
also, you wrote "beispiele", nicht alle leute hier sprechen deutsch :P
User avatar
nnnik
Posts: 2899
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: MCode Tutorial (Compiled Code in AHK)

16 Mar 2014, 13:30

Well I didn't manage to make Visual C++ compile 64 bit code.
But I can make the GCC thing once im finished with my finals next week.
Recommends AHK Studio
User avatar
joedf
Posts: 6278
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: MCode Tutorial (Compiled Code in AHK)

04 May 2014, 13:31

For reference : Information on converting C functions to machine code using Microsoft's free Visual C++ Express compilers
http://www.autohotkey.com/board/topic/1 ... ntry161667

Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 2 guests