Jump to content

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

ahkbook - a free online book for AutoHotkey


  • Please log in to reply
115 replies to this topic
nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010
What do you want out of the "Working with bits, bytes etc. (&, |, >>, <<, ...)" :?:
I'm willing to do it.

Is there a non-ahk syntax highlighting code block? Because the best way to understand bitwise operations is in binary, e.g.,
0101
|1001
_____
 1101
1010
&1001
_____
 1000
0011
<< 1
____
0110

...but you don't want AHK syntax highlighting in that.

Frankie
  • Members
  • 2930 posts
  • Last active: Feb 05 2015 02:49 PM
  • Joined: 02 Nov 2008
If your using markdown, just indent everything by 4 spaces and it should work. Markdown and Pygments use the same block-code structure.
aboutscriptappsscripts
Request Video Tutorials Here or View Current Tutorials on YouTube
Any code ⇈ above ⇈ requires AutoHotkey_L to run

awannaknow
  • Members
  • 372 posts
  • Last active: Mar 03 2019 05:18 AM
  • Joined: 14 Jun 2009
I canot see code, only text, no example or anything that is code is available to read.
I tried opera, IE, Firefox, Chromium, all the same.
Bouhouhou :shock: :roll: :wink:
Your scripts online or anything you'll need online for free with 0hna.tk  like: Zero $ Hosting No Ad Free Online Hosting
Remove comments and blank lines in AHK code

maul.esel
  • Members
  • 790 posts
  • Last active: Jan 05 2013 09:26 PM
  • Joined: 28 Feb 2011
This has been discussed on page 3: Github uses pygments 1.3, which does not support AHK. I sent a request to github support, they told me they'll upgrade, which they apparently haven't done yet.
Join the discussion on The future of AutoHotkey
Posted Image Visit me on github Posted Image
Win7 HP SP1 64bit | AHK_L U 64bit

awannaknow
  • Members
  • 372 posts
  • Last active: Mar 03 2019 05:18 AM
  • Joined: 14 Jun 2009

This has been discussed on page 3: Github uses pygments 1.3, which does not support AHK. I sent a request to github support, they told me they'll upgrade, which they apparently haven't done yet.

I found it, thank you, sorry for not having searched before asking . . .

It's a known issue. For some reason Pygments won't render AutoHotkey code on GitHub-Pages. We've been discussing it on and off for the past few pages.

:oops:
And that's exciting, I will learn a lot from the book AND the forum . . .
I can stand waiting for the issue to be fixed.
Thanks for that ebook.
Your scripts online or anything you'll need online for free with 0hna.tk  like: Zero $ Hosting No Ad Free Online Hosting
Remove comments and blank lines in AHK code

nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010
I just found this markdown editor, pretty cool 8)
<!-- m -->http://joncom.be/exp...wn-editor/edit/<!-- m -->

Edit: using the above, I added a new page on Working with bits

nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010

AutoHotkey cannot be used as a shell extension or something, as it can’t be binary-compiled.

Wrong. It can be used as a shell, but not as an OS. It requires Windows, but other than that a compiled AHK file can replace other windows .exe's, notable the shell, explorer.exe.

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
Shell != shell extension.

nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010

Shell != shell extension.

AFAICT a shell extension coul be written in AHK. Simply compile it and modify the registry, like f.ex., 7zip adds to the context menu. Unless I'm misunderstanding the meanin of "shell extension"...

maul.esel
  • Members
  • 790 posts
  • Last active: Jan 05 2013 09:26 PM
  • Joined: 28 Feb 2011
AFAIK shell extensions need to be binary DLLs (or .NET libraries). They must be classes that implement COM interfaces - and I do not know a way to do this in AHK.

Simple additions to the context menu, that just execute the script or another executable are of course no problem.
Join the discussion on The future of AutoHotkey
Posted Image Visit me on github Posted Image
Win7 HP SP1 64bit | AHK_L U 64bit

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

as the github code problem persists, I uploaded the page with code examples as of commit cca4fa245.
Download ahkbook.zip
You can view it offline. Frankie and me are also working on providing ePub, CHM, pdf, and other ebook formats.

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

nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010

AFAIK shell extensions need to be binary DLLs (or .NET libraries). They must be classes that implement COM interfaces - and I do not know a way to do this in AHK.

Well I'm really confused now. Doesn't fincs' ComDispatch() expose a COM interface?

maul.esel
  • Members
  • 790 posts
  • Last active: Jan 05 2013 09:26 PM
  • Joined: 28 Feb 2011
I didn't know that. However, I think you have to specify a DLL in the registry for shell extensions. But I'm not sure. If it would work with AHK, that'd be of course great.

All Shell extension handlers are in-process Component Object Model (COM) objects. They must be assigned a GUID and registered as described in Registering Shell Extension Handlers. They are implemented as DLLs and must export the following standard functions:
[*:29iqxbad]DllMain. The standard entry point to the DLL.
[*:29iqxbad]DllGetClassObject. Exposes the object's class factory.
[*:29iqxbad]DllCanUnloadNow. COM calls this function to determine whether the object is serving any clients. If not, the system can unload the DLL and free the associated memory.


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

nimda
  • Members
  • 4368 posts
  • Last active: Aug 09 2015 02:36 AM
  • Joined: 26 Dec 2010
Ah. I wonder if there's a way to create a "skeleton" DLL which interfaces with AHK.

In any case, I propose

AutoHotkey cannot be used as a shell extension or be injected into another process, as it can't be compiled to a dll.



maul.esel
  • Members
  • 790 posts
  • Last active: Jan 05 2013 09:26 PM
  • Joined: 28 Feb 2011
@ Nota Bene & others: I added a basic spaghetti code section.
The code (which still can't be seen) is:
; any AutoHotkey version
; NOTE: to be replaced with a real-world example

#Q::
GoTo label1
return

label1:
MsgBox
a := 1
goTo label3
return

label2:
a := 0
goTo label3
return

label3:
if (a)
	goto label2
return
However, I don't like that one. Does anyone have a real-world example?

Regards
maul.esel

P.S.: I've been promised github is working on the code issue and we'll get notified as soon as anything changes.
Join the discussion on The future of AutoHotkey
Posted Image Visit me on github Posted Image
Win7 HP SP1 64bit | AHK_L U 64bit