Sending Shortcut Commands

I want to create a button that sends Ctrl+P command in the client scope. I tried using script but it can’t import the required libraries.

So from the gateway you want to run a script that tells clients to simulate a keystroke? Besidese the fact this seems kind of sketchy and am unsure if it’s even allowed - whats the end goal here? Do you have some script attached to Control+P in the client event scripts? I think you’re better off creating a client message handler, sending a message from the gateway (or wherever) and have that client message handler run the same script that’s under your Control+P script.

Unless you mean just to paste - but that seems very odd. Whats the context?

I created a script fully in perspective and as you know we can’t use the system.print function unless it is a vision view. The original plan was to put a button that prints a QR code generated by the report, but since this can’t happen, then I want to make a button that would open the QR code in a pdf format and then sends the Ctrl+P shortcut.
I know that we can ask the user to press on the printer’s icon to print the pdf file but some of our employees do need to be trained on how to this and we want to simplify it for them.

That’s the kind of central control of a browser that bad actors would love to have. Browser makers pretty much are not going to let you do this.

1 Like

What @pturmel said. I think the official response you’ll get is that you need to buy the reporting module to do this, or train your staff to work with what you have working now.

There’s no way you can have your browser both open a PDF and then control the client computer outside of the browser scope to run key strokes to print it.

Now for options outside of ignition, perhaps your download is always the same name, in the same spot, and you can have some file watcher application looking for new versions, and when it finds one it prints it. I don’t like adding extra software - just extra points of failure and documentation you have to learn. But this may be an option to look into for you.

I agree.
Is there a way to link a button from the Perspective to a button in the Vision ? so we can run the command from vision view scope instead of perspective