Page 1 of 1

C++ in Autohotkey

Posted: 30 Oct 2017, 05:24
by CPLNet
Hi how can i run c++ script in autohotkey i found this but i don't have exactly what he mean

https://autohotkey.com/board/topic/9666 ... utohotkey/

greetz,

cpl.

Re: C++ in Autohotkey

Posted: 30 Oct 2017, 07:32
by CPLNet
help please

Re: C++ in Autohotkey

Posted: 30 Oct 2017, 07:36
by evilC
C++ is not script, it is compiled.
In order to use C++ code from AutoHotkey, you need to install Visual Studio, create the C code and compile it.
Then you gave to load the dll in your AHK code.

Do you specifically need C++?
It is possible to embed C# code in an AHK script using CLR.

Re: C++ in Autohotkey

Posted: 30 Oct 2017, 07:48
by CPLNet
ah yes not thinked to call dll in ahk lol !!

canu show me basic code to inject dll in process ?

geetz,

Re: C++ in Autohotkey

Posted: 30 Oct 2017, 08:34
by CPLNet
there is my code

Code: Select all

Process,Exist, hl.exe
If !PID:=ErrorLevel
 DllCall("LoadLibrary", Str, "harCs.dll")
but seem don't work.

greetz,
cpl.

Re: C++ in Autohotkey

Posted: 30 Oct 2017, 09:08
by evilC
Sorry, I know nothing about injecting DLLs into processes. I have no idea of whether it can be done with AHK

This code seems strange though: If !PID:=ErrorLevel

It says "Assign ErrorLevel to the variable PID, and if Errorlevel is non-truthy, then run this DllCall command"
It then does nothing with the variable PID, so I do not see why it does the assignment.

Re: C++ in Autohotkey

Posted: 30 Oct 2017, 09:08
by CPLNet
i need dll injector in ahk

i found some lib to usage btu not found dll injector in ahk..

Re: C++ in Autohotkey

Posted: 30 Oct 2017, 09:26
by jeeswg
how to dll Inject - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 67&t=27047
Run AHK code from within another process.

Re: C++ in Autohotkey

Posted: 30 Oct 2017, 09:32
by CPLNet
i have already found and tried this thread source but it seems not work

Re: C++ in Autohotkey

Posted: 12 Feb 2019, 04:22
by kasiek
Hey CPLnet, I seen your post on D3scene about the no spread, can you show me how to use