Is it possible to implement a pop-up system in a WAPT package?
We would like a pop-up to appear on the user's screen.
This pop-up would be used to restart the machine. The user must be able to interact with it.
Here is an example of what we want:
And here is the code:
Code: Select all
import ctypes
MB_YESNO = 0x04
MB_ICONQUESTION = 0x20
IDYES = 6
IDNO = 7
reponse = ctypes.windll.user32.MessageBoxW(0, message + "voulez-vous redémarrer la machine maintenant ?", "Redémarrage", MB_YESNO | MB_ICONQUESTION)
if reponse == IDYES:
subprocess.call(["shutdown", "-r", "-t", "0"])When we run the script, the pop-up does not appear on the machine.
Can the "session_setup" function help us, and if so, how?
