Jump to content

need help converting this C++ in to autoit


Recommended Posts

I need help converting this C++ script in to auto it

void drawSomeText()
{
    PVOID address = GetProcAddress(GetModuleHandle("dxhook.dll"), "DrawText");
    LPCTSTR text = "Woah ! Drawing text on rakion !";
    int x = 200;
    int y = 150;
    int charHeight = 24;
    char* fontName = "Arial";
    DWORD color = 0xFFE4F740;
    DWORD time = 10;

    if(address == NULL)
    {
        MessageBox(NULL, "We couldnt find dxhook.dll...maybe you arent using Rakion Kit??? or maybe the Rakion Kit version is too old :(", "", NULL);
        return;
    }

    __asm
    {
        push time
        push color
        push fontName
        push charHeight
        push y
        push x
        push string
        mov eax, address
        call eax
    }
}

http://img50.imageshack.us/img50/1021/pic1du3.jpg

basiclly in C++ is suppose to resize a full screen game name Rakion MMOPRG game in to windows mode need help converting in to auto it . thanks

please forgive if this is in a wrong section.

Edited by SroMaster

[center]dbod.rar player created by auto3.0Visit Topic here==>[font="Arial Black"]CLICK HERE[/font]<==PovClipse tutorial:Similar to auto it , with this you can make anything[/center]

Link to comment
Share on other sites

I need help converting this C++ script in to auto it

CODE
void drawSomeText()

{

PVOID address = GetProcAddress(GetModuleHandle("dxhook.dll"), "DrawText");

LPCTSTR text = "Woah ! Drawing text on rakion !";

int x = 200;

int y = 150;

int charHeight = 24;

char* fontName = "Arial";

DWORD color = 0xFFE4F740;

DWORD time = 10;

if(address == NULL)

{

MessageBox(NULL, "We couldnt find dxhook.dll...maybe you arent using Rakion Kit??? or maybe the Rakion Kit version is too old :) ", "", NULL);

return;

}

__asm

{

push time

push color

push fontName

push charHeight

push y

push x

push string

mov eax, address

call eax

}

}

http://img50.imageshack.us/img50/1021/pic1du3.jpg

basiclly in C++ is suppose to resize a full screen game name Rakion MMOPRG game in to windows mode need help converting in to auto it . thanks

please forgive if this is in a wrong section.

That assembly isn't really necessary. But all you need to do is a dllcall to 'dxhook.dll' with the parameters. Also, by the looks of it, are you sure it resizes a fullscreen game to windowed mode? It looks like it just draws text in the DirectX window.

I don't know the return type, so I'll assume it's an HRESULT.

Func _DrawText($szString, $szFontName, $nX, $nY, $nCharHeight, $dwColor, $dwTime)
       return DllCall("dxhook.dll", "long", "DrawText", "dword", $dwTime, "dword", $dwColor, "str", $szFontName, "int", $nCharHeight, "int", $nY, "int", $nX, "str", $szString)
EndFunc

You might have to fiddle with that for a while, but that should be generally what your looking for.

Link to comment
Share on other sites

that should be generally what your looking for.

Except all DllCall function params in reverse order. In ASM first parameter is pushed last. Edited by Siao

"be smart, drink your wine"

Link to comment
Share on other sites

That assembly isn't really necessary. But all you need to do is a dllcall to 'dxhook.dll' with the parameters. Also, by the looks of it, are you sure it resizes a fullscreen game to windowed mode? It looks like it just draws text in the DirectX window.

I don't know the return type, so I'll assume it's an HRESULT.

Func _DrawText($szString, $szFontName, $nX, $nY, $nCharHeight, $dwColor, $dwTime)
       return DllCall("dxhook.dll", "long", "DrawText", "dword", $dwTime, "dword", $dwColor, "str", $szFontName, "int", $nCharHeight, "int", $nY, "int", $nX, "str", $szString)
EndFunc

You might have to fiddle with that for a while, but that should be generally what your looking for.

yep it does it will work well. just need to implement the .dll in to .au3 any other suggestion man.

[center]dbod.rar player created by auto3.0Visit Topic here==>[font="Arial Black"]CLICK HERE[/font]<==PovClipse tutorial:Similar to auto it , with this you can make anything[/center]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...