run included files in a standalone app Windows

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
pajito
Posts: 30
Joined: Thu Apr 13, 2017 8:08 pm

run included files in a standalone app Windows

Post by pajito » Thu Sep 07, 2017 12:07 pm

Hi everybody

I just finished a very simple project in which I run an executabe file. When running from the stack giving the whole directory path everything works.
example: put shell ("D:\test\rundl.exe" && field "link")

But when I export an app for windows, includind the files I need, I do not know how to set the path.


Thanks In advance
Pajito

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

Re: run included files in a standalone app Windows

Post by Klaus » Thu Sep 07, 2017 12:14 pm

Hola Pajito,

if you were using the "Copy files..." tab in the "standalone builder settings" to add your file(s)
then you will find all these files (and folders) in the standalone in -> specialfolderpath("resources")

Is that what you mean?


Best

Klaus

pajito
Posts: 30
Joined: Thu Apr 13, 2017 8:08 pm

Re: run included files in a standalone app Windows

Post by pajito » Thu Sep 07, 2017 12:21 pm

HI Klaus
this is exaclty what I mean. I alredy copy the files the way you suggest, my problem was that I didn't know how to modify my line. So you are suggesting something like:
"specialfolderpath\rundl.exe"

I will give it a try and I will let you know of the outcome.

Thanks so much for the reply
Pajito

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

Re: run included files in a standalone app Windows

Post by Klaus » Thu Sep 07, 2017 12:35 pm

Hi Pajito,

before you are runing against a wall, do this:

Code: Select all

...
## Create path to your EXE in Livecode:
put specialfolderpath("resources") & "/rundl.exe" into tExePath

## Prepare to use with SHELL:
replace "/" with "\" in tExePath

## Now use shell:
put shell (tExePath && field "link") 
...
And read up "specialfolderpath()" in the dictionary! 8)


Best

Klaus

pajito
Posts: 30
Joined: Thu Apr 13, 2017 8:08 pm

Re: run included files in a standalone app Windows

Post by pajito » Thu Sep 07, 2017 12:45 pm

Hi again

finally I did it like this
put specialfolderpath("resources") into tFolderpath
put tFolderPath & "/rundl.exe" into tFilePath

put shell (tFilePath && && field "link")

Actually I did exaclty what you suggest bellow. Your help was inormous.

Thanks Again for all your help
Pajito

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

Re: run included files in a standalone app Windows

Post by Klaus » Thu Sep 07, 2017 12:46 pm

Don't forget to replace SLASH with BACKSLASH, Windows Shell does not like SLASH! :D

pajito
Posts: 30
Joined: Thu Apr 13, 2017 8:08 pm

Re: run included files in a standalone app Windows

Post by pajito » Thu Sep 07, 2017 1:01 pm

Slash rules

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

Re: run included files in a standalone app Windows

Post by Klaus » Thu Sep 07, 2017 1:04 pm

Only on guitar, not on Windows! :D

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”