Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/05/2023 in all areas

  1. jugador

    RegisterActiveObject

    reference post https://www.autoitscript.com/forum/topic/202618-implementing-irunningobjecttable-interface/?do=findComment&comment=1525707 Main.au3 #include "RegisterActiveObject UDF3.au3" __ExampleA() Func __ExampleA() Local $s_Clsid Local $o_object = __RegisterActiveObject(Default, $s_Clsid) If @error Or Not IsObj($o_object) Then Return Local $aArray[2] = ["Item A0", "item A1"] $o_object.add("String", 'Apple') $o_object.add("Number", 12345) $o_object.add("Array", $aArray) ConsoleWrite('$o_object -> Count item: ' & $o_object.Count & @CRLF) RunWait( @AutoItExe & " /AutoIt3ExecuteScript " & '"Client.au3" ' & $s_Clsid) ConsoleWrite('$o_object -> Count item: ' & $o_object.Count & @CRLF) __RevokeActiveObject() EndFunc Client.au3 MsgBox( 0, "Client", "Client Started" ) __Client($CmdLine[1]) Func __Client($o_Clsid) Local $m_object = ObjGet("", $o_Clsid) If Not IsObj($m_object) Then Return MsgBox(0, "Client", '$m_object -> Count item: ' & $m_object.Count) $m_object.add("Double", 567.55) MsgBox( 0, "Client", "client End" ) EndFunc for connect to vbscipt change this line of Main.au3 RunWait( @AutoItExe & " /AutoIt3ExecuteScript " & '"Client.au3" ' & $s_Clsid) to RunWait( 'wscript.exe "Client.vbs" ' & ObjName($o_object, 3)) Client.vbs Dim Arg Arg = WScript.Arguments(0) Set M_object = GetObject(, Arg) msgbox VarType(M_object) & " " & TypeName(M_object) msgbox M_object.Count M_object.Add "Double", 567.55 Set M_object = Nothing RegisterActiveObject UDF2.au3 RegisterActiveObject UDF3.au3
    2 points
  2. Understand now what the issue is you were solving! thanks for that and I have uploaded an updated zip file to also handle the Strings AutoComplete correctly. It also fixes the Removing the rest-string in case that is equal to the end of the AutoComplete word.
    2 points
  3. You need to consider your setup in gory detail. Triggering the switches is just one of the remaining problems. If you use mosfets, then you need to realize they can't cope with alternating voltages at drain-source. Also isolation between 8 or so devices to switch is not granted and it also comes with the question about isolation from the PC (or other device) triggering the switches from the reference voltage of the switches devices! Grounding together the PC and up to 8 distinct devices will most probably causes serious issues, noise, damage, frustration. So yes, you need opto-coupling at the trigger inputs. Since you don't have 8 (or so) lines out of the PC, you also need some USB to 8 digital lines device. Then if the phototransistor of the stock PC817 can reliably switch any of the 8 (or so) devices, then you're fine since the 8 emitters of the 8 PC817 are isolated from each other. But if you need more switching power for any of the switched device, then you need another layer or a more capable optocoupler, e.g. TLP350 (but these then need higher power supply). I attach the datasheet for the typical PC817 and TLP350. Note that the output max current is about 30mA @ 5V. PC817X.pdf TLP350.pdf
    1 point
  4. I didn't said that it cannot be done in AutoIt. Give us more details so we can give you a more precise answer.
    1 point
  5. Nine

    Function within a Function

    Your missing $ before Case Create_SM_Folder
    1 point
  6. Why 16? A relay is basically a switch and probably the relays they use are SPDT (simple pole dual positions). For SSR (solid-state relays) the specifications for switched voltage and current are more important than standard relays (typically 10A 250V~). You still haven't specify what you need. Are you switching low analog signals, which frequency range, high-current loads, halogen lamps, ceramic oven, you name it?
    1 point
×
×
  • Create New...