Page 1 of 1

fullscreen without toolbar and rulers

Posted: 2012-08-27 15:27:42
by js
I would prefer to work in full screen without toolbar and rulers and get them back in normal view.

I tried this:

Code: Select all

Set Toolbar Shown false
Set Rulers Shown false
Enter Full Screen 
to which I wanted to add conditions for showing / hiding in the right moment. But the 3 lines don't properly work as they stand. What did I do wrong?

Re: fullscreen without toolbar and rulers

Posted: 2012-08-27 16:10:40
by martin
js wrote:What did I do wrong?
On the surface, you didn't do anything wrong. However, the reason the Toolbar shows in Full Screen mode is because Apple always shows it whenever you switch to full screen no matter what (you can observer Mail.app has the same behavior). So, the first attempt at fixing this looks like this:

Code: Select all

Set Rulers Shown false
Enter Full Screen
Set Toolbar Shown false
Unfortunately that doesn't work either, because of Apple's full screen animation. Apparently the toolbar state is not changed immediately when the command is invoked, but at some transitionary point during the animation. So we need to add a delay, eg:

Code: Select all

Set Rulers Shown false
Enter Full Screen
Sleep 1
Set Toolbar Shown false
That works for me, though you might need to adjust the one second delay depending.

Re: fullscreen without toolbar and rulers

Posted: 2012-08-28 06:05:59
by js
Thank you. This (mostly) works.

Speaking of the toolbar alone: How can one test if the Toolbar is visible or not, in order to have a macro work as a button that puts it either on or off?
I can't find this in the Macro Reference.

Re: fullscreen without toolbar and rulers

Posted: 2012-08-29 14:39:34
by martin
There's no special macro commands for checking the toolbar, but you can just have a peek to see if the menu is checkmarked or not:

Code: Select all

$isVisible = Menu State ":View:Toolbar:Show Toolbar"
If $isVisible
	Prompt "Toolbar is currently visible."
Else
	Prompt "No toolbar here!"
End

Re: fullscreen without toolbar and rulers

Posted: 2012-08-30 01:30:41
by js
Thank you. This is very helpful.