PC Shutdown from revBrowser?
Moderators: FourthWorld, heatherlaine, Klaus, robinmiller
-
- Posts: 11
- Joined: Tue Nov 26, 2013 10:36 pm
PC Shutdown from revBrowser?
Hello!
I am a Director user converting to LiveCode and we build many standalone kiosk-type applications. In Director, we were able to create an admin function to allow the kiosk administrator to shut the PC (Windows 7) down or restart the PC from within the Projector. In LiveCode, we are using a full screen standalone application with a revBrowser external to display an embedded web application. Is it possible to have the website - which is run locally on the PC using WAMP - "talk" to the LiveCode EXE to pass a command to quit and shut the computer down?
Any alternative ways of providing this functionality would be appreciated.
Thank you!
Cheers,
Monica
I am a Director user converting to LiveCode and we build many standalone kiosk-type applications. In Director, we were able to create an admin function to allow the kiosk administrator to shut the PC (Windows 7) down or restart the PC from within the Projector. In LiveCode, we are using a full screen standalone application with a revBrowser external to display an embedded web application. Is it possible to have the website - which is run locally on the PC using WAMP - "talk" to the LiveCode EXE to pass a command to quit and shut the computer down?
Any alternative ways of providing this functionality would be appreciated.
Thank you!
Cheers,
Monica
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: PC Shutdown from revBrowser?
Hi Monica,
Try
shell("shutdown -r")
Make sure you have saved all your work
Simon
Edit; I'm probably too brief. Here is the list
http://www.computerhope.com/shutdown.htm
shutdown -s to shutdown, the above is for reboot.
You will have to read the browser page content looking for a specific key (e.g. <!--Time to shutdown-->) and act on that.
Try
shell("shutdown -r")
Make sure you have saved all your work
Simon
Edit; I'm probably too brief. Here is the list
http://www.computerhope.com/shutdown.htm
shutdown -s to shutdown, the above is for reboot.
You will have to read the browser page content looking for a specific key (e.g. <!--Time to shutdown-->) and act on that.
Last edited by Simon on Thu Mar 27, 2014 6:51 pm, edited 1 time in total.
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 11
- Joined: Tue Nov 26, 2013 10:36 pm
Re: PC Shutdown from revBrowser?
Simon wrote:Hi Monica,
Try
shell("shutdown -r")
Make sure you have saved all your work
Simon
Hi Simon,
Would this be passed from a PHP script in the web browser back to the livecode revBrowser in some way as a function?
Thank you!
Cheers,
Monica
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: PC Shutdown from revBrowser?
Sorry see my edit.
php? no I don't see it needed.
Welcome to unfettered access.
You will probably want the -f option to force a close.
Simon
php? no I don't see it needed.
Code: Select all
put url(www.mysite.com/shutdown.html) into tKill
if "Time to shutdown" is in tKill then
shell("shutdown -s")
end if
You will probably want the -f option to force a close.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: PC Shutdown from revBrowser?
Ok another edit.
... for a specific key (e.g. <!--Time to shutdown-->)
Not the best, better
<!--BlueBannanaShutMeDownCauseISaySo-->
if "BlueBannanaShutMeDownCauseISaySo" is in tKill
etc.
Better yes?
Simon
... for a specific key (e.g. <!--Time to shutdown-->)
Not the best, better
<!--BlueBannanaShutMeDownCauseISaySo-->
if "BlueBannanaShutMeDownCauseISaySo" is in tKill
etc.
Better yes?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
- Posts: 11
- Joined: Tue Nov 26, 2013 10:36 pm
Re: PC Shutdown from revBrowser?
Hi Simon,
Thank you for the guidance so far. Would the "put" command need to be in a loop of sorts? Because if the webpage is HTML, it would already be on the page and would automatically come back as true?
I hope I am making sense.
Cheers,
Monica
Thank you for the guidance so far. Would the "put" command need to be in a loop of sorts? Because if the webpage is HTML, it would already be on the page and would automatically come back as true?
I hope I am making sense.
Cheers,
Monica
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: PC Shutdown from revBrowser?
Hi Monica,
You kind of have me there.
What is the trigger for a shutdown? I was thinking it would be a link.
Is something like "when the animation ends shutdown"?
Simon
You kind of have me there.
What is the trigger for a shutdown? I was thinking it would be a link.
Is something like "when the animation ends shutdown"?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!