Jump to content
Sign in to follow this  
doggie

very newbie: calling a autoitscript from C and back to C, possible?

Recommended Posts

doggie

I have a fairly big existing autoit script. I want to call it from C via autoitx but stay in the same process. I hope that's possible? Or can I only call normal autoit(x) functions from C and not whole scripts?

Inside that script there are some computing intensive functions which would be faster in C, so I want to call external C functions, either in a DLL or that original .exe file. Pure exported C functions, no COM if possible. Is that possible with autoitx too?

Since I never ever did anything with autoit but used some Python, I explain it once more in python lingo: I want to embed autoit in a C program and then extend the autoit script I'm embedding with C functions.

If both things are possible it would be vrey nice if I could get some example source or a howto for it

As a special goodie: is there a profiler for autoit? or can I profile autoitscripts in any way?

Share this post


Link to post
Share on other sites
nfwu

Been long time since my last post.

I have a fairly big existing autoit script. I want to call it from C via autoitx but stay in the same process. I hope that's possible? Or can I only call normal autoit(x) functions from C and not whole scripts?

Inside that script there are some computing intensive functions which would be faster in C, so I want to call external C functions, either in a DLL or that original .exe file. Pure exported C functions, no COM if possible. Is that possible with autoitx too?

Since I never ever did anything with autoit but used some Python, I explain it once more in python lingo: I want to embed autoit in a C program and then extend the autoit script I'm embedding with C functions.

If both things are possible it would be vrey nice if I could get some example source or a howto for it

You can export your C functions as a DLL, then use AutoIt's DLLCall to call them from your existing AutoIt script.

#)

edit: as for that profiler, i never actually got round to completing it. TimerInit and TimerDiff will do in your case.

Edited by nfwu

Share this post


Link to post
Share on other sites
Richard Robertson

AutoItX contains a list of exported (DLL style) functions and a list of COM functions. It does not have the ability to run AutoIt scripts. It would most likely be slower to run a script through C program AND DLL.

Share this post


Link to post
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
Sign in to follow this  

×