I have 4 users sharing a file hosted on one of the user devices.
I want a remote user to be able to send a standard message to one or more other users as an alert.
I have read previous dialogue on this issue and accept that this will involve the use of the "Install Ontimer Script". I have configured the following:-
1. There are 2 buttons on a "Utilities" layout. The 1st button starts a timer in the open window (interval = 5 secs and a global variable [GV] is set to "0") whilst the 2nd button stops the same timer.
2. Using these buttons, each user either starts the timer in his/her window if he/she wants to receive messages or stops the timer if not.
3. The message sender clicks a "Send Message" button initiating a script that sets GV to "1".
4. The timer then initiates a script "Show Custom Dialogue" conditional upon GV being "1".
5. The message box has an "OK" button that closes the message and resets GV to "0".
My expectation was that each user that has their own timer running will receive the message and that the 1st user to click "OK" will reset the GV to "0". This doesn't happen in practice. The message only shows on the message sender's device.
Is the problem with the global variable? In particular:-
Q1. Is it true that the Global Variable will only operate on the device on which it is created and not throughout the shared file (I have read that the Global variable is stored in RAM not on the hard drive)? If this is the case, can anyone suggest what else will work?
Q2. Is it ok to change the value of the Global Variable using a Set Variable step in a script? I assume that a variable can be varied but this is not obviously true according to the stuff that I have read.