Launch another app from my standalone

Adrian Williams adrian at clubtype.co.uk
Sun Aug 30 13:48:28 EDT 2009


Len,
I'm sure we're getting there! Your explanations are great. Just tried  
this all in the same script:

-- function
getPathToFile pFile
   put the filename of this stack into theFile  --removed unwanted  
'the' from your original
   set the itemdelimiter to slash
   put pFile into the last item of theFile
   return theFile
getPathToFile
--end function

--Use the function
put getPathFile(My App.exe) into tFile
launch tFile

but get an error if I use a space in the name of the file.
Error is:
Function: separator is not a ','
Object	Uninstall 3b
Line	put getPathFile(My App.exe) into tFile
Hint	App.exe

The filename has a space - is that a problem for a function?

Thanks,
Adrian

On 30 Aug 2009, at 18:30, Len Morgan wrote:

> Adrian,
>
> Yes, you can define the function anywhere you like as long as it's  
> in the message path when you want to execute it.  But you don't  
> DEFINE the function in the "openStack." That is a function (handler  
> actually) all it's own but you can define it in the same script.   
> Remember that it's going to be CALLED when you need it.  Since the  
> file name of this stack isn't going to change, the FUNCTION should  
> be able to execute it at any time.
>
> len
>
> Adrian Williams wrote:
>> Len,
>> Thanks for this. Looks like just what I need!
>> I guess the FUNCTION can go in on openStack and the 'put' part in a  
>> card or button script?
>> Adrian
>>
>>
>> On 30 Aug 2009, at 17:24, Len Morgan wrote:
>>
>>> I"m hoping Trevor won't mind me sharing this little snippet of code:
>>>
>>> FUNCTION getPathToFile pFile
>>>  put the filename of this stack into the theFile
>>>  set the itemdelimiter to slash
>>>  put pFile into the last item of theFile
>>>  return theFile
>>> END getPathToFile
>>>
>>> To use:
>>> put getPathFile(filename you want to launch) into tFile
>>> launch tFile
>>>
>>> That should do it.
>>>
>>> len morgan
>>>
>>> Adrian Williams wrote:
>>>> Jim,
>>>> When defaultFolder is set to a valid path "C:\Program Files 
>>>> \MyApp.exe" my code works.
>>>> Is there a way to retrieve the location of the Folder in which  
>>>> the current application is running.
>>>> Then set deafultFolder to that?
>>>> Thanks for your perseverance with me on this topic.
>>>> Adrian
>>>>
>>>> On 30 Aug 2009, at 11:09, Jim Bufalini wrote:
>>>>>
>>>>> Try:
>>>>>
>>>>> put the defaultFolder into tOrigDefaultFolder
>>>>>
>>>>> set the defaultFolder to "C:\theDirTheExeIsIn" -- Put actual dir  
>>>>> the exe is
>>>>> in here
>>>>>
>>>>> launch "MyProgram.exe" -- Put the actual name of the exe here
>>>>>
>>>>> set the defaultFolder to tOrigDefaultFolder -- Puts the  
>>>>> defaultFolder back
>>>>> where it was
>>>>
>>>> _______________________________________________
>>>> use-revolution mailing list
>>>> use-revolution at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your  
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>>
>>>>
>>> _______________________________________________
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your  
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your  
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list