Is there a global variable accessible containing the message server address or should I set one manually?
Interesting question, intrigued as to what for?
A script needs to send a command to print server over http. The print server will run on the same terminal as message server.
Instead of hard-coding the message server address in the script, I was hoping for some global variable.
Its a local setting so not going to be in dB.
Is it just in use in one script?
My PMS scripts use one variables script which holds all the users and passwords etc for all the seperate functions and scripts to use which might be of interest for you if being reused.
I just need the message server address to construct the URL to send the ticket id for printing. If a global/local setting isn’t available I’ll just have to add something to the config app to save it to the db.
Other settings are pulled by the service from JSON.
You couldn’t use the message server itself and broadcast message?
You can find message server. I’m not sure how but you notice Emre added a button that finds the message server in the network.
I could, but there’s no guarantee the SambaPOS will be running.
Calling the method from within the script would add too much overhead I think. Plus, it’s an unknown as far as how much time it will take to process responses and figure out which is the message server.
I’ll just keep the manually-set global var for now it seems.