Sign in to follow this  
Followers 0
E1M1

Need help with PluginOpen()

4 posts in this topic

I Have seen few examples about PluginOpen()

I tried

PluginOpen("testplugin.dll")
Main()

and

testplugin.dll:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace testplugin
{
    public class Class1
    {
        static void Main(string[] args)
        {
            Console.WriteLine("hello from plugin");
            Console.ReadKey();
        }
    }
}

and error:

D:\My Documents\cs\dll\testplugin\testplugin\bin\Debug\test.au3(2,6) : ERROR: Main(): undefined function.
Main()

What I do wrong? In example exripts there was 3 examples or 4 but the problem was thet plugins were closed source :S

Can anyone do 1 opensource plugin and then show how to use it?

Can I run plugin in background? so that it would repeat it's loop and autoit would do it's ownloop at same time.


edited

Share this post


Link to post
Share on other sites



tnx, how to make dll run so that it wont pause my script?


edited

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

tnx, how to make dll run so that it wont pause my script?

Autoit natively doesn't support multithreading.

So it's quite difficult.

You can do some mutlithreading inside your DLL (not related to Autoit's GUI).

You can use timers, in this way you can achieve invoking your function even if main Autoit script is working on something.

But it will pause main script, execute function and unpause main script, so it's not multithreading.

#Include <Timers.au3>
_Timer_SetTimer($hWnd[, $iElapse = 250[, $sTimerFunc = ""[, $iTimerID = -1]]])
Edited by Zedna

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  
Followers 0