Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
checking state of variable on another computer
#1
Hi,
I am trying to do a "wait for variable" step but the variable will be set depending on whether a window is present on another networked computer i.e.

on Computer A:
run functionon Computer B

on computer B:
if certain window is present, tell computer A

on computer A:
If computer B told me that window is actually present, then stop the intitial function, else continue macro: DO ACTION

I currently tried doing it with computer B sending variable back to computer A, which sets a global variable in a separate function. Depending on the global variable, the initial function on computer A, would then continue but it seems not to be able to "hear" the global variable changing once it's started...(I think)

Sorry not to send actual code, I think my problem is one of approach rather than syntax. Any suggestions on how to approach this. Synchronization has always been a weak point with me.
Thanks!!
Stuart
#2
Computer A

Macro
Code:
Copy      Help
str s
int e=net("computer" "password" "Function62" s)
if(e) end "failed, %i" 0 e
if(val(s))
,out "window exists"
else
,out "window does not exist"

Computer B

Function Function62
Code:
Copy      Help
;\
function#
ret win("Notepad")
;ret wait(0 WC win("Notepad"))


Forum Jump:


Users browsing this thread: 1 Guest(s)