I posted this over at Apple's AppleCare AppleScript forum, but over there- I see a zillion questions and maybe 5 answers, so it looks like that forum is mostly visited by people with questions.
So I thought I'd ask here as well-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I'm writing a script using tabs.
I am unable to get the script, however, to change the attributes of a button.
I can get it to work perfectly on a blank window without using tabs, so the issue is the tabs.
Here is my code-
-=-=-=-=-=-=-=-=-=-=-
on resetButtons()
set home_path to path to "cusr" from user domain
set running to 1
tell application "Finder"
if (file "stopfold" of folder home_path) exists then
set running to 0
end if
end tell
if (running = 0) then
display dialog "DEBUG- running = 0"
set the enabled of button "Start Folding" of view "Folding Control Center" of window "Folding Control" to true
set the enabled of button "Stop Folding" of view "Folding Control Center" of window "Folding Control" to false
else
display dialog "DEBUG- running = 1"
set the enabled of button "Start Folding" of view "Folding Control Center" of window "Folding Control" to false
set the enabled of button "Stop Folding" of view "Folding Control Center" of window "Folding Control" to true
end if
end resetButtons
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
of view "Folding Control Center"
That I assume is my problem.
I think view is incorrect.
I've tried everything I can think of.
Unfortunately, Interface Builder doesn't tell you what it should be referred to, I tried TabViewItem since NSButton items are referred to as button- but that gave me no dice.
I have to use tabs.
I just can't figure out what the ************ applescript wants me to call them in order for me to be able to change the attributes of buttons etc. sitting on a tab!