Launch another app from my standalone

2009-08-28 Thread Adrian Williams
A Mac standalone that needs to Launch another .app A Win standalone that needs to Launch another .exe Everything is in the same Folder. The docs just say launch "myApp" but that does nothing. How can I do this? Thanks, Adrian __ Club Type http://www.clubtype.co.uk

Re: Launch another app from my standalone

2009-08-28 Thread Ray Horsley
I'm not having any trouble with: on mouseUp answer file "Pick an application" launch it end mouseUp Ray Horsley LinkIt! Sofware On Aug 28, 2009, at 6:42 AM, Adrian Williams wrote: A Mac standalone that needs to Launch another .app A Win standalone that needs to Launch another .exe Everyth

Re: Launch another app from my standalone

2009-08-28 Thread Colin Holgate
On Aug 28, 2009, at 1:38 PM, Ray Horsley wrote: The docs just say launch "myApp" but that does nothing. How can I do this? There's no chance that you're using the standalone's name instead of the other apps name, is there? ___ use-revolution

Re: Launch another app from my standalone

2009-08-28 Thread Adrian Williams
Thanks Ray, but I don't want a navigation dialog to select it, I want the app to launch automatically. Adrian On 28 Aug 2009, at 18:38, Ray Horsley wrote: I'm not having any trouble with: on mouseUp answer file "Pick an application" launch it end mouseUp Ray Horsley LinkIt! Sofware On Au

Re: Launch another app from my standalone

2009-08-28 Thread Adrian Williams
Hi Colin, Nop. I'm not launching myApp by mistake. I have a stack with one button script and building into a standalone. Its just trying to launch another app in the same Folder. Adrian On 28 Aug 2009, at 15:41, Colin Holgate wrote: On Aug 28, 2009, at 1:38 PM, Ray Horsley wrote: The docs

Re: Launch another app from my standalone

2009-08-28 Thread J. Landman Gay
Adrian Williams wrote: Thanks Ray, but I don't want a navigation dialog to select it, I want the app to launch automatically. Adrian The problem is probably a path issue. If you are only referring to the application by its short file name, then make sure the defaultFolder is set to the one c

Re: Launch another app from my standalone

2009-08-28 Thread Chris Sheffield
Adrian, Is it possible you've changed the defaultFolder somewhere in your code? That's the only reason I can think of why a command like launch "myApp" wouldn't work. Also, sorry to state the obvious, but just in case, be aware that it is necessary to include the .exe or .app as part of the app's

Re: Launch another app from my standalone

2009-08-28 Thread Ian Wood
It's still worth doing as a test. If it works and you code doesn't, then you've confirmed that it's a path issue. It's also worth doing a test standalone that answers the defaultfolder, as the initial defaultfolder can't get a bit tricky on OS X with the bundle. Ian On 28 Aug 2009, at 15

Re: Launch another app from my standalone

2009-08-28 Thread Adrian Williams
Chris, Think I have it now. "it" may not the best best name to use but it works on OSX at least. Will it also work on Windows? Speaking for myself (an old newbie) who doesn't use Rev often, the docs are not complete enough. One forgets the simplest of tasks because they are not used constan

Re: Launch another app from my standalone

2009-08-28 Thread Adrian Williams
Ian, I missed setting up "defaultFolder" altogether, so no wonder it did not work. Thanks for the tips, which also worked in OS X. Adrian On 28 Aug 2009, at 16:33, Ian Wood wrote: It's still worth doing as a test. If it works and you code doesn't, then you've confirmed that it's a path is

Re: Launch another app from my standalone

2009-08-28 Thread Adrian Williams
Progress, but my double use of "it" causing a NilObjectException problem? Is there a way to avoid using "it"? on mouseUp set the defaultFolder to it launch "myWindowsApp.exe" launch it answer "Continue" with "OK" if it is "OK" then quit end mouseUp Thanks, Adrian On 28 Aug 2009, at 15:57,

Re: Launch another app from my standalone

2009-08-29 Thread Sarah Reichelt
On Sat, Aug 29, 2009 at 4:15 PM, Adrian Williams wrote: > Progress, but my double use of "it" causing a NilObjectException problem? > Is there a way to avoid using "it"? > > on mouseUp > set the defaultFolder to it > launch "myWindowsApp.exe" > launch it "it" varies all the time depending on what

Re: Launch another app from my standalone

2009-08-30 Thread Adrian Williams
Still having the error 'NilObjectException the application must shut down' when using the 'launch' command. Looks like the target app to launch is producing the error on Windows Vista. Here is the relevant code that tries to launch... set the defaultFolder to it launch "MyProgram.exe" launch

RE: Launch another app from my standalone

2009-08-30 Thread Jim Bufalini
Adrian Williams wrote: > Still having the error 'NilObjectException the application must shut > down' when using the 'launch' command. > Looks like the target app to launch is producing the error on Windows > Vista. > Here is the relevant code that tries to launch... > > set the defaultFolder to

RE: Launch another app from my standalone

2009-08-30 Thread Jim Bufalini
Everything wrapped. :-( Should have looked like this: > Stop using "it." Your code snippet does not show what "it" is set to. > What is the default folder being set to? What are you launching? Why do you > have two launch statements? > > Try: > > put the defaultFolder into tOrigDefaultFolder >

RE: Launch another app from my standalone

2009-08-30 Thread Jim Bufalini
LOL. Let me try double spacing. My email client is obviously still messed from a couple months ago when I had a total network-wide crash of all my computers. Try: put the defaultFolder into tOrigDefaultFolder set the defaultFolder to "C:\theDirTheExeIsIn" -- Put actual dir the exe is in here l

Re: Launch another app from my standalone

2009-08-30 Thread Adrian Williams
Jim, The docs give the "it" example - so I used it verbatim. There are not two launch statements. The 'get shell' is a script in another button I was trying too. But I got the same error. Guess this is all to do with the defaultFolder. The reason I wanted to use "it" was that I have no way to k

Re: Launch another app from my standalone

2009-08-30 Thread Adrian Williams
Jim, Double spacing works for me. I don't want to give an explicit full pathname because someone else (user) will be saving the Folder (containing all the exe's for use) and I cannot guarantee it will be in the path I might specify. Thought I could save requiring full pathname by the use of th

RE: Launch another app from my standalone

2009-08-30 Thread Jim Bufalini
Dear Adrian, > Jim, > The docs give the "it" example - so I used it verbatim. In general, my stock advise is don't use "it" unless you are absolutely sure that "it" has just been set (as in right after a get). There are too many handlers that set "it." When you get to using sends and communicatio

RE: Launch another app from my standalone

2009-08-30 Thread Jim Bufalini
Dear Adrian, > Jim, > Double spacing works for me. Apologies for the poorly formatted posts. > I don't want to give an explicit full pathname because someone else > (user) will be saving the Folder > (containing all the exe's for use) and I cannot guarantee it will be > in the path I might spec

Re: Launch another app from my standalone

2009-08-30 Thread Adrian Williams
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 2

Re: Launch another app from my standalone

2009-08-30 Thread Len Morgan
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 y

Re: Launch another app from my standalone

2009-08-30 Thread Adrian Williams
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

Re: Launch another app from my standalone

2009-08-30 Thread Adrian Williams
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

Re: Launch another app from my standalone

2009-08-30 Thread Len Morgan
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 g

Re: Launch another app from my standalone

2009-08-30 Thread Len Morgan
Adrian, Before we go any further, if you're going to get MEANINGFUL help from this forum, you've got to be much more specific when you ask a question or show a code segment. For example: -- function getPathToFile pFile put the filename of this stack into theFile --removed unwanted 'the'

Re: Launch another app from my standalone

2009-08-30 Thread Scott Morrow
Hello Adrian, I've sort of re-written what Len suggested but without using a separate function or handler. You can just put the whole thing in where you need it. Eventually you may want to break out pieces of your code by using custom functions and commands but this should work. Scott M

Re: Launch another app from my standalone

2009-08-30 Thread Len Morgan
Thank you Scott for stating what I was trying to say far more diplomatically than I could given my mood at the time. Civility rocks! len Scott Morrow wrote: Hello Adrian, I've sort of re-written what Len suggested but without using a separate function or handler. You can just put the whole

Re: Launch another app from my standalone

2009-08-30 Thread Adrian Williams
Len, Scot, Your amendments/solutions work and what's more I can follow and understand how they work because of the excellent commenting. Rev is a fantastic environment and useful beyond description. The online docs show syntax of statements and lots of other vital info. But, to the novice the

Re: Launch another app from my standalone

2009-09-02 Thread Adrian Williams
Len, Trying this FUNCTION and the' to use' right afterwards gives an error: 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

Re: Launch another app from my standalone

2009-09-02 Thread Adrian Williams
Len or anyone else have an answer to this, 'end FUNCTION' gives the error: Handler: error in command Object OK LineFUNCTION getPathToFile pFile HintFUNCTION On 30 Aug 2009, at 17:24, Len Morgan wrote: I"m hoping Trevor won't mind me sharing this little snippet of code:

Re: Launch another app from my standalone

2009-09-02 Thread Phil Jimmieson
Hi Adrian, at the end of the function definition, you only put "end" and the name of the function - you don't include the parameter list. On 2 Sep 2009, at 17:10, Adrian Williams wrote: Len or anyone else have an answer to this, 'end FUNCTION' gives the error: Handler: error in command Obj

Re: Launch another app from my standalone

2009-09-02 Thread Phil Jimmieson
Oops, I meant to say you don't include a parameter list, or the word "function" again. On 2 Sep 2009, at 17:13, Phil Jimmieson wrote: Hi Adrian, at the end of the function definition, you only put "end" and the name of the function - you don't include the parameter list. On 2 Sep 2009, at 17

Re: Launch another app from my standalone

2009-09-02 Thread Adrian Williams
Phil, Already tried just 'end' - it gets the same error! Adrian On 2 Sep 2009, at 17:13, Phil Jimmieson wrote: Hi Adrian, at the end of the function definition, you only put "end" and the name of the function - you don't include the parameter list. On 2 Sep 2009, at 17:10, Adrian Williams w

Re: Launch another app from my standalone

2009-09-02 Thread Phil Jimmieson
You need end, and the name of the function you're ending (but not the word "function"). 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 On 2 Sep 2009, at 17

Re: Launch another app from my standalone

2009-09-02 Thread Phil Davis
So... maybe we should start at the beginning. The object in which the error occurred is apparently named "OK". What does the code of that object look like? Phil Davis Adrian Williams wrote: Phil, Already tried just 'end' - it gets the same error! Adrian On 2 Sep 2009, at 17:13, Phil Jimmie

Re: Launch another app from my standalone

2009-09-02 Thread J. Landman Gay
Adrian Williams wrote: Len or anyone else have an answer to this, 'end FUNCTION' gives the error: Handler: error in command ObjectOK LineFUNCTION getPathToFile pFile HintFUNCTION There is a strict format you have to follow for command handlers and function handlers. The f

Re: Launch another app from my standalone

2009-09-02 Thread Adrian Williams
Phil, Mouse up calls stack script to remove installed font and return result. That already works. When adding the FUNCTION code, the FUNCTION line keeps throwing up the error. I've followed all the advice everyone has given - I'm stumped. - - - on mouseUp start using stack "My App" put

Re: Launch another app from my standalone

2009-09-02 Thread Adrian Williams
Phil, Mouse up calls stack script to remove installed font and return result. That already works. When adding the FUNCTION code, the FUNCTION line keeps throwing up the error. I've followed all the advice everyone has given - I'm stumped. - - - on mouseUp start using stack "My App" put "

Re: Launch another app from my standalone

2009-09-02 Thread Adrian Williams
Phil, Now have slightly different error: TypeCommands: missing ',' Object OK LineFUNCION getPathToFile pFile HintpFile but there is only one parameter so does not require a comma. Adrian On 2 Sep 2009, at 18:26, Phil Davis wrote: So... maybe we should star

Re: Launch another app from my standalone

2009-09-03 Thread Phil Davis
Adrian, Are you familiar with Rev's debugger? This might be a good time to use it. If it were me, I would set a breakpoint on the line before the one where you call getPathToFile(). Then you will be able to see more clearly the state of the various data items. That may tell you what's wrong.

Re: Launch another app from my standalone

2009-09-03 Thread Adrian Williams
Phil, Set a breakpoint on line before and have same error when hitting "Apply". Adrian On 3 Sep 2009, at 08:17, Phil Davis wrote: Adrian, Are you familiar with Rev's debugger? This might be a good time to use it. If it were me, I would set a breakpoint on the line before the one where

Re: Launch another app from my standalone

2009-09-03 Thread Klaus Major
Hi Adrian, ... Adrian Williams wrote: Phil, Now have slightly different error: TypeCommands: missing ',' ObjectOK LineFUNCION getPathToFile pFile There is a T missing in funcTion! But maybe this is just a typo in your post? Best Klaus -- Klaus Major http://www.major-k.

Re: Launch another app from my standalone

2009-09-03 Thread Adrian Williams
Hi Klaus, Yes, it was just a typo. Thanks, Adrian On 3 Sep 2009, at 08:52, Klaus Major wrote: Hi Adrian, ... Adrian Williams wrote: Phil, Now have slightly different error: TypeCommands: missing ',' ObjectOK LineFUNCION getPathToFile pFile There is a T missing in func

Re: Launch another app from my standalone

2009-09-03 Thread Adrian Williams
Klaus, Now that literal FUNCTION is corrected, still getting 'error in command'... TypeHandler: error in command Object OK LineFUNCTION getPathToFile pFile HintFUNCTION Thanks, Adrian On 3 Sep 2009, at 08:52, Klaus Major wrote: H

Re: Launch another app from my standalone

2009-09-03 Thread Phil Jimmieson
Hi Adrian, if the script in your email is exactly what you are using, then you need to move the function declaration outside of the mouseup handler. I don't think that these things can be nested. - - - FUNCTION getPathToFile pFile put the filename of this stack into the theFile set t

Re: Launch another app from my standalone

2009-09-04 Thread Adrian Williams
Phil, Thanks for spotting that a FUNCTION needs to be stated before mouseUp. I knew that of course but overlooked it. Something that happens with irregular use of Rev. Thanks too to everyone who responded to resolve my problems. In the process I learned a lot. At least one thing I learned; I

Re: Launch another app from my standalone

2009-09-05 Thread Len Morgan
Adrian, I don't think the problem was that the function was defined after the mouseUp handler, it's that it was defined IN the mouseUp handler. You cannot define a function (or command) within the "onend" of another handler. len Adrian Williams wrote: Phil, Thanks for spotting that a

Re: Launch another app from my standalone

2009-09-05 Thread Adrian Williams
Len Thanks - understood! Adrian On 5 Sep 2009, at 13:34, Len Morgan wrote: Adrian, I don't think the problem was that the function was defined after the mouseUp handler, it's that it was defined IN the mouseUp handler. You cannot define a function (or command) within the "onend" of

Rev Documentation [WAS: Launch another app from my standalone]

2009-08-31 Thread Len Morgan
Adrian Williams wrote: IMHO in the doc for 'launch', right underneath 'Examples', an additional 'Example in use' would be helpful. Jim's snippet with its comments puts one of the example statements into some context... put the defaultFolder into tOrigDefaultFolder set the defaultFolder to

Rev Documentation [WAS: Launch another app from my standalone]

2009-08-31 Thread Adrian Williams
Len, Your observations are correct and I already have Dan's "Software at the Speed of thought". It's just that I'm an occasional user of Rev; I don't use it anywhere near full-time. Not coming from a HyperCard background does not prepare one for Rev's principles. If there are different ways

Re: Rev Documentation [WAS: Launch another app from my standalone]

2009-08-31 Thread Ian Wood
I suspect the easy availability of something like this is what will make or break the wider acceptance of RevMedia. Ian On 31 Aug 2009, at 14:25, Adrian Williams wrote: I've seen talk of a 'cookbook' on this list. Perhaps it is time for someone to captalise on that? __

Re: Rev Documentation [WAS: Launch another app from my standalone]

2009-08-31 Thread Bernard Devlin
I have to say, I think the Revolution documentation is pretty good. Obviously there are many things available in Rev that one forgets if one is not using Rev almost every day. However, whenever I return to using Rev after some weeks away from it, I find that I never spend more than a couple of min

RE: Rev Documentation [WAS: Launch another app from my standalone]

2009-08-31 Thread Jim Bufalini
Adrian Williams wrote: > Len, > > Your observations are correct and I already have Dan's "Software at > the Speed of thought". > It's just that I'm an occasional user of Rev; I don't use it anywhere > near full-time. > Not coming from a HyperCard background does not prepare one for Rev's > princ

Re: Rev Documentation [WAS: Launch another app from my standalone]

2009-08-31 Thread William Moseid
The D/L link is a compressed Help File (fmpro_help) that one can use in a browser. What Help? Well, in this case it is Filemaker. The reason for including it is to illustrate a reasonable approach for new to expert Revolution developers as another way to present Help for Revolution. This is a c

Re: Rev Documentation [WAS: Launch another app from my standalone]

2009-08-31 Thread Len Morgan
Adrian Williams wrote: Dans' book, great though it is as a primer, is not as accessible as many 'QuickStart' guidebooks available these days. I wouldn't expect too much from a "Quick Start Guide to Piloting the Space Shuttle." Complicated topics are hard condense down into a "Quick Start."

Re: Rev Documentation [WAS: Launch another app from my standalone]

2009-09-01 Thread Bernard Devlin
I downloaded an OS X utility (chmox) that can open Windows-only help files (.chm) files. So now I can read the documentation you linked to. You say you can use this FM documentation in a browser, but surely that is only on Windows? Or does FM on OS X install something that enables you to view it