System.util functions not working in Perspective?

I’ve been trying to use the system.util.execute function as an action to a button, but it doesn’t appear to be working. I was trying to use it to kill the chrome using “taskkill”. I also tried to use it to launch the cmd.exe based on some other posts I found in the forum, but it doesn’t seem to work for me. As a last test, I tried system.util.beep() and even that wouldn’t work so I don’t think its a syntax issue with me execute parameters.

Is there any known issue with this in Perspective? It looks like .beep and .execute should both work in perspective sessions (.exit says only Vision).

I was testing this by using a Chrome window “Client” in a VM session if that makes any difference. I just saw another post that maybe indicates the system.util functions won’t work on Clients in Perspective - is that true?

1 Like

Those functions would be executing on the gateway, not the computer with the Perspective session open. They may be working but not how you expect.

Ok, so is there any way to execute anything on the clients then? For instance, chrome is in kiosk mode and I want to shut it down to exit the Perspective session on that client via a button or something in a view.

No, there’s not.

You’ve got to remember that when you’re using Perspective you’re dealing with web technologies. Imagine if a random website could close your browser or run (arbitrary non-JS) code on your computer?


Fun fact: since system.util.beep() only runs on the Gateway, and you didn’t hear a beep, there’s a decent chance you’re driving someone somewhere insane as they look for the source of a randomly-timed beep.


Good thing the gateway is in a basement and most people are working from home anyway then!

Hi, I’m trying to execute system.util.beep() also. I’ve added this line on a session event that is currently working (on barcodescann) but seems it does not work.

system.tag.writeAsync(['[default]FullTagPath'], [data.text]) #WORKS FINE
system.util.beep() #DOES NOT WORK
system.perspective.vibrateDevice(3000) #WORKS FINE

I’ve tried also to put the second line into a gateway event (timer) but it does not work neither.
how should I use that?

It is trying to make the gateway beep, not the client. If your gateway has a speaker, go listen there.