Can LC copy a shortcut to desktop? - Solved

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

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Can LC copy a shortcut to desktop? - Solved

Post by DR White » Tue Dec 10, 2013 1:45 am

I have been trying for 2 days now and I am starting to wonder if it is possible for LC to copy a shortcut to desktop?

If anybody has had success in accomplishing this feat, PLEASE let us know how you did it?


Thanks,

David
Last edited by DR White on Thu Dec 12, 2013 12:51 am, edited 1 time in total.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Can LC copy a shortcut to desktop?

Post by FourthWorld » Tue Dec 10, 2013 2:00 am

In the Dictionary see the "create alias" command and the "specialFolderPath" function.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Can LC copy a shortcut to desktop?

Post by DR White » Tue Dec 10, 2013 2:06 am

Have you actually done it with LC?

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: Can LC copy a shortcut to desktop?

Post by SparkOut » Tue Dec 10, 2013 11:43 am


Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Can LC copy a shortcut to desktop?

Post by Klaus » Tue Dec 10, 2013 12:26 pm

Hi David,

looks like reading all answers to your original posting -> carefully, is not a bad idea, right? 8)


Best

Klaus

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Can LC copy a shortcut to desktop?

Post by FourthWorld » Tue Dec 10, 2013 3:24 pm

DR White wrote:Have you actually done it with LC?
A few times. I've written about half a dozen installers in my 15 years with LiveCode.

The more valuable question is: What happened when you tried it using the language elements presented in the first reply here?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Can LC copy a shortcut to desktop?

Post by DR White » Wed Dec 11, 2013 2:37 am

Richard,

I do not know have knowledge about "create alias" to try it.

Please give example.

At this point, If you can tell me how to copy an ".exe" file to desktop, that would work fine.

Thanks,

David

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Can LC copy a shortcut to desktop?

Post by FourthWorld » Wed Dec 11, 2013 3:29 am

DR White wrote:I do not know have knowledge about "create alias" to try it.

Please give example.
What did you find when you looked in the Dictionary for the "creatre alias" command?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Can LC copy a shortcut to desktop?

Post by DR White » Wed Dec 11, 2013 3:38 am

I read the dictionary before.

Not enough info to make code to preform a complete task.

I Learn from examples.

Thank you for your time,

David

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Can LC copy a shortcut to desktop?

Post by FourthWorld » Wed Dec 11, 2013 4:36 am

A lot of references to examples have been provided yet none of them have worked for you, so let's try something different: can you post the code you wrote that isn't working?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: Can LC copy a shortcut to desktop?

Post by SparkOut » Wed Dec 11, 2013 9:08 am

Did you look at the code in the link I posted above, answering the same question in the other thread you started?

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Can LC copy a shortcut to desktop?

Post by DR White » Wed Dec 11, 2013 12:08 pm

I need to copy an .exe file from directory c:/David3A/ to DeskTop.

Below is my code, But all I get is an empty icon:

----- Copy file David3A/Books.exe to Desktop ----------------

put specialfolderpath("desktop") & "/Books.exe" into tFile

put url("binfile:" & "/David3A/Books.exe") into url("binfile:" & tFile)

----------------------------------------------------------------------
All I get is an empty icon on my desktop.

Thanks,

David

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Can LC copy a shortcut to desktop?

Post by Klaus » Wed Dec 11, 2013 1:03 pm

David,
DR White wrote:I need to copy an .exe file from directory c:/David3A/ to DeskTop.
Below is my code, But all I get is an empty icon:
----- Copy file David3A/Books.exe to Desktop ----------------
put specialfolderpath("desktop") & "/Books.exe" into tFile
put url("binfile:" & "/David3A/Books.exe") into url("binfile:" & tFile)
please compare your two pathnames:
c:/David3A/
/David3A/

See what is missing at the beginning of the second pathame you used in your script?
Your DESCRIPTION shows the correct and complete pathname!


Best

Klaus

DR White
Posts: 718
Joined: Fri Aug 23, 2013 12:29 pm

Re: Can LC copy a shortcut to desktop?

Post by DR White » Wed Dec 11, 2013 1:48 pm

Klaus,

I will try adding the "C:" to the second path after work today ( in about 10 hours)

Thanks,

David

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Can LC copy a shortcut to desktop?

Post by Klaus » Wed Dec 11, 2013 1:51 pm

Don't try, just do it! :D

Post Reply