Friday, October 22, 2021

#1 2021-07-22 08:20:23 am

From:: Prescott, Arizona
Registered: 2018-09-04
Posts: 1089

Script Debugger Reset Script

I recently began using Script Debugger and it's a marvelous app but after working on a script for a length of time the interface can become cluttered and out of sorts. So, I wrote the following script to reset Script Debugger to a default state of my preference. Every user's preferences will differ and this script is meant to be a template only.


-- Revised 2021.09.28

on main()
   set tabWidth to 500
   set tabIsHiddenBounds to {480, 23, 1440, 1080}
   set tabIsVisibleBounds to {300, 23, 1620, 1080}
   tell application "Script Debugger"
       tell script window 1
           set status bar visible to true
           set tabName to tab display mode
       end tell
       tell window 1
           if tabName = none then
               set bounds to tabIsHiddenBounds
               set tab width to tabWidth
               set bounds to tabIsVisibleBounds
           end if
       end tell
       tell document 1
           set debugger enabled to false
           set navigation bar visible to false
           set event log visible to false
           set result bar visible to false
           set result format to best -- use best or source code or AEPrint
           if tabName ≠ none then set tab display mode to result and variables tab
           set wrap lines to true
           set show line numbers to false
           set show tab stops to false
           set show invisibles to false
           set show code folding to false
           set selection to {1, 0} -- move cursor to position 1
           compile without showing errors
       end tell
   end tell
   tell application "System Events" to tell process "Script Debugger" -- enable if desired
       click menu item "Recompile" of menu "Script" of menu bar 1
   end tell
end main


Last edited by peavine (2021-09-28 07:50:47 am)

2018 Mac mini - macOS Catalina - Script Debugger 8



Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)