Sign in to follow this  
Followers 0
tlman12

send information do a seperat process

9 posts in this topic

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?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

_MsgSend($reciever, String($data))

awesome

worked perfectly

nice UDF

Share this post


Link to post
Share on other sites

Should i open a new topic for this or can you answer it?

how do i write a function with an optional variable?

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

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0