11-27-2006, 05:19 PM
Window name or +class must be specified. Then run will wait for that window (of that program) and store its handle into z. Also, may not work if run does not create new process but rather opens the document in an existing window. Then instead use z=wait(...) in next line.