Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to force getting the numerical values of WindowMargins instead of Automatic for a window?

For example let say I want to create a new Notebook that is $62$ pixels below and $62$ pixels to the right of the current EvalutaionNotebook. If I run the following it sometimes works and sometimes doesn't depending on the window position on the current screen.

x = CurrentValue[EvaluationNotebook[], "WindowMargins"];
   Cell["Some text.", "Text"]}],
 WindowMargins -> {
   {x[[1, 1]] + 62, Automatic},
   {Automatic, x[[2, 2]] + 62}

For example sometimes the expression throws an error and results in the following because Mathematica is returning a different answer.

 {{131, Automatic}, {Automatic, 62 + Automatic}}
share|improve this question
up vote 4 down vote accepted

AbsoluteCurrentValue should do what you want:

AbsoluteCurrentValue[EvaluationNotebook[], "WindowMargins"]
(* {{624, -2}, {-47, -19}} *)
share|improve this answer
Thank you for the quick response. I should have checked the docs (Both Google and turned up nothing in my initial search). Oh well silly me. – Liam Dec 12 '13 at 18:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.