Toggle "Tap to Click" Almost working, need halp

Hello!

Let me preface this and say I'm a total nub.

I'm creating a button on the touchbar that toggles on and off "Tap to click" in the Trackpad window of System Pref.. Its like 99% of the way there.

Here is how I have it set up now:
Do this on click (Predefined Action):

tell application "System Preferences"
activate
end tell
tell application "System Events"
tell process "System Preferences"
delay 1
click the menu item "Trackpad" of the menu "View" of menu bar 1
delay 0.5
click checkbox 3 of tab group 1 of window "Trackpad"
end tell
end tell

tell application "BetterTouchTool"
refresh_widget "FDBD1CDA-2089-4749-BC53-FDECD2996959"
end tell

delay 0.5

tell application "System Preferences"
quit
end tell

This refreshes the Main widget, which is set to run script and return value:

if application "System Preferences" is running then
tell application "System Events"
tell process "System Preferences"
set tapToClick to checkbox 3 of tab group 1 of window "Trackpad"
tell tapToClick
set checkboxStatus to value of tapToClick

if checkboxStatus is 0 then
return "OFF"
end if

if checkboxStatus is 1 then
return "ON"
end if

end tell
end tell
end tell
end if

This all works great, the once difficulty I'm having is I only know how to get the state of the checkbox when the Trackpad window is open. So for example, when when BTT restarts or starts up for the first time, since the System Pref. windows isn't open and I haven't clicked the toggle button, it doesn't open the Trackpad window and can't return the state of the checkbox. It just returns the name of the widget and I have to toggle the button for it to update to ON or OFF.

Ideally:

  1. I would like the on click action to run without halving to open any windows, but I'm not sure if possible?

  2. How can I check the state of a checkbox in the background? ie: How can I get if the checkbox is on/off without opening the preferences and having it check.

2a) Is there a way for it to 'remember' the last return value. ie: If on last instance it was 'ON' and I restart BTT can I just have it return the last value of "ON" ?