voidFF Posted May 15, 2017 Share Posted May 15, 2017 Hi. first sorry for my bad frensh english. i dont know how to multithread, but i have two alternative. you can create two scripts or executable and: 1- Use TCP or UDP to emulate comunication. 2- Create variable (buffer) in each process and use memory read and memory write to emulate comunication. must dificult because you nead to kno process base adress, pointer and offset of memory variable in each process. AdlibRegister can be useful. Peace and evolutio! Link to comment Share on other sites More sharing options...
jchd Posted May 15, 2017 Share Posted May 15, 2017 That is IPC (Inter-Process Communication) and definitely not mylti-threading. It has been discussed ad nauseum that AutoIt will never go this route. Yet you can surely use IPC at will. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
voidFF Posted May 15, 2017 Share Posted May 15, 2017 useless answer. I have a last idea. You can use the autoit dll with another langage langage like c++ and you can multithread. Link to comment Share on other sites More sharing options...
jchd Posted May 15, 2017 Share Posted May 15, 2017 Still no. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
junkew Posted May 15, 2017 Share Posted May 15, 2017 Although still no multithread since short we host .net clr in AutoIt and with that you can multithread. We just need a clear example then on what we feel is real multi threading from AutoIt. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
voidFF Posted May 17, 2017 Share Posted May 17, 2017 On 15/05/2017 at 4:11 PM, voidFF said: I have made a exemple Spoiler // To use: // - Copy AutoItX3_DLL.h and AutoItX3_DLL.lib into the project folder. // - Add AutoItX3_DLL.lib to the linker input files. // AutoItX3.dll / AutoItX3_x64.dll needs to be in the run path during execution. // Compile with /MD or /MT #include "AutoItX3_DLL.h" #include <thread> // Thread include. void thread_1() { AU3_Send(L"OOOOOOOOOOOOO", 1); } void thread_2() { AU3_Send(L"IIIIIIIIIIIII", 1); } int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); AU3_Run(L"notepad.exe", L"", 1); AU3_WinWaitActive(L"Sans titre - Bloc-notes", L"", 0); std::thread thread_1_(thread_1); // Thread 1 std::thread thread_2_(thread_2); // Thread 2 thread_1_.detach(); // Run thread_2_.join(); // Run + Wait return 0; } Output : oIoIoIoIoIoIoIoIoIoIoIoIoI Link to comment Share on other sites More sharing options...
junkew Posted May 17, 2017 Share Posted May 17, 2017 nice but thats not from AutoIt.Exe. I know in general multithreading and so far it was allways a no and not on the to do list see #39 https://www.autoitscript.com/wiki/FAQ but as we now can host .NET CLR Runtime I do not see a reason why you cannot run a C# routine (even embedded from a memory string) with some threads calling AutoIt functions. (and deal with thread safety in the C# part). I think I would define it as MT from AutoIt when All threads share a common heap (from AutoIt) that seems possible when we host the CLR Runtime. But I am not in the Multi Threading area from .NET and what kind of rules you should follow to callback to 1 instance of AutoIt.Exe that starts CLR C# and starts 2+ threads and calls back 1 or multiple functions of AutoIt. The examples in CLR.AU3 give examples on how to callback AutoIt function but would be nice if a more expert would give CLR.AU3 a try to see if you can reach the Multi threading from AutoIt (in a stable way). FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
jchd Posted May 17, 2017 Share Posted May 17, 2017 I'm not sure that the AutoIt3X DLL is thread-safe without some kind of mutex to insure thread safety. Ascertaining these points would require looking very closely at the source, which is reserved to a few, technically to the sole Jon in practice. For instance, how would @error, @extended behave in all situations, just to point to obvious things? This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
LarsJ Posted May 18, 2017 Share Posted May 18, 2017 junkew, It's still not the AutoIt code, that's multi threading, It's the C#/VB code. There is nothing new in that at all. We've always been able to implement multi threading in a DLL file. When you're running C#/VB code through .NET CLR it's run in the same way as the code in a DLL file. You can save the C#/VB code in a DLL file. The only difference is that it's run as managed code. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now