Jump to content

InterProcessCommunication with a simple array


 Share

Recommended Posts

Hi, Im trying to get an array from script A to a script B function. '?do=embed' frameborder='0' data-embedContent>>

This UDF im using seemed perfect for my intentions but when i run these scripts i get a freeze on the ArrayDisplay and i have to end script2 with task manager.

These are my examples, originally i wanted to pass through an array that contains results from a StringRegExp, but i realized even a simple array doesnt work. Help with this UDF or presenting another similar option is much appreciated.

 

script1

#Include <Array.au3>
#Include "InterProcess.au3"

Dim $aArray[11] = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, "teststring"]

If _IPC_IsStarted("script2.exe") Then
   _IPC_CallRemote("script2.exe", 5000, "_ArrayTest", $aArray)
EndIf

script2 - start this .exe first

#Include <Array.au3>
#Include "InterProcess.au3"

_IPC_Startup()

While 1
    Sleep(500)
WEnd

Func _ArrayTest($array)
   _ArrayDisplay($array)
EndFunc

Edit: [sOLVED, i think]I did a For loop through the array and displayed it in a Msgbox instead of using Arraydisplay and it seems to work for now. Could have been a problem with arraydisplay only. But i think this UDF doesnt accept arrays that are 1 length, so i just added length as $array[0] and the rest is data.

Edited by dusty071
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...