Applescript slow down through RS launcher

Hi everybody
I’v made a application to copy and paste object from adobe indesign to photoshop smart object
All in applescript
I’v made a small application in Real studio 2012 2.1 to launch several applescript than i’v made
the problem is that my apps to copy-paste object ( work perfectly in stand alone applescript )
But trough the RS launcher the apps seems to fill up a buffer
e.x.: after 6 layers of copy…paste, the task slow down to barely stop ( but still working ) even if in my applescript i empty the pasteboard each loop
It doesn’t happen in stand alone applescript of 20 layers
Why through a simply launcher it react this way
thanks

[quote=145556:@Denis Despres]Hi everybody
I’v made a application to copy and paste object from adobe indesign to photoshop smart object
All in applescript
I’v made a small application in Real studio 2012 2.1 to launch several applescript than i’v made
the problem is that my apps to copy-paste object ( work perfectly in stand alone applescript )
But trough the RS launcher the apps seems to fill up a buffer
e.x.: after 6 layers of copy…paste, the task slow down to barely stop ( but still working ) even if in my applescript i empty the pasteboard each loop
It doesn’t happen in stand alone applescript of 20 layers
Why through a simply launcher it react this way[/quote]

If you do not need a return value from your script, look at Osascript which lets you run an AppleScript from the shell. It will probably solve what appears to be a memory issue.
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/osascript.1.html

Thank you Michel
But i really dont catch how it work…
I think to run directly applescript and give up battling with RS

[quote=145621:@Denis Despres]Thank you Michel
But i really dont catch how it work…
I think to run directly applescript and give up battling with RS[/quote]

Running through Osascript is a way to run a script through the command line. You mentioned your app was launching the scripts. This is just another way of doing it. For instance :

dim s as new shell s.execute("osascript myscript.scpt argument1 argument2")

Thanks Michel to dont give up on help
i’m trying to modify my applescript ( NOT GOOD )
OK now i’m understand… but it wont run
on break: file not found… i’v try with and without extension
is it work like normally applescript add to project ?
or it must have a path to folder
thanks

you can also make a constant (string) with the content of your script,
beginning with:
/usr/bin/osascript <<-EOF
and ending with:
EOF

Example:
Constant with name ‘myscript’

/usr/bin/osascript <<-EOF
display dialog "Hello!" buttons {"OK", "Cancel"} default button 1
display dialog "Hello Again" buttons {"OK", "Cancel"} default button 1
EOF

call it:

dim cmd as new shell
cmd.execute myscript

there is an example here in the forum

[quote=145674:@Denis Despres]Thanks Michel to dont give up on help
i’m trying to modify my applescript ( NOT GOOD )
OK now i’m understand… but it wont run
on break: file not found… i’v try with and without extension
is it work like normally applescript add to project ?
or it must have a path to folder
thanks[/quote]

Difficult to know what is going on without the code…

Even with Alex’s way it doesnt work
This is the result of the example
Like osascript cant be found in my MAC

2014-11-27 05:07:56.865 osascript[546:707] Error loading /Library/ScriptingAdditions/QXPScriptingAdditions.osax/Contents/MacOS/QXPScriptingAdditions: dlopen(/Library/ScriptingAdditions/QXPScriptingAdditions.osax/Contents/MacOS/QXPScriptingAdditions, 262): no suitable image found. Did find: /Library/ScriptingAdditions/QXPScriptingAdditions.osax/Contents/MacOS/QXPScriptingAdditions: mach-o, but wrong architecture osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/QXPScriptingAdditions.osax" declares no loadable handlers.
according this site it matters with 32 or 64 bit
http://www.macosxguru.net/article.php?story=20100803114723689
im not with SnowLeopard But i’v got same message described
i should type “arch -i386 " in front of osascript
Doesnt work either - " No such file or directory”
any Clue ???

[quote=146244:@Denis Despres]Even with Alex’s way it doesnt work
This is the result of the example
Like osascript cant be found in my MAC

2014-11-27 05:07:56.865 osascript[546:707] Error loading /Library/ScriptingAdditions/QXPScriptingAdditions.osax/Contents/MacOS/QXPScriptingAdditions: dlopen(/Library/ScriptingAdditions/QXPScriptingAdditions.osax/Contents/MacOS/QXPScriptingAdditions, 262): no suitable image found. Did find: /Library/ScriptingAdditions/QXPScriptingAdditions.osax/Contents/MacOS/QXPScriptingAdditions: mach-o, but wrong architecture osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/QXPScriptingAdditions.osax" declares no loadable handlers.
according this site it matters with 32 or 64 bit
http://www.macosxguru.net/article.php?story=20100803114723689
im not with SnowLeopard But i’v got same message described
i should type “arch -i386 " in front of osascript
Doesnt work either - " No such file or directory”
any Clue ???[/quote]

I get the very same message under Yosemite, but the scpt does execute. You may want to try a script from the terminal and see what happens.