active doc question
Page 1 of 1

Author:  js [ 2014-05-03 06:53:40 ]
Post subject:  active doc question

I have an open document called "MYDOC". I would like to test whether it is active and if not make it active. I wrote

$doc =
if $doc = "MYDOC"
   prompt "$doc is active"
   Document.setActive $doc

What's wrong with this? The macro doesn't complain. But whether MYDOC is actually active or not, I always get the answer that it is.

Author:  phspaelti [ 2014-05-03 15:36:39 ]
Post subject:  Re: active doc question

Two problems:
  1. "=" is an assignment, "==" is a comparison
  2. $doc is an object
if $ == "MYDOC"

Author:  js [ 2014-05-04 06:23:28 ]
Post subject:  Re: active doc question

Glad to have you helping. Thank You.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group