Jump to content

Multi threading?


Recommended Posts

Hello.

I have been looking through recent threads in this forum, and I saw a lot of functions related to memory and thread manipulation, like the thread creating function in kernel32.dll and similar. I wonder, with all these functions, would it not be possible to make a UDF to support multi threading in AutoIt? Like you could pass it a function name that would run in the background and call a defined function when it is done, like an event so that the program knows when the task is completed. This is just an idea, and it would be great to have, especially for me since I am writing a pretty advanced game in AutoIt which would work a lot faster if it had several threads.

I saw one post about multi threading, but that required that you run two Autoit processes at once and I don't really like that. So I'm wondering if there is a way to do it with just one process.

Any answer would be appreciated.

Regards

Philip Bennefall

Link to comment
Share on other sites

valik once sayd that autoit's core was not build with Multithreading in mind.

so this would mean lots of assembly injection/manipulation/stuff. to make it actually parse a function.

you could however just write a plugin in C++ and make that a thread.

Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

Yeah, the problem is I don't know c++, so I can't really write a plugin. Maybe someone could write a plugin that will simply execute an AutoIt function in an own thread that it makes and then call another function in your main thread that you define in the call?

Link to comment
Share on other sites

Try neogia's coroutine UDF http://www.autoitscript.com/forum/index.ph...45&hl=coroutine

This should be in support.

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
Link to comment
Share on other sites

  • Moderators

Yeah, the problem is I don't know c++, so I can't really write a plugin. Maybe someone could write a plugin that will simply execute an AutoIt function in an own thread that it makes and then call another function in your main thread that you define in the call?

If you are going to impliment "another" process that way, then why not just use the other vMultiThread options that are available? neogia wrote some options for it in this forum (Scripts and Scraps (P.S. - This forum is for posting scripts/scraps/code/etc... not questions :D )).

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

When I said make another thread, I did not mean start another process, just make a new thread in the same process. I am not sure if it is possible to do with a plugin, but it was just a thought I had. What I want to avoid is to have two programs running at the same time but still be able to execute more than one command at once.

And yeah, you guys are right, this is the wrong forum so I won't post any more in this topic but continue in the support section. My apologies.

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...