Page 1 of 2

Can LC copy a shortcut to desktop? - Solved

Posted: Tue Dec 10, 2013 1:45 am
by DR White
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

Re: Can LC copy a shortcut to desktop?

Posted: Tue Dec 10, 2013 2:00 am
by FourthWorld
In the Dictionary see the "create alias" command and the "specialFolderPath" function.

Re: Can LC copy a shortcut to desktop?

Posted: Tue Dec 10, 2013 2:06 am
by DR White
Have you actually done it with LC?

Re: Can LC copy a shortcut to desktop?

Posted: Tue Dec 10, 2013 11:43 am
by SparkOut

Re: Can LC copy a shortcut to desktop?

Posted: Tue Dec 10, 2013 12:26 pm
by Klaus
Hi David,

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


Best

Klaus

Re: Can LC copy a shortcut to desktop?

Posted: Tue Dec 10, 2013 3:24 pm
by FourthWorld
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?

Re: Can LC copy a shortcut to desktop?

Posted: Wed Dec 11, 2013 2:37 am
by DR White
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

Re: Can LC copy a shortcut to desktop?

Posted: Wed Dec 11, 2013 3:29 am
by FourthWorld
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?

Re: Can LC copy a shortcut to desktop?

Posted: Wed Dec 11, 2013 3:38 am
by DR White
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

Re: Can LC copy a shortcut to desktop?

Posted: Wed Dec 11, 2013 4:36 am
by FourthWorld
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?

Re: Can LC copy a shortcut to desktop?

Posted: Wed Dec 11, 2013 9:08 am
by SparkOut
Did you look at the code in the link I posted above, answering the same question in the other thread you started?

Re: Can LC copy a shortcut to desktop?

Posted: Wed Dec 11, 2013 12:08 pm
by DR White
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

Re: Can LC copy a shortcut to desktop?

Posted: Wed Dec 11, 2013 1:03 pm
by Klaus
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

Re: Can LC copy a shortcut to desktop?

Posted: Wed Dec 11, 2013 1:48 pm
by DR White
Klaus,

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

Thanks,

David

Re: Can LC copy a shortcut to desktop?

Posted: Wed Dec 11, 2013 1:51 pm
by Klaus
Don't try, just do it! :D