Open A MacLoggerDX Panel

Description

There are 10 names of panels in the MacLoggerDX screen: “Log”, “Map”, “Bands”, “DXClusters”, “Schedules”, “Awards”, “Memories”, “QSL”, “History”, and “Labels”. The name of a panel is provided this routine. That panel is then opened in MacLoggerDX.

Code

openPanel(“QSL”)

on openPanel(thePanel as text)
set thePanel to indexOfStringInList(thePanel, thePanels)
tell application “MacLoggerDX”
activate
tell application “System Events”
tell process “MacLoggerDX”
keystroke thePanel using command down
end tell
end tell
end tell
end openPanel

on indexOfStringInList(targetItem, aList)
set i to 1
repeat with aItem in aList
considering case
set compareResult to (aItem as string = targetItem as string)
end considering
if compareResult is true then
return i
end if
set i to i + 1
end repeat
return missing value
end indexOfStringInList