I have a small problem with Platypus 3.3 www.sveinbjorn.org/platypus using AppleScript…
I write an application with Bundle Contents, and when the final myPlatypus.app try to path using this script:
set myApp to (path to me as string)
The result is something like: “myHd:Users:MyHome:myPlatypus.app:Contents:Resources:script:”
– it use “script” like being my running app
So I tried:
set myApp to (path to current application as string)
and it returned: “myHd:usr:bin:osascript”
– ???, sorry… I don’t know exactly why it happens
And if I try to use:
set myResource to ((path to resource “myResource”) as string)
I got an error couse it path my application Resources folder to “…myPlatypus.app:Contents:Resources:script:Contents:Resources”
I can’t use the “path to frontmost application” command couse user can switch it, and can’t use “path to application “myPlatypus.app”” couse the name can always be changed, and I’m making many variations of the same project.
Im solving this issue with the command:
set resources_folder to (text 1 through -7 of (path to me as string))
So I can change the final of path “…Contents:Resources:script:” to “…Contents:Resources:”
The problem with it is that I can’t use single commands like “tell me to activate” .
I’m newb with Scripts, and I think there’s an easy way to solve it, so plz, can someone give me any help???
Thx so much in advance…