Recently Browsing 0 members
No registered users viewing this page.
A tiny UDF that can shoot magic packets at your computers to wake them the heck up. All credits to Olish.
The only parameter it needs to be specified – is your machine's MAC-address (ip address (the second parameter), at which you will be sending magic packet is generating automatically from @IPAddress1 macro)
_WoL_WakeDevice('001CC0CAED7A') ; the second parameter (if necessery) must be a broadcast address of your local network segment (i.e. 192.168.0.255 for a network 192.168.0.0)
In the ZIP is the code and the compiled script.
This is yet another ping the LAN utility.
Is quite fast, as gathering the info. is forked.
The Save Note, saves a note for the given MAC ( you may find it handy )
The Save MACs, saves the listview to an INI file that can be later use for the WakeOnLAN
Right click will bring a context menu to do stuff. DClick will refresh the Ping.
That's it. Comes in handy to have in the USB toolbox
Forking and threading.
They both do stuff while another loop or event handler, does it's thing.
Load a DLL, and ask for a function or procedure to run, and it'll do it.
Handling all those takes time waiting, or to come up with semaphores and mutex and what not.
So the issue at times is that we want to have all that in AutoIt and there comes the OMGs.
To me, it all comes to run something and not get the main loop stuck waiting, unresponsive, as if frozen. ( oh, there is no threading in AutoIt, what can I do ! )
Hence this UDFish ( I'm not good at technical writing 😕 ), that has these functions:
#cs === User Calltips: =============================================================================================== _Fork_Startup() Init. UDF - Place on your main script once everything is declared. _Fork_StartupOnFailMsgBox([$ShowMsgBox = Default]) Default = (not @compiled), True = Show error MsgBox(), False = Do Not show error MsgBox() _Fork_Func([$sFunction = Default], [$vParameter = ""], [$sExtraCmdLine = ""], [$iUseBase64Cmd = 0], [$sVerb = ""]) Starts another Process and Execute or Call $sFunction, Returns PID. _Fork_SetReceiver([$sFunction = ""]) Register/Unregister IPC Receiver Function. _Fork_GetReceiver() Get IPC Receiver Function name. _Fork_GetParentPID() Get the parent PID. _Fork_GetWinInfos([$AutoItWinTitlePrefix = Default],[ $ForkPID = ""]) Get an array of Forked Processes _Fork_CallArgArraySeparatorChar($sChar = Default) Default = Opt("GUIDataSeparatorChar") _Fork_AutoItWinTitlePrefix([$sPrefix = Default]) Returns the prefix, or set it by passing a new string. _Fork_ForkReceiverGuiTitlePrefix([$sPrefix = Default]) Returns the prefix, or set it by passing a new string. _Fork_ProcessGetWinList($vProcess, $sTitle = Default, $iOption = 0) Enumerates Windows of a Process. _Fork_WaitForReceiver($iPidChild, [$iTimeout = 60 Sec]) wait for _Fork_SetReceiver() to load via AutoItWinSetTitle(). _Fork_WaitForFork($iPidChild, [$iTimeout = 60 Sec]) wait for _Fork_Func() to load via AutoItWinSetTitle(). _Fork_Send($vPidOrHWnd, $sMessage,[$iTimeout = 500 mSec],[$fAbortIfHung = True]) Send IPC Message to Process via PID or hWnd. _Fork_Broadcast($sMessage, [$iTimeout = 500 mSec], [$fAbortIfHung = True], [$iDelayMs = 0], [$iExcludeSelf = 1], [$WinCloseAll = 0]) Send IPC Message broadcast to all in _Fork_AutoItWinTitlePrefix(), see comments. _Fork_DuplicateHandle($dwSourcePid, $hSourceHandle, $dwTargetPid = @AutoItPID, $fCloseSource = False) Returns a Duplicate handle. _Fork_GetVerUDF() Returns the version of this UDF. _DbgAid_SetActive([$Active = Default]) Enable sending data for debug: Default = Auto (True if Win found), True = Enable, False = Disable. _DbgAid_GetActive() Query Active state. _DbgAid_GuiTitle([$sTitle = Default]) Get or Set the GUI title for the debug receiver. _DbgAid_SelfName([$sSelfName = Default]) Get or Set a short name to be identified by. _DbgAid_Send($sString[, $iForceType = Default]) Send a string to the debug GUI. _DbgAid_SendVia([$iType = Default / $e_ForkDbgAid_ViaCOPYDATA / $e_ForkDbgAid_ViaMailslot]) Get / Set _DbgAid_Send() type. #ce === User Calltips: =============================================================================================== I believe that, with these functions, one can run a function in any count of other PIDs, communicate back and forth with any of them, and a console of sorts, to send data to follow what is happening with those other instances.
This is basically a rewrite of "Another Multi Process Helper" by @piccaso. The functions not ported, I decided to not port. The renamed functions, are renamed to simplify the understanding of what they do, from a view of a ... me
I did this because I'll need it in an upcoming project, and share it to aid those, that may find this, simple to implement in their code.
Try the examples from SciTE ( or your editor ) and read the code, as there are notes explaining how it works.
As always, share your views and improvements.
If you have coding questions, kindly place them in "AutoIt General Help and Support".
_Fork_UDF(v2019.06.29d).zip ( current version )