Jump to content

send information do a seperat process


tlman12
 Share

Recommended Posts

I was wondering if there is anyway for autoit to send information from one process to a "parent" or seperat process

example of what i want to do

a main application with a gui that will have multiple progress bars and will launch multiple other executables. what would i put in the secondary executables so they can report infomation of their progress to the main gui?

Link to comment
Share on other sites

that appears to be exactly what i want :D excpet for one flaw that i can't seem to figure out...

it send text inclosed in "" just fine or a guictrlread of a txt box or inputbox but i can't seem to get it to send the result of an equasion like

$p = $p + $Temp

$data = $p

if _IsReceiver($reciever) then

MsgBox(0,"",$reciever & " Found" & @CRLF & "trying to send "&$data)

_MsgSend($reciever, $data)

endif

in this particular script $temp is calculated based on the reletive size of a file against the total size of the whole

$p is a running total i want to send $p to a progress bar on my main gui

$p is calculation correctly and i have a message box that tells me the number it's senting but it never makes it to the main gui

if i change $data = $p to $data = "1.29885" for example it sends it to the main gui and sets the progress perfectly

i don't know if it's something i'm doing wrong or if it is a limitation of the script but any help would be great

thanks

Link to comment
Share on other sites

how do i write a function with an optional variable?

like _FuncName($Var1,$Var2,$OptionalVar3)

But why?

EDIT:

_MsgSend($reciever, $Var1 & "|" & $Var2 & "|" & $OptionalVar3)
...
$aData = StringSplit($Msg, "|")
...
Edited by Yashied
Link to comment
Share on other sites

But why?

EDIT:

_MsgSend($reciever, $Var1 & "|" & $Var2 & "|" & $OptionalVar3)
...
$aData = StringSplit($Msg, "|")
...

sorry i think you misunderstood that

that question is separate from the previous one, what i meant was i want to creat a new function

Func _FuncName($var1,$Var2,$Optvar1)

endfunc

but like if you speficy 3 variables when you write a function and you don't call it with 3 variables the script fails

i need to create a function with 2 required variables and one that is optional

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...