10
$\begingroup$

I'm running Mathematica 8 on Windows 7. When I start the Mathematica front end, I would like the menu bar and the blank notebook that opens to appear at a different position and with a different size from what they do by default.

(By default the menu bar appears at the top of the screen and the blank notebook appears below it on the left side of the screen. I would like to try having the menu bar and notebook appear resized to about 350px wide and positioned in the upper right corner of the screen: enter image description here .)

$\endgroup$
2
  • $\begingroup$ did you try playing with the WindowSize and WindowMargins options in Global Preferences > Notebook Options> Window Properties> in Option Inspector in Format Menu? $\endgroup$
    – kglr
    Feb 5, 2012 at 1:51
  • $\begingroup$ @kguler When I change, for example WindowOpacity, the windows' opacity changes, but when I change WindowSize, nothing seems to change. $\endgroup$
    – Andrew
    Feb 5, 2012 at 2:08

2 Answers 2

5
$\begingroup$

( Think out of the box? ) - Start Mathematica with a Windows macro ( any recorder will do ). First record the start of MMa and the resizing / moving of the menu bar and so on, then use the recording to start MMa.

$\endgroup$
5
$\begingroup$

Thank you Nilo for pointing me in a direction that was productive. I used the software AutoHotkey. A recorder wasn't necessary.

The following script does the job. I set the width of the windows to 350px. My screens have a total width of 1600px*2=3200px, so the left edges of the windows have X coordinate 3200-350=2850.

; start Mathematica and put it in the corner with the shortcut Windows key+C
#c::                           
   Run C:\Users\Andrew\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Wolfram Mathematica 8.lnk
   Sleep, 100
   WinWait, Untitled-1, 
   IfWinNotActive, Untitled-1, , WinActivate, Untitled-1, 
   WinWaitActive, Untitled-1, 
   WinMove, ,, 2850, 75, 350, 300
   WinMove, Wolfram Mathematica,, 0,0, 350
   WinMove, Wolfram Mathematica,, 2850, 0
return

For the Run command I used the taskbar shortcut because I have Mathematica pinned to my taskbar and running the .exe created a new taskbar icon beside the pinned one instead of just activating the pinned icon. Note that if Mathematica is already running when this script is executed the result may not be as expected.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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