Ah ok that makes sense! So the AppleScript is indeed enabling them, but they're just not available because Typinator sees it as being frontmost... I have a macro that includes a small AppleScript to close the main Typinator window for this same reason, and then reopen it at the end of the macro. Let me dig it up and share it with you.
UPDATE: @splitpersonality, this AppleScript will determine if the main Typinator window is open, close it, and then reopen at the end. You can wrap your existing AppleScript with this one (let me know if you need help with that) and that should fix your issue.
tell application "System Events"
tell application process "Typinator"
if window "Typinator" exists then --determine if main window is open
set winOpen to "true" --set that to a variable
click button 2 of window "Typinator" --close main window
end if
# PUT YOUR MAIN SCRIPT HERE
if winOpen is "true" then --determines if window was previously open
do shell script "open /Applications/Typinator.app" --activate Typinator by path
end if
end tell
end tell
Unfortunately, Todoist's dialog window closes as well.
tell application "System Events"
tell application process "Typinator"
if window "Typinator" exists then --determine if main window is open
set winOpen to "true" --set that to a variable
click button 2 of window "Typinator" --close main window
end if
tell application "System Events"
tell application process "Todoist"
--pauses until window appears
repeat until exists (first window whose subrole is "AXSystemDialog")
delay 0.1
end repeat
--display notification that the window appeared
display notification "Todoist AXSystemDialog Window Exists"
--enable Typinator set
tell application "Typinator"
set enabled of rule set "Todoist.app Projects" to true
set enabled of rule set "Todoist.app @Tags" to true
set enabled of rule set "Todoist.app Text" to true
set enabled of rule set "Todoist.app Word Sets" to true
end tell
--pauses until window disappears
repeat until not (exists (first window whose subrole is "AXSystemDialog"))
delay 0.1
end repeat
--disable Typinator set
tell application "Typinator"
set enabled of rule set "Todoist.app Projects" to false
set enabled of rule set "Todoist.app @Tags" to false
set enabled of rule set "Todoist.app Text" to false
set enabled of rule set "Todoist.app Word Sets" to false
end tell
--display notification that the window disappeared
display notification "Todoist AXSystemDialog Window Does Not Exist"
end tell
end tell
if winOpen is "true" then --determines if window was previously open
do shell script "open /Applications/Typinator.app" --activate Typinator by path
end if
end tell
end tell