scripting a click on a tab panel
Posted: Tue Mar 20, 2018 7:57 pm
Hi - is there a way to script a tab selection on a tab panel control? I've tried mouseUp and menuItem "tab 1" but those didn't work. I want to select a specific tab to open depending on a user's keyboard shortcut. Couldn't find anything else in the docs or forum yet to try. Thanks!
on rawKeyDown theKeyNumber
switch (theKeyNumber)
case 50 -- 2
if the ctrlKey is down then
send mouseUp ("Tab 2") to btn "tabpanel"
end if
break
case 51 -- 3
if the ctrlKey is down then
send mouseUp ("Tab 3") to btn "tabpanel"
end if
break
end switch
pass rawKeyDown
end rawKeyDown
on rawKeyDown theKeyNumber
switch (theKeyNumber)
case 50 -- 2
if the ctrlKey is down then
send mouseUp ("Tab 2") to btn "tabpanel"
end if
break
case 51 -- 3
if the ctrlKey is down then
send mouseUp ("Tab 3") to btn "tabpanel"
end if
break
end switch
pass rawKeyDown
end rawKeyDown