Re: Do ... as Applescript, bugs??

2010-04-12 Thread Sarah Reichelt
On Mon, Apr 12, 2010 at 11:38 PM, Andrew Meit  wrote:
> My error msg: Execution Error
>
> The file name changes each time its run for its created via Rev script. So no 
> file is made till the end. And I have to go through AS editor because am 
> creating AS files on the fly for later use. It appears Rev is somehow not 
> letting go of its connection to the AS Editor. I am trying not to have to 
> type stuff out a lot due to my disabilities thats why am creating this. 
> Please, someone...help. Thanks.


Andrew, can you provide more info about what you are trying to do here.

If you are using Rev to create AppleScript apps, then stop. I always
tell people that it is pointless trying to write AppleScript in Rev,
but to write it in the AS editor and when you are sure it works, then
transfer it to Rev.

When you say your script works once and then fails, are you trying to
save the same script each time? If not, maybe there is an error in the
second script that is preventing compilation.

Like I said before, I don't understand what you are trying to do, so
it is very hard to provide any useful advice.

Cheers,
Sarah
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Do ... as Applescript, bugs??

2010-04-12 Thread Andrew Meit
My error msg: Execution Error

The file name changes each time its run for its created via Rev script. So no 
file is made till the end. And I have to go through AS editor because am 
creating AS files on the fly for later use. It appears Rev is somehow not 
letting go of its connection to the AS Editor. I am trying not to have to type 
stuff out a lot due to my disabilities thats why am creating this. Please, 
someone...help. Thanks.


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Do ... as Applescript, bugs??

2010-04-11 Thread stephen barncard
Andrew,
What is the error that you get and from where? Is it a "file exists" error?
Perhaps that is why it works the first time and not the second in Rev;  The
applescript editor probably traps for that.
perhaps you could try "file exists" in rev to check first.

On 11 April 2010 20:03, Andrew Meit  wrote:

> I give up. It appears do AS is somehow picky/buggy or what...here is my
> simple code:
>
> copy to clipboard this: --testing code
>
> I have the AS code below in a field:
>
> tell application "AppleScript Editor"
> activate
> set fpath to "/Users/ScholarMeit/Desktop/As tests/moving window"
> make new document with data the clipboard
> compile document 1
> save document 1 in POSIX file fpath as "script"
> close window 1
> end tell
>
> With this script for the field:
>
> on enterinfield
> do (text of me) as Applescript
> put the result
> end enterinfield
>
> I tried both the latest beta and latest shipping version, both hang. I am
> using 10.6.3. iMac 21.5.
> It will work once and then on next time its called Rev hangs a long time
> then report an error.
> AS code works without error in Script editor.
>
> It was supposed to help me work faster...any clues? Thanks.
> Andrew___
> use-revolution mailing list
> use-revolution@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



-- 
-
Stephen Barncard
Back home in SF
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Do ... as Applescript, bugs??

2010-04-11 Thread Andrew Meit
I give up. It appears do AS is somehow picky/buggy or what...here is my simple 
code:

copy to clipboard this: --testing code

I have the AS code below in a field:

tell application "AppleScript Editor"
activate
set fpath to "/Users/ScholarMeit/Desktop/As tests/moving window"
make new document with data the clipboard
compile document 1
save document 1 in POSIX file fpath as "script"
close window 1
end tell

With this script for the field:

on enterinfield
do (text of me) as Applescript
put the result
end enterinfield

I tried both the latest beta and latest shipping version, both hang. I am using 
10.6.3. iMac 21.5.
It will work once and then on next time its called Rev hangs a long time then 
report an error. 
AS code works without error in Script editor.

It was supposed to help me work faster...any clues? Thanks. 
Andrew___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Do ... as Applescript, bugs??

2010-04-11 Thread Sarah Reichelt
On Mon, Apr 12, 2010 at 4:18 AM, Andrew Meit  wrote:
> Ahh I had an insight to rework it and now it works. However, am always 
> wanting to work smart than hard...
> I am creating AS statements on the fly via Rev then sending them to 
> Applescript editor to be compiled and saved via clipboard.
> Is there a way to send a list of AS statements to AS to be compiled and saved?
>
> Like this?
>
> do "Tell process "&"Applescript"&cr&"to compile "&AS_stmts as Applescript

Why?

In revTalk, you can just use:
   do AS_stmts as Applescript
and it doesn't need to be pre-compiled. You can save it as text if you
want and then pull it into your app or stack and "do" it.
Running it through the Script Editor first seems an unnecessary step.

Cheers,
Sarah
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Do ... as Applescript, bugs??

2010-04-11 Thread Ian Wood


On 11 Apr 2010, at 19:18, Andrew Meit wrote:

Ahh I had an insight to rework it and now it works. However, am  
always wanting to work smart than hard...
I am creating AS statements on the fly via Rev then sending them to  
Applescript editor to be compiled and saved via clipboard.
Is there a way to send a list of AS statements to AS to be compiled  
and saved?


Like this?

do "Tell process "&"Applescript"&cr&"to compile "&AS_stmts as  
Applescript


thanks, andrew


You can compile AppleScripts via the command line although I've not  
done much of it. Have a look at osacompile and osascript in the  
Terminal.


http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/osacompile.1.html

Ian

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Do ... as Applescript, bugs??

2010-04-11 Thread Andrew Meit
Ahh I had an insight to rework it and now it works. However, am always wanting 
to work smart than hard...
I am creating AS statements on the fly via Rev then sending them to Applescript 
editor to be compiled and saved via clipboard.
Is there a way to send a list of AS statements to AS to be compiled and saved?

Like this?

do "Tell process "&"Applescript"&cr&"to compile "&AS_stmts as Applescript

thanks, andrew___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Do ... as Applescript, bugs??

2010-04-11 Thread Jim Ault
One 'bug' that was present for me in Rev 2.7.2 and Rev 2.9.0 was in  
the IDE


I found that after the first AScript sent to a Rev stack 'on  
appleevent', that subsequent calls to Rev were silent.


The answer was to switch from Browse tool to Pointer, then back again.
This was not the case for making calls to other programs like Excel,  
Photoshop, Word, etc.




On Apr 11, 2010, at 9:22 AM, Andrew Meit wrote:

I am struggling to figure out why do as Applescript works once  
correctly but second time its fired off, Rev hangs and returns  
"execution error". My As code works correctly within the As editor  
all the time. I am talking directly to the Applescript editor with  
my do statements. I am using 4.0. Are there known bugs with As with  
Rev at this time?
Any As gurus willing to help please contact me off list.  
Thanks___




Jim Ault
Las Vegas



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Do ... as Applescript, bugs??

2010-04-11 Thread Ian Wood


On 11 Apr 2010, at 17:22, Andrew Meit wrote:

I am struggling to figure out why do as Applescript works once  
correctly but second time its fired off, Rev hangs and returns  
"execution error". My As code works correctly within the As editor  
all the time. I am talking directly to the Applescript editor with  
my do statements. I am using 4.0. Are there known bugs with As with  
Rev at this time?

Any As gurus willing to help please contact me off list. Thanks


Can you post a sample of your script?

Also, are you scripting the Script Editor itself? Otherwise there  
should be no need to talk to it.


Ian
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Do ... as Applescript, bugs??

2010-04-11 Thread Mark Schonewille

Andrew,

I don't understand how Rev can hang and still return something. What  
do you mean exactly?


It is probably wrong to talk directly to the AppleScript editor. I  
can't think of any reason why one would want that. What are you trying  
to do?


Please, post your script. I'd be happy to try to help you on-list.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer

Share the clipboard of your computer with other computers on a local  
network with Clipboard Link

http://clipbaordlink.economy-x-talk.com

Op 11 apr 2010, om 18:22 heeft Andrew Meit het volgende geschreven:

I am struggling to figure out why do as Applescript works once  
correctly but second time its fired off, Rev hangs and returns  
"execution error". My As code works correctly within the As editor  
all the time. I am talking directly to the Applescript editor with  
my do statements. I am using 4.0. Are there known bugs with As with  
Rev at this time?

Any As gurus willing to help please contact me off list. Thanks




___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Do ... as Applescript, bugs??

2010-04-11 Thread Andrew Meit
I am struggling to figure out why do as Applescript works once correctly but 
second time its fired off, Rev hangs and returns "execution error". My As code 
works correctly within the As editor all the time. I am talking directly to the 
Applescript editor with my do statements. I am using 4.0. Are there known bugs 
with As with Rev at this time? 
Any As gurus willing to help please contact me off list. 
Thanks___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution