AutoIt3 integration

I built my product with AutoIt3, a freeware BASIC-like scripting language. Not very sophisticated I know, but it works well for my product. I look forward to someday rewriting it (or having it rewritten) in another more efficient language but for now this is what I have.

Can you give me any hints on how to integrate TurboActivate into it? I could even work with some clues about which examples you already have that might be the most useful for me.

I can just use the Inno Setup method but, if I understand correctly, to have in-application purchasing I need to integrate.

I look forward to using this great product.

Hey John,

Can you give me any hints on how to integrate TurboActivate into it? I could even work with some clues about which examples you already have that might be the most useful for me.

Sure, there are a few resources you can use. One resource is AutoIt's documentation (Start -> AutoIt 3 -> AutoIt Help File). Then go to the DllCall help article. This gives you an in-depth intro into what you need to do to call TurboActivate dll functions.

So then the question becomes, what are the function definitions. For that you can download the Windows TurboActivate pack on your API page. Then look in the API/C folder for the TurboActivate.h file. This lists all the functions, their return codes, and what they do.

For example, the "CheckAndSavePKey()" function is listed as the following:

TURBOACTIVATE_API HRESULT TA_CC CheckAndSavePKey(STRCTYPE productKey, uint32_t flags);

In AutoIt this translates to the following:

DllCall($ta_dll, "int:cdecl", "CheckAndSavePKey", "wstr", $pkey, "UINT", $flags)

But in AutoIt there's the added complication that you need to open the TurboActivate.dll before you use any functions, and then leave it open until the close of your application. So to open TurboActivate.dll do it like this:

; Open the TurboActivate dll on a global scope (so it can be used throughout your appGlobal $ta_dll = DllOpen("TurboActivate.dll")

Then, at the close of your application you can release the TurboActivate dll like this:

; Close the TurboActivate dll somewhere when your app closes.DllClose($ta_dll)

So an example using CheckAndSavePKey() might look like this:

Local $pkey = "ABCD-EFGH-IJKL-MNOP-QRST"Local $result = DllCall($ta_dll, "int:cdecl", "CheckAndSavePKey", "wstr", $pkey, "UINT", 1)

Does that make sense?

>>Does that make sense?

Not at this point, but you have given me enough to work on. 😉

Thank you for the quick reply! 😀

Not at this point, but you have given me enough to work on.

Ok, if you need any help (or clarifications) just ask.