Launching the camera app windows 8.1

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
DavJans
Posts: 270
Joined: Thu Dec 12, 2013 4:21 pm
Location: Spokane, WA USA

Launching the camera app windows 8.1

Post by DavJans » Fri Feb 27, 2015 11:43 pm

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")
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här

Agnar Tonheim
Posts: 10
Joined: Sun Jan 25, 2009 3:27 pm

Re: Launching the camera app windows 8.1

Post by Agnar Tonheim » Fri Feb 27, 2015 11:53 pm

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.

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: Launching the camera app windows 8.1

Post by magice » Fri Feb 27, 2015 11:53 pm

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.

DavJans
Posts: 270
Joined: Thu Dec 12, 2013 4:21 pm
Location: Spokane, WA USA

Re: Launching the camera app windows 8.1

Post by DavJans » Fri Feb 27, 2015 11:57 pm

Thank you Agnar Tonheim, that is much better.
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här

Agnar Tonheim
Posts: 10
Joined: Sun Jan 25, 2009 3:27 pm

Re: Launching the camera app windows 8.1

Post by Agnar Tonheim » Sat Feb 28, 2015 12:01 am

You are welcome. :)

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Launching the camera app windows 8.1

Post by Klaus » Sat Feb 28, 2015 1:17 am

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7229
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Launching the camera app windows 8.1

Post by jacque » Sat Feb 28, 2015 6:33 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”