New topic: Running a compiled AppleScript vs. the script
<http://forums.realsoftware.com/viewtopic.php?t=30495> Page 1 of 1 [ 7 posts ] Previous topic | Next topic Author Message martinpaulrice Post subject: Running a compiled AppleScript vs. the scriptPosted: Thu Oct 15, 2009 12:04 pm Joined: Wed Apr 11, 2007 1:17 pm Posts: 130 Location: Signal Mountain, TN I just tried to run my first AppleScript from an RB (2009r4) test app. I found that when I drag just the script to the project it will run, but when I drag the compiled script to the project it won't run and I get the "this method or property does not exist" message. I've tried whatsComingBack = ScriptName and whatsComingBack = ScriptName() whatsComingBack is a string variable I get the impression from the User's Guide that you can include the AppleScript application in the project. Well, it certainly appears on the project page when I drag it there. Any advice or explanation would be appreciated. Thanks! _________________ Martin Signal Mountain, TN Top mrebar Post subject: Re: Running a compiled AppleScript vs. the scriptPosted: Thu Oct 15, 2009 1:49 pm Joined: Wed Feb 15, 2006 1:30 pm Posts: 2919 Location: U.S.A (often), Creswell, often Dallas, Atlanta, Spokane, Pago Pago. I agree the UG is not clear on this point. Scripts run, but AppleScript Applications do not. Use scripts. Michael _________________ RB 2009r2, OS 10.5.6, Win XP SP 3 Top martinpaulrice Post subject: Re: Running a compiled AppleScript vs. the scriptPosted: Thu Oct 15, 2009 2:01 pm Joined: Wed Apr 11, 2007 1:17 pm Posts: 130 Location: Signal Mountain, TN Hmm, that might be a show stopper, I think (I'm really new at this). It's OK for me because I use the app on my machine and I don't really expect anyone else to use it on a different machine. But if someone does . . .? Since the script name in the project is just an alias, if I gave the app to anyone they'd have to have the script file, too, wouldn't they? And if so, would the app, when the script is invoked -- in this case in the app.close event -- know where to find the script on someone else's machine? Thanks. _________________ Martin Signal Mountain, TN Top timhare Post subject: Re: Running a compiled AppleScript vs. the scriptPosted: Thu Oct 15, 2009 2:49 pm Joined: Fri Jan 06, 2006 3:21 pm Posts: 6571 Location: Portland, OR USA If you drag the script into your project, it becomes part of the app that you give them, so yes, it will know where to find it. Top martinpaulrice Post subject: Re: Running a compiled AppleScript vs. the scriptPosted: Thu Oct 15, 2009 3:06 pm Joined: Wed Apr 11, 2007 1:17 pm Posts: 130 Location: Signal Mountain, TN Thanks, Tim. Just to be sure I understand, would they still have to have the script, too, or will that be included, as you said, as part of the app, when the app itself is compiled? Thanks again. _________________ Martin Signal Mountain, TN Top timhare Post subject: Re: Running a compiled AppleScript vs. the scriptPosted: Thu Oct 15, 2009 3:16 pm Joined: Fri Jan 06, 2006 3:21 pm Posts: 6571 Location: Portland, OR USA When you compile your app, the script is copied into your app's resources folder. Top martinpaulrice Post subject: Re: Running a compiled AppleScript vs. the scriptPosted: Thu Oct 15, 2009 3:37 pm Joined: Wed Apr 11, 2007 1:17 pm Posts: 130 Location: Signal Mountain, TN Thanks so much, Tim. I really appreciate it. _________________ Martin Signal Mountain, TN Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 7 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
