GUI script cancel print dialog for filemaker

In order to elegantly change printers in FM7, I need to accomplish the above with a GUI script. I have seen another solution on this board but will not work in my solution due to the variety of printers that need to be utilized. I have learned that if I can get the below script to work, I will be able to get the change to work again. When I run the below script I get

tell application “System Events”
tell application process “Filemaker”
repeat until frontmost --this repeat to be sure FMP is the frontmost app
set frontmost to true
end repeat
click button “Cancel” of window “Print”
end tell
end tell

I get an error:
System Events got an error: NSReceiverEvaluationScriptError: 4

Using UI Inspector for the cancel button I get:

<AXApplication: “FileMaker Developer”>
<AXWindow: “Print”>

<AXButton: “Cancel”>

Attributes:
AXRole: “AXButton”
AXRoleDescription: “button”
AXChildren: “<array of size 0>”
AXParent: “”
AXTitle: “Cancel”
AXWindow: “<AXWindow: “Print”>”
AXPosition: “x=790 y=608”
AXSize: “w=74 h=20”
AXEnabled: “1”

Actions:
AXPress - press

THANKS
DJK