Jump to content

Threading...


Guest larkstern
 Share

Recommended Posts

Guest larkstern

I was wondering if autoit in any way supports multi threading.

Task: I want to parse a message log file.

I need to make a script that will continuely parse a file, that is constantly changing, and report things to another script.. for instance every time it sees a certain string $magicword.

this needs to go on behind the scenes while other scripts are running.

Is this possible with autoit?

thanks much.

+larks

Link to comment
Share on other sites

I don't see why multi-threading would be necessary for that task, however, to answer your question, no, multi-threading isn't available in AutoIt.

There are multiple ways to communicate to another script, such as writing to a file, changing a window title (Using a handle to the window you want to change the title of would be useful...), writing to the registry, et cetera.

Link to comment
Share on other sites

  • Administrators

I was wondering if autoit in any way supports multi threading.

Task:  I want to parse a message log file.

I need to make a script that will continuely parse a file, that is constantly changing, and report things to another script.. for instance every time it sees a certain string $magicword.

this needs to go on behind the scenes while other scripts are running.

Is this possible with autoit?

thanks much.

+larks

You can always use an ADLIB function. You just tell it to execute every couple of milliseconds to do an operation on your file and then it can set a global variable to something if required.

In v2 ADLIB used to be purely for waiting for a rogue window to appear, but in v3 the adlib function can do anything you want - it just acts as another function that is run on a timer. However, while the adlib function is executing your main script is paused until the adlib finishes.

Link to comment
Share on other sites

  • Administrators

Heh, I saw

on the main page and thought, "Is Valik going to add multi-threaded support to AutoIt?!?"

I was slightly disappointed B)

The MsgBox function has always been multithreaded (to support the timeout feature).

There, happy? :whistle:

Link to comment
Share on other sites

Heh, I saw

on the main page and thought, "Is Valik going to add multi-threaded support to AutoIt?!?"

I was slightly disappointed :whistle:

No way in hell I'm trying to add that. That would be less fun than shooting myself in the crotch with a nail gun.
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...