Monday, July 26, 2021

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

peavine
Member
From:: Prescott, Arizona
Registered: 2018-09-04
Posts: 971

Script Debugger Reset Script

I recently began using Script Debugger and it's a marvelous app but after working on a script for a bit 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.

Applescript:

on main()
   set theTabWidth to 465
   set narrowWindowBounds to {460, 23, 1460, 1080} -- used if a tab is not displayed
   set wideWindowBounds to {370, 23, 1550, 1080} -- used if a tab is displayed
   
   tell application "Script Debugger"
       tell document 1
           set theVisibleTab to tab display mode
           set debugger enabled to false
           set selection to {1, 0} -- move cursor to upper-left corner of document
           set wrap lines to true
           set event log visible to false
           set navigation bar visible to false
           set result bar visible to false
           set show line numbers to false
           set show code folding to false
           set show tab stops to false
       end tell
       tell window 1
           set status bar visible to true
           if theVisibleTab = none then
               set bounds to narrowWindowBounds
           else
               set tab width to theTabWidth
               set bounds to wideWindowBounds
           end if
       end tell
   end tell
end main

main()

Last edited by peavine (2021-07-22 08:55:42 am)


2018 Mac mini - macOS Catalina - Script Debugger 8

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)