launch url "file:/..." with a var [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

Post Reply
atout66
Posts: 266
Joined: Wed Feb 02, 2011 12:31 pm

launch url "file:/..." with a var [Solved]

Post by atout66 » Fri Jun 12, 2015 2:56 pm

Hi to all,

Could you tell me how to use the <launch url> command with a var inside ?
I didn't find any example in the dictionnary...
The script below does nothing because I use a global var <gLePathFolder> to give the main path.

Code: Select all

global gLePathFolder -- this path folder is correct for sure, and the file <Aide.pdf> is in there !
on mouseUp
     launch url "file:/gLePathFolder/Aide.pdf"
end mouseUp
I also tried with some <&> before and after like that:

Code: Select all

launch url "file:/&gLePathFolder&/Aide.pdf"
without success.

Thanks in advance for your help,
Regards, Jean-Paul.
Last edited by atout66 on Fri Jun 12, 2015 3:33 pm, edited 1 time in total.
Discovering LiveCode Community 6.5.2.

Tlaloc
Posts: 2
Joined: Thu Jun 11, 2015 2:57 am

Re: launch url "file:/..." with a var

Post by Tlaloc » Fri Jun 12, 2015 3:12 pm

Try

launch url ("file:" & gLePathFolder)

or

launch url ("file:" & gLePathFolder & "/yourFile.pdf")

in case your pdf is not already within your global var

atout66
Posts: 266
Joined: Wed Feb 02, 2011 12:31 pm

Re: launch url "file:/..." with a var

Post by atout66 » Fri Jun 12, 2015 3:33 pm

Hey, you've got it :D

I did this from your second example:

Code: Select all

launch url ("file:/"&gLePathFolder&"/Aide.pdf")
and it's OK.

Thanks for your help Tlaloc
Discovering LiveCode Community 6.5.2.

Tlaloc
Posts: 2
Joined: Thu Jun 11, 2015 2:57 am

Re: launch url "file:/..." with a var [Solved]

Post by Tlaloc » Fri Jun 12, 2015 5:25 pm

Glad you did it! :D

Post Reply