VB.net with autohotkey.dll - functions?

Discuss other programming languages besides AutoHotkey
KoHx3
Posts: 11
Joined: 08 Jan 2017, 09:13

VB.net with autohotkey.dll - functions?

08 Jan 2017, 09:39

Hey there,
I want to make some stuff with VB.net and use some ahk scripts.
Actually I just need help to get the functions out of the .dll - and maybe a small example for it.
The Problem is - I dont want to register the autohotkey.dll file.
(Keyword: Export functions)

I found it over here (the way to import functions): https://autohotkey.com/board/topic/108214-autohotkey-library-in-vbnet-verwenden/
(German thread)

I'm using the ahk.dll from Win32w. (From this one https://github.com/HotKeyIt/ahkdll-v1-release because I dont know - this were the one I got redirected to :lol: )
As I see now - there is a v2 version - maybe I should use this, depends on what you say.
Back to topic.

To call the DLL and import the function (ahktextdll were the example) I want to use, I've to use this code:

Code: [Select all] [Download] GeSHi © Codebox Plus

Module Module1
<DllImport("AutoHotkey.dll", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode)>
Function ahktextdll(ByVal script As String, ByVal options As String, ByVal param As String) As Integer
End Function
End Module


But which functions are out there? How I'm able to get them? Is there any list?
I definetly need something to reset the ahk script, add a script to the existing/running script, - something like this.

Hope you can help me out :)
Cheers
KoHx3
Posts: 11
Joined: 08 Jan 2017, 09:13

Re: VB.net with autohotkey.dll - functions?

11 Jan 2017, 10:26

Thanks for this advice but I'm not that taff to get the sense - nah - to get the functions out of it.
I'm also to stupid to use it correctly if I register the .dll of v1.

I want to combine scripts if the Checkbox is checked or not - but only ask for the Checked state if a button got clicked.
(Yea I do that with Strings at this point cause in my usual code I need them later)

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

KoHx3
Posts: 11
Joined: 08 Jan 2017, 09:13

Re: VB.net with autohotkey.dll - functions?

18 Jan 2017, 18:41

Hey there - I still have the Problem that I cant use the addscript command.
I'm using the v1 .dll (registered).

The following code wont work (Also tried as Module and other Sub- but nothing worked and I need help.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Any help? The only thing I can get to work is ahktextdll and ahkdll but I need to activate / deactivate the script If the checkbox is checked or not or something like this. D:
And this also should work on a computer without AHK installed. :/

Return to “Other Programming Languages”

Who is online

Users browsing this forum: No registered users and 1 guest