Perspective Workstation - Download dialogs are "Popping under"

I'm using Perspective workstation in Kiosk mode. Edge Device is Windows 10 IOT Enterprise LTSC. Whenever I do anything that has a file dialog pop up on the edge device, the dialog pops "under" the main perspective window and I can't see it. AT first I thought it was my Tab/Window links setting, but I've tried all the settings and nothing has changed. The touch screen just locks up and I have to alt+tab to get to the dialog. The end user isn't going to have a keyboard connected.

well. uh.

import ctypes

user32 = ctypes.windll.user32

# Simulate pressing the Alt key
user32.keybd_event(0x12, 0, 0, 0)
time.sleep(0.1)

# Simulate pressing the Tab key
user32.keybd_event(0x09, 0, 0, 0)
time.sleep(0.1)

# Simulate releasing the Tab key
user32.keybd_event(0x09, 0, 2, 0)
time.sleep(0.1)

# Simulate releasing the Alt key
user32.keybd_event(0x12, 0, 2, 0)

(this is solving the symptoms, not the cause, but it might well solve the symptoms)

1 Like

Won't help. Perspective workstation, like any other Perspective session, is running your scripts on the backend. If you want to run code on the actual device, you need to use Vision.

OP, it sounds like it's just a bug/something funky in your environment. If you're able to install additional software on the device, could you try coming up with something with e.g. AutoHotkey to recognize a new dialog popup and bring it into focus?

3 Likes

Ah, dang, good call.
(In a traditional react app there are browser APIs i could use, but perspective is a bit outside the norm)

I can install software, but I've never used AutoHotKey before.

Also, this is something I'm going to have to convey to a customer to have them set up, so not only am I going to have to learn how to do this myself, I'll have to teach it too. Plus, having a script running periodically in the background like that seems like a band-aid more than a workable solution. I've combed google and haven't found any answers on the Windows or Ignition side. Launching a full screen web browser doesn't seem to be an issue, so I'll probably just do that instead.

I stumbled across the answer. The behavior is caused by the Perspective Workstation Launcher being open while the project is open in kiosk/full screen.

What I was doing was starting Perspective Workstation Launcher at startup, which would then automatically launch my project. I was messing around with the upload download buttons and ended up closing the Launcher when I alt+tabbed just to get it out of the way. I then noticed my dialogs behaved correctly.

So I set up a shortcut to launch my project directly and put that in my startup folder. Now my dialog boxes work like they're supposed to even on a fresh boot.

1 Like