Omnigraffle Script help needed

Dear all,

In Omnigraffle Pro 6, I made a prototype for a school project.
In combination with the prototype we use an RFID reader.
When an RFID tag is attached to the reader, an Applescript does a keystroke, so the next canvas is displayed.
This simulates a login. The first canvas should be the login page and the RFID tag simulates a card with login details.

When logged in, the user can navigate through the prototype using a touchscreen (in combination with actions).

Now here comes the difficult part for me. When the RFID tag is detached from the reader. I want the prototype to return to the first canvas. So the login screen is displayed.

The Applescript currently contains two similar “System Events” keystrokes: “p” using {option down, command down}.
This ends presentation mode and starts it again. It works, but it isn’t flawless and does not look great.

Is there anyway to create a script that goes back to the first canvas, when the RFID tag is detached? Regardless which canvas you are on?

Hope one of you can help.

Best regards,