Toggle Various Columns Script

Tags ( | )

I've written a short script I use to toggle certain columns on and off. I work in Widescreen mode usually which has limited space for culmns and so this also can if you wish toggle the layout between standard and widesreen.

You must have 'Enable access for assistive devices' checked in the Universal Access pref.pane


--Code below
-- List of columns to toggle - Enter whatever column names you like here
set glist to {"Comment", "Created", "Due Date", "Modified", "Rating", "Flagged", "Checkbox", "Read"}

-- Toggle the view between standard and widescreen?
set toggle to true

activate application "Mori"
tell application "System Events"
tell process "Mori"
try
if toggle is true then click menu item 1 of menu 1 of menu item "Layout" of menu 1 of menu bar item "View" of menu bar 1
repeat with i from 1 to count of items in glist
perform action "AXPress" of menu item (item i in glist) of menu 1 of menu item "Entries View Columns" of menu 1 of menu item "Columns" of menu 1 of menu bar item "View" of menu bar 1
end repeat
on error
tell application (path to frontmost application as text) to display dialog "Please check you have:" & return & "'Enable access for assistive devices'" & return & "Ticked in the Universal Access pref.pane"
end try
end tell
end tell

Version: 1
AttachmentSize
Column Toggler.scpt_.zip3.52 KB