Jump to content

Help integrating external resources into AutoIt script


Recommended Posts

I know there are a lot of solutions to my problem, but since I don't really know much about real programming, I just get more and more confused when I read these forums.

Originally I had an AutoIt function to perform a very involved math calculation. However, the performance was very slow, taking 30-60 seconds for each call. Seeing as I need to call it 4 times approximately every 5 minutes, this was clearly unacceptable. I ported my code to PHP and uploaded the script to my web host. Now to perform the call, I used InetGet() and sent my parameters via the URL as GET variables. I saved the results to the @TempDir as a text file and did a FileRead() to get my return value. Although a complicated workaround, it got the job done, and it took only 2-10 seconds to do the whole thing.

However, my web host started getting on my case about CPU usage, so now I have to find a real solution, and with no real programming experience except AutoIt and web technologies, I don't even know how to start. Should I do something with DLL's? If so, how would I even go about doing that? Do I need to learn C/C++? Which one would allow me to execute the fastest?

Thanks in advance for all your help,

fss

Link to comment
Share on other sites

Autoit is fundamentally slow when it comes to any sort of calculation. Theres no good way around it usually.

I run into this problem frequently when processing large arrays or big calculations in autoit. If it has to do with data managment, i'll usually create a buffer of the size of my data, write to the buffer, then read from a pointer on a second script written in c or java to do the actual calculations. Then repeat the process to return a result to my first script.

This is probably a thousand times faster than doing the same thing in autoit, depending on the application.

Edited by Smorg
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...