Page 1 of 1

Launching the camera app windows 8.1

Posted: Fri Feb 27, 2015 11:43 pm
by DavJans
I have got this working. but wanted to see if anyone knew a more efficient way.
What I did to get it to work was to create a shortcut to the camera called camera.lnk with a target of "explorer.exe shell:Appsfolder\Microsoft.MoCamera_cw5n1h2txyewy!Microsoft.Camera"
Then I created a button with this code

Code: Select all

on mouseUp
launch url ("file:" & "C:\Camera.lnk")
end mouseUp
Thank you for any feedback if there is a better way to do it, and if not and someone needs it, here is at least one way to do it.

BTW, the following does not work because its a metro app or something stupid, ask Microsoft :)

Code: Select all

launch url ("file:" & "C:\Windows\Camera\camera.exe")

Re: Launching the camera app windows 8.1

Posted: Fri Feb 27, 2015 11:53 pm
by Agnar Tonheim
Try this :
Add a new stack.
Add a button with the following code:

Code: Select all

on mouseUp
   launch "explorer.exe shell:Appsfolder\Microsoft.MoCamera_cw5n1h2txyewy!Microsoft.Camera"
end mouseUp
It works for me.

Re: Launching the camera app windows 8.1

Posted: Fri Feb 27, 2015 11:53 pm
by magice
I'm not sure if you know this, but your example shows the file path to use back slashes like windows. LiveCode uses forward slashes.

Re: Launching the camera app windows 8.1

Posted: Fri Feb 27, 2015 11:57 pm
by DavJans
Thank you Agnar Tonheim, that is much better.

Re: Launching the camera app windows 8.1

Posted: Sat Feb 28, 2015 12:01 am
by Agnar Tonheim
You are welcome. :)

Re: Launching the camera app windows 8.1

Posted: Sat Feb 28, 2015 1:17 am
by Klaus
Hi friends,

this should also work:

Code: Select all

on mouseUp
  launch document "C:/Camera.lnk"
end mouseUp
Hint:
Internally LC always uses the SLASH / as a path delimiter for crossplatform reasons.
You only need to supply platform specific path delimiter when using "shell" commands.


Best

Klaus

Re: Launching the camera app windows 8.1

Posted: Sat Feb 28, 2015 6:33 pm
by jacque
DavJans wrote:BTW, the following does not work because its a metro app or something stupid, ask Microsoft :)

Code: Select all

launch url ("file:" & "C:\Windows\Camera\camera.exe")
An executable isn't a text file, try it with" binfile" instead.