Re: applescript question

2010-10-28 Thread Yves COPPE


Le 28 oct. 10 à 14:49, Mark Schonewille a écrit :


Hi Yves,

Why don't you use the choose file command? Much easier.



ok, I will change my script

thanks

Greetings.

Yves COPPE
yvesco...@skynet.be

___
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: applescript question

2010-10-28 Thread Mark Schonewille
Hi Yves,

Why don't you use the choose file command? Much easier.

--
Best regards,

Mark Schonewille

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

Download the Installer Maker plugin for Runtime Revolution at http://qurl.tk/ce 
Create installers for Mac and Windows on *every* Rev-compatible platform. No 
additional software needed.

On 28 okt 2010, at 14:48, Yves COPPE wrote:

> 
> Le 28 oct. 10 à 14:37, Mark Schonewille a écrit :
> 
>> That's strange. I don't get any errors at all, even if the file doesn't 
>> exist.
>> 
>> Which version of Mac OS X are you using? "as unicode text" might no longer 
>> be necessary.
>> 
> 
> leopard on a G5 and snow leopard on a Core 2 duo
> same problem
> 
> Greetings.
> 
> Yves COPPE
> yvesco...@skynet.be

___
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: applescript question

2010-10-28 Thread Yves COPPE


Le 28 oct. 10 à 14:37, Mark Schonewille a écrit :

That's strange. I don't get any errors at all, even if the file  
doesn't exist.


Which version of Mac OS X are you using? "as unicode text" might no  
longer be necessary.




leopard on a G5 and snow leopard on a Core 2 duo
same problem

Greetings.

Yves COPPE
yvesco...@skynet.be

___
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: applescript question

2010-10-28 Thread Mark Schonewille
That's strange. I don't get any errors at all, even if the file doesn't exist.

Which version of Mac OS X are you using? "as unicode text" might no longer be 
necessary. 

--
Best regards,

Mark Schonewille

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

Download the Installer Maker plugin for Runtime Revolution at http://qurl.tk/ce 
Create installers for Mac and Windows on *every* Rev-compatible platform. No 
additional software needed.

On 28 okt 2010, at 14:30, Yves COPPE wrote:

> 
> Le 28 oct. 10 à 14:13, Mark Schonewille a écrit :
> 
>> Hi Yves,
>> 
>> Runs fine here. What's your problem?
>> 
> 
> says
> 
> error
> can't find file this has been destroyed or destroyed (in French !)
> 
> 
>> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> Greetings.
> 
> Yves COPPE
> yvesco...@skynet.be
> 
> ___
> 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

___
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: applescript question

2010-10-28 Thread Yves COPPE


Le 28 oct. 10 à 14:13, Mark Schonewille a écrit :


Hi Yves,

Runs fine here. What's your problem?



says

error
can't find file this has been destroyed or destroyed (in French !)



http://lists.runrev.com/mailman/listinfo/use-revolution


Greetings.

Yves COPPE
yvesco...@skynet.be

___
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: applescript question

2010-10-28 Thread Mark Schonewille
Hi Yves,

Runs fine here. What's your problem?

--
Best regards,

Mark Schonewille

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

Download the Installer Maker plugin for Runtime Revolution at http://qurl.tk/ce 
Create installers for Mac and Windows on *every* Rev-compatible platform. No 
additional software needed.

On 28 okt 2010, at 14:06, Yves COPPE wrote:

> Hello,
> 
> on mac machine
> I want to ask the user the name of a MS Excell file on the desktop
> then
> 
> I want this script not in LiveCode language but applescript (for another 
> purpose afterwards in the livecode script)
> 
> here is my applescript code that doesn't run  (!)
> 
> set le_chemin to (path to desktop) as unicode text
> set le_nom to display dialog "Saisissez le nom du classeur" default answer 
> ".xlsx"
> set mon_classeur to le_chemin & ":" & text returned of le_nom
> 
> tell application "Microsoft Excel"
> activate
> open mon_classeur
> end tell
> 
> Can someone help me ???
> 
> Amicalement.
> 
> Yves COPPE
> yvesco...@skynet.be
> 
> 
> 
> Greetings.
> 
> Yves COPPE
> yvesco...@skynet.be

___
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


applescript question

2010-10-28 Thread Yves COPPE

Hello,

on mac machine
I want to ask the user the name of a MS Excell file on the desktop
then

I want this script not in LiveCode language but applescript (for  
another purpose afterwards in the livecode script)


here is my applescript code that doesn't run  (!)

set le_chemin to (path to desktop) as unicode text
set le_nom to display dialog "Saisissez le nom du classeur" default  
answer ".xlsx"

set mon_classeur to le_chemin & ":" & text returned of le_nom

tell application "Microsoft Excel"
activate
open mon_classeur
end tell

Can someone help me ???

Amicalement.

Yves COPPE
yvesco...@skynet.be



Greetings.

Yves COPPE
yvesco...@skynet.be

___
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: RunRev AppleScript Question

2008-10-01 Thread BNig

Hi Dave,

building on Marks script a version that is not hard coded and with return as
suggested by Tom in applescript:
I send it to the current card since it seems that when you just send it to
the stack it doesnt go further down the message path whereas if you send it
to a card it goes up the message path, although the documentation says an
apple event is sent to the current card.



set tHello to "Hello World"
set tStackName to "Untitled 1"
set myScript to "send \"foo\" && quote & \"" & tHello & "\" & quote to
current card of stack \"" & tStackName & "\""
tell application "Revolution" to do script myScript
set x to the result

 

on the Revolution side:

--
on foo theString
beep
put theString
return "OK"
end foo
-

still dizzy form all the quotes and "" and \"  :-)

regards

Bernd
-- 
View this message in context: 
http://www.nabble.com/RunRev-AppleScript-Question-tp19758704p19762162.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
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: RunRev AppleScript Question

2008-10-01 Thread Thomas McGrath III
Sorry, I left out the to card 1 -- which is fine in case your scripts  
are at the stack level but if they are on the card then include the to  
card 1 of stack \"revSaveAsStandalone\"


TM III
On Oct 1, 2008, at 10:41 AM, Thomas McGrath III wrote:

I have found that if the code is at the card level then I have to  
include the card in AS.


Also, the variable myStackShortName variable is actually being sent  
as the text myStackShortName and not the name that variable holds.


If SATest1 is declared in RR then this will work:
set myScript to "send \"revSaveAsStandalone  myStackShortName\" to  
stack \"revSaveAsStandalone\""


BUT if it needs to be declared in AS then you should build the  
script in AS:
set myScript to "send \"revSaveAsStandalone SATest1\"  to stack  
\"revSaveAsStandalone\""


HTHs

Tom McGrath

___
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: RunRev AppleScript Question

2008-10-01 Thread Thomas McGrath III
I have found that if the code is at the card level then I have to  
include the card in AS.


Also, the variable myStackShortName variable is actually being sent as  
the text myStackShortName and not the name that variable holds.


If SATest1 is declared in RR then this will work:
set myScript to "send \"revSaveAsStandalone  myStackShortName\" to  
stack \"revSaveAsStandalone\""


BUT if it needs to be declared in AS then you should build the script  
in AS:
set myScript to "send \"revSaveAsStandalone SATest1\"  to stack  
\"revSaveAsStandalone\""


HTHs

Tom McGrath

On Oct 1, 2008, at 10:32 AM, Thomas McGrath III wrote:


Dave

Try this:

set myScript to "send \"foo Hello World\"  to card 1 of stack  
\"Untitled 1\""

tell application "Revolution" to do script myScript

it works here just fine and if you change the RR script to :

on foo theString
 beep
 return theString
end foo

then it will return the string to AS

HTHs

Tom McGrath


On Oct 1, 2008, at 8:30 AM, Dave wrote:


Hi Mark,

I just tried the following:

set myStackShortName to "SATest1"
set myScript to "send \"revSaveAsStandalone\" && quote &  
myStackShortName & quote to stack \"revSaveAsStandalone\""

tell application "Revolution"
do script myScript
end tell

And it doesn't work!

I've been trying loads of different syntax's but I can't find the  
secret code!


Here's an interesting one:

In Stack Script of SATest1 I have the following handler:

on Beeper theMessage
beep
answer theMessage
end Beeper

Then from the AppleScript I do:

set myQuote to (ASCII character 34)

set myRRScript to "send beeper" & " & quote & " & myQuote &  
"Message" & myQuote & " & quote " & " to stack " & myQuote &  
"SATest1" & myQuote


Which works and displays "Message", however if I change it to:

set myRRScript to "send beeper" & " & quote & " & myQuote & "Hello  
Message" & myQuote & " & quote " & " to stack " & myQuote &  
"SATest1" & myQuote


Then Beeper gets called (it beeps!) BUT the message is empty?

What gives???

All the Best
Dave


On 1 Oct 2008, at 13:02, Mark Schonewille wrote:


Dave,

set myScript to
	"send \"revSaveAsStandalone\" && quote & myStackShortName & quote  
to stack \"revSaveAsStandalone\""

tell application "Standalone" to do script myScript

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Dutch forum: http://runrev.info/rrforum/

Benefit from our inexpensive hosting services. See http://economy-x-talk.com/server.html 
 for more info.


On 1 okt 2008, at 13:41, Dave wrote:


Hi All,

Given the Statement:

send "revSaveAsStandalone" && quote & myStackShortName & quote to  
stack "revSaveAsStandalone"


What statement would I have to pass to the Revolution "do script"  
AppleScript command to do the same thing?


Thanks a lot
All the Best
Dave


___
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



___
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


___
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


___
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: RunRev AppleScript Question

2008-10-01 Thread Thomas McGrath III

Dave

Try this:

set myScript to "send \"foo Hello World\"  to card 1 of stack  
\"Untitled 1\""

tell application "Revolution" to do script myScript

it works here just fine and if you change the RR script to :

on foo theString
  beep
  return theString
end foo

then it will return the string to AS

HTHs

Tom McGrath


On Oct 1, 2008, at 8:30 AM, Dave wrote:


Hi Mark,

I just tried the following:

set myStackShortName to "SATest1"
set myScript to "send \"revSaveAsStandalone\" && quote &  
myStackShortName & quote to stack \"revSaveAsStandalone\""

tell application "Revolution"
do script myScript
end tell

And it doesn't work!

I've been trying loads of different syntax's but I can't find the  
secret code!


Here's an interesting one:

In Stack Script of SATest1 I have the following handler:

on Beeper theMessage
beep
answer theMessage
end Beeper

Then from the AppleScript I do:

set myQuote to (ASCII character 34)

set myRRScript to "send beeper" & " & quote & " & myQuote &  
"Message" & myQuote & " & quote " & " to stack " & myQuote &  
"SATest1" & myQuote


Which works and displays "Message", however if I change it to:

set myRRScript to "send beeper" & " & quote & " & myQuote & "Hello  
Message" & myQuote & " & quote " & " to stack " & myQuote &  
"SATest1" & myQuote


Then Beeper gets called (it beeps!) BUT the message is empty?

What gives???

All the Best
Dave


On 1 Oct 2008, at 13:02, Mark Schonewille wrote:


Dave,

set myScript to
	"send \"revSaveAsStandalone\" && quote & myStackShortName & quote  
to stack \"revSaveAsStandalone\""

tell application "Standalone" to do script myScript

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Dutch forum: http://runrev.info/rrforum/

Benefit from our inexpensive hosting services. See http://economy-x-talk.com/server.html 
 for more info.


On 1 okt 2008, at 13:41, Dave wrote:


Hi All,

Given the Statement:

send "revSaveAsStandalone" && quote & myStackShortName & quote to  
stack "revSaveAsStandalone"


What statement would I have to pass to the Revolution "do script"  
AppleScript command to do the same thing?


Thanks a lot
All the Best
Dave


___
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



___
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


___
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: RunRev AppleScript Question

2008-10-01 Thread Mark Schonewille

Hi Dave,

myStackShortName is part of the string, it isn't parsed by  
AppleScript. I suppose Rev can't find stack "myStackShortName".


Here's an example that works.

I have a stack "Untitled 1" with the following script:

on foo theString
   beep
   put theString
end foo

and I made this AppleScript:

set myScript to "send \"foo\" && quote & \"Hello World\" & quote to  
stack \"Untitled 1\""

tell application "Revolution" to do script myScript

If run this script from within Script Editor, I hear the beep and the  
message box contains "Hello World".


--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Dutch forum: http://runrev.info/rrforum/

Benefit from our inexpensive hosting services. See http://economy-x-talk.com/server.html 
 for more info.


On 1 okt 2008, at 14:30, Dave wrote:


Hi Mark,

I just tried the following:

set myStackShortName to "SATest1"
set myScript to "send \"revSaveAsStandalone\" && quote &  
myStackShortName & quote to stack \"revSaveAsStandalone\""

tell application "Revolution"
do script myScript
end tell

And it doesn't work!

I've been trying loads of different syntax's but I can't find the  
secret code!


Here's an interesting one:

In Stack Script of SATest1 I have the following handler:

on Beeper theMessage
beep
answer theMessage
end Beeper

Then from the AppleScript I do:

set myQuote to (ASCII character 34)

set myRRScript to "send beeper" & " & quote & " & myQuote &  
"Message" & myQuote & " & quote " & " to stack " & myQuote &  
"SATest1" & myQuote


Which works and displays "Message", however if I change it to:

set myRRScript to "send beeper" & " & quote & " & myQuote & "Hello  
Message" & myQuote & " & quote " & " to stack " & myQuote &  
"SATest1" & myQuote


Then Beeper gets called (it beeps!) BUT the message is empty?

What gives???

All the Best
Dave



___
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: RunRev AppleScript Question

2008-10-01 Thread Robert Brenstein

On 01.10.2008 at 13:30 Uhr +0100 Dave apparently wrote:

Which works and displays "Message", however if I change it to:

set myRRScript to "send beeper" & " & quote & " & myQuote & "Hello 
Message" & myQuote & " & quote " & " to stack " & myQuote & 
"SATest1" & myQuote


Then Beeper gets called (it beeps!) BUT the message is empty?

What gives???

All the Best
Dave



Have you tried to urlencode the "Hello Message"?

Robert
___
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: RunRev AppleScript Question

2008-10-01 Thread Dave

Hi Mark,

I just tried the following:

set myStackShortName to "SATest1"
set myScript to "send \"revSaveAsStandalone\" && quote &  
myStackShortName & quote to stack \"revSaveAsStandalone\""

tell application "Revolution"
do script myScript
end tell

And it doesn't work!

I've been trying loads of different syntax's but I can't find the  
secret code!


Here's an interesting one:

In Stack Script of SATest1 I have the following handler:

on Beeper theMessage
beep
answer theMessage
end Beeper

Then from the AppleScript I do:

set myQuote to (ASCII character 34)

set myRRScript to "send beeper" & " & quote & " & myQuote & "Message"  
& myQuote & " & quote " & " to stack " & myQuote & "SATest1" & myQuote


Which works and displays "Message", however if I change it to:

set myRRScript to "send beeper" & " & quote & " & myQuote & "Hello  
Message" & myQuote & " & quote " & " to stack " & myQuote & "SATest1"  
& myQuote


Then Beeper gets called (it beeps!) BUT the message is empty?

What gives???

All the Best
Dave


On 1 Oct 2008, at 13:02, Mark Schonewille wrote:


Dave,

set myScript to
	"send \"revSaveAsStandalone\" && quote & myStackShortName & quote  
to stack \"revSaveAsStandalone\""

tell application "Standalone" to do script myScript

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Dutch forum: http://runrev.info/rrforum/

Benefit from our inexpensive hosting services. See http://economy-x- 
talk.com/server.html for more info.


On 1 okt 2008, at 13:41, Dave wrote:


Hi All,

Given the Statement:

send "revSaveAsStandalone" && quote & myStackShortName & quote to  
stack "revSaveAsStandalone"


What statement would I have to pass to the Revolution "do script"  
AppleScript command to do the same thing?


Thanks a lot
All the Best
Dave


___
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



___
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: RunRev AppleScript Question

2008-10-01 Thread Mark Schonewille

Dave,

set myScript to
	"send \"revSaveAsStandalone\" && quote & myStackShortName & quote to  
stack \"revSaveAsStandalone\""

tell application "Standalone" to do script myScript

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Dutch forum: http://runrev.info/rrforum/

Benefit from our inexpensive hosting services. See http://economy-x-talk.com/server.html 
 for more info.


On 1 okt 2008, at 13:41, Dave wrote:


Hi All,

Given the Statement:

send "revSaveAsStandalone" && quote & myStackShortName & quote to  
stack "revSaveAsStandalone"


What statement would I have to pass to the Revolution "do script"  
AppleScript command to do the same thing?


Thanks a lot
All the Best
Dave


___
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


RunRev AppleScript Question

2008-10-01 Thread Dave

Hi All,

Given the Statement:

send "revSaveAsStandalone" && quote & myStackShortName & quote to  
stack "revSaveAsStandalone"


What statement would I have to pass to the Revolution "do script"  
AppleScript command to do the same thing?


Thanks a lot
All the Best
Dave


___
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: Screenshot and Applescript... question

2008-04-08 Thread David Flanders

Hi Sarah,

 get shell("/usr/sbin/screencapture ~/Desktop/Screenshot.png  
filePathTwo" )  works for one monitor, however just found that if you  
have more than one monitor then just add the appropriate number of  
file paths ( with different file names of course )  and screencapture  
is smart enough to get the separate monitors.  Cool beans.


Thanks

David

David Flanders

[EMAIL PROTECTED]

Environment:
MacBook Pro
Intel, Core 2 Duo
2.33 GHz
2 Gigs RAM
OS:
Mac OSX 10.4.11
RunRev 2.8.1

On Apr 8, 2008, at 11:57 PM, Sarah Reichelt wrote:


The shell command screencapture has a parameter "m" that says you only
want to capture the main monitor.
What happens if you leave this out
e.g. get shell("/usr/sbin/screencapture ~/Desktop/Screenshot.png")

I only have one monitor set up here, so cannot test this.

Or using System Events & AppleScript, you can simulate the keystrokes,
like this:
tell application "System Events"
keystroke "#" using {command down, shift down}
end tell

(The keystroke character in the quotes should be whatever you get when
you type Shift-3.)

HTH,
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: Screenshot and Applescript... question

2008-04-08 Thread Sarah Reichelt
 >  Went over to mac OSX hints and only found applescripts using shell()
> and 'screen capture'.  I'm looking to get the OSX screenshot to function
> from applescript ( command-shift-3 ).  Can't find an example.
>
>  I can only get 'screen capture' for getting monitor 1. It won't take a png
> of monitor 2, as the OSX native screenshot will.
>
>  ( command-shift-3 ) gets me two full png's of the main monitor and the
> extended desktop.

The shell command screencapture has a parameter "m" that says you only
want to capture the main monitor.
What happens if you leave this out
e.g. get shell("/usr/sbin/screencapture ~/Desktop/Screenshot.png")

I only have one monitor set up here, so cannot test this.

Or using System Events & AppleScript, you can simulate the keystrokes,
like this:
tell application "System Events"
keystroke "#" using {command down, shift down}
end tell

(The keystroke character in the quotes should be whatever you get when
you type Shift-3.)

HTH,
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


Screenshot and Applescript... question

2008-04-08 Thread David Flanders

Hi,

 Went over to mac OSX hints and only found applescripts using  
shell() and 'screen capture'.  I'm looking to get the OSX screenshot  
to function from applescript ( command-shift-3 ).  Can't find an  
example.


I can only get 'screen capture' for getting monitor 1. It won't take  
a png of monitor 2, as the OSX native screenshot will.


( command-shift-3 ) gets me two full png's of the main monitor and  
the extended desktop.



This is a two eep! alarm. help!

tia

David

David Flanders

[EMAIL PROTECTED]

Environment:
MacBook Pro
Intel, Core 2 Duo
2.33 GHz
2 Gigs RAM
OS:
Mac OSX 10.4.11
RunRev 2.8.1

___
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: Applescript question - request cmd

2006-08-30 Thread Jim Ault
Thanks, Jan,
I already have several utility scripts for doing the Applescript cmd
building.  I found the request command in the Rev reference and thought I
would check it out for simple cases.  Now that I know, I stick with my lib
of wrappers.

BTW, I did find the following link on the Apple site:
http://developer.apple.com/documentation/AppleScript/Conceptual/AppleScriptL
angGuide/index.html

then look down near the bottom of the left hand scroll 'menu' for
Error Numbers and Error Messages, then click.

-1708 is  doesn't understand the  message.
which must mean that Excel does not understand the 'eval' message, like you
said, Jan.

Jim Ault


On 8/30/06 12:26 PM, "Jan Schenkel" <[EMAIL PROTECTED]> wrote:

> --- Jim Ault <[EMAIL PROTECTED]> wrote:
>> Got error -1708 when sending Apple event
>> 
>> in the dictionary
>> 
>> request "the hilite of button 3" from program
>> "HyperCard"
>> Use the request command to obtain data from another
>> application via the eval
>> Apple event.
>> 
>> on testAS
>>   request "address of active cell" from program
>> "Microsoft Excel"
>>   request "value of active cell" from program
>> "Microsoft Excel"
>>   request "get value of active cell" from program
>> "Microsoft Excel"
>> 
>> any of the above run from a script container gives:
 Got error -1708 when sending Apple event
>> 
>>   --  put "tell application "&q&"Microsoft
>> Excel"&q&return into cmd
>>   --  put "get address of active cell"&return after
>> cmd
>>   --  put "get value of active cell"&return after
>> cmd
>>   --  put "end tell"&return after cmd
>>   --  do cmd as applescript
 correct result
>>   put it & cr & the result
>> end testAS
>> 
>> 
>> Question 1 - what am I missing to get the 'request'
>> cmd to work
>> 
>> Question 2 - Where can I find the error codes so I
>> know what is wrong?
>> 
>> Thanks,
>> 
>> Jim Ault
>> 
> 
> Hi Jim,
> 
> The 'request' command requires that the other
> application implements the 'eval' apple event.
> HyperCard was one of the few to implement it (along
> with FoxPro, IIRC), but it looks like Excel doesn't
> implement that particular apple event.
> 
> And that's why your more convoluted second approach
> (building an AppleScript) works, as it sends the
> proper apple events to Excel.
> You could rework that into a generic 'getFromExcel'
> function that builds the AppleScript, executes said
> AppleScript, and returns the value of 'it'.
> 
> The advantage of such a wrapper is that you can then
> add a platform check, and build and execute a VBScript
> instead of an AppleScript if your application is
> running on Windows.
> 
> Jan Schenkel.
> 
> Quartam Reports for Revolution
> 
> 
> =
> "As we grow older, we grow both wiser and more foolish at the same time."  (La
> Rochefoucauld)
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> ___
> 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


___
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: Applescript question - request cmd

2006-08-30 Thread Jan Schenkel
--- Jim Ault <[EMAIL PROTECTED]> wrote:
> Got error -1708 when sending Apple event
> 
> in the dictionary
> 
> request "the hilite of button 3" from program
> "HyperCard"
> Use the request command to obtain data from another
> application via the eval
> Apple event.
> 
> on testAS
>   request "address of active cell" from program
> "Microsoft Excel"
>   request "value of active cell" from program
> "Microsoft Excel"
>   request "get value of active cell" from program
> "Microsoft Excel"
> 
> any of the above run from a script container gives:
> >>Got error -1708 when sending Apple event
> 
>   --  put "tell application "&q&"Microsoft
> Excel"&q&return into cmd
>   --  put "get address of active cell"&return after
> cmd
>   --  put "get value of active cell"&return after
> cmd
>   --  put "end tell"&return after cmd
>   --  do cmd as applescript
>   >>correct result
>   put it & cr & the result
> end testAS
> 
> 
> Question 1 - what am I missing to get the 'request'
> cmd to work
> 
> Question 2 - Where can I find the error codes so I
> know what is wrong?
> 
> Thanks,
> 
> Jim Ault
> 

Hi Jim,

The 'request' command requires that the other
application implements the 'eval' apple event.
HyperCard was one of the few to implement it (along
with FoxPro, IIRC), but it looks like Excel doesn't
implement that particular apple event.

And that's why your more convoluted second approach
(building an AppleScript) works, as it sends the
proper apple events to Excel. 
You could rework that into a generic 'getFromExcel'
function that builds the AppleScript, executes said
AppleScript, and returns the value of 'it'.

The advantage of such a wrapper is that you can then
add a platform check, and build and execute a VBScript
instead of an AppleScript if your application is
running on Windows.

Jan Schenkel.

Quartam Reports for Revolution


=
"As we grow older, we grow both wiser and more foolish at the same time."  (La 
Rochefoucauld)

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
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


Applescript question - request cmd

2006-08-30 Thread Jim Ault
Got error -1708 when sending Apple event

in the dictionary

request "the hilite of button 3" from program "HyperCard"
Use the request command to obtain data from another application via the eval
Apple event.

on testAS
  request "address of active cell" from program "Microsoft Excel"
  request "value of active cell" from program "Microsoft Excel"
  request "get value of active cell" from program "Microsoft Excel"

any of the above run from a script container gives:
>>Got error -1708 when sending Apple event

  --  put "tell application "&q&"Microsoft Excel"&q&return into cmd
  --  put "get address of active cell"&return after cmd
  --  put "get value of active cell"&return after cmd
  --  put "end tell"&return after cmd
  --  do cmd as applescript
  >>correct result
  put it & cr & the result
end testAS


Question 1 - what am I missing to get the 'request' cmd to work

Question 2 - Where can I find the error codes so I know what is wrong?

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: AppleScript Question

2006-07-15 Thread Jim Ault
On 7/15/06 1:48 PM, "Garrett Hylltun" <[EMAIL PROTECTED]> wrote:

> On Jul 14, 2006, at 4:15 PM, Sarah Reichelt wrote:
>> If you actually want the Dictionary app to open, how about trying UI
>> Scripting. It's fiddly, but it does allow AppleScripting of
>> non-scriptable apps. You can read about it on the Apple website.
>> 
>> Cheers,
>> Sarah
> 
> "UI Scripting" ?  Is this part of AppleScript or something?  I'll see
> if I can find that on the site.
> 


This is called UI Elements and you should download the 'inspector' from the
Apple web site and the PreFab stuff below.  I have dabbled with this, but
never built a good solution.  There is a program toolkit made by PreFab that
will make this sort of programming far easier.

PreFab UI Actions
Copyright © 2004-2005 PreFab Software, Inc. and Bill Cheeseman. All rights
reserved.
www.prefab.com/uiactions


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: AppleScript Question

2006-07-15 Thread Garrett Hylltun


On Jul 14, 2006, at 4:15 PM, Sarah Reichelt wrote:


Ummm. Ok, don't laugh at me, but I don't use Dashboard and have
it disabled.  So I don't know much about that.  Where would I find
the widgets for dashboard?  :-(


[snip]


If you actually want the Dictionary app to open, how about trying UI
Scripting. It's fiddly, but it does allow AppleScripting of
non-scriptable apps. You can read about it on the Apple website.

Cheers,
Sarah


"UI Scripting" ?  Is this part of AppleScript or something?  I'll see  
if I can find that on the site.


Thanks,
-Garrett
___
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: AppleScript Question

2006-07-14 Thread Sarah Reichelt

Ummm. Ok, don't laugh at me, but I don't use Dashboard and have
it disabled.  So I don't know much about that.  Where would I find
the widgets for dashboard?  :-(


In your main Library folder (the one in your hard disk's root
directory, not the one in your user folder), you'll find a folder
called "Widgets". In there you should see all the default widgets.
Right-click on one and choose "Show package contents", then you'll see
all the files that make up a widget. However I've just looked at the
Dictionary widget and it uses a plugin, so I don't think it will be
any help to you.

If you actually want the Dictionary app to open, how about trying UI
Scripting. It's fiddly, but it does allow AppleScripting of
non-scriptable apps. You can read about it on the Apple website.

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: AppleScript Question

2006-07-14 Thread Garrett Hylltun

On Jul 14, 2006, at 3:03 PM, Sarah Reichelt wrote:


I'm trying to get the Dictionary.app to cooperate with my project,


[snip]


Safari hidden, send the data to it without it getting http:// stuffed
in front of it?


There is an AppleScript scripting addition called XSpell that provides
AppleScript commands for checking spelling but that doesn't help if
you want the definitions.


Actually, I do want the dictionary app to open.  My program is  
intended to be like a compliment to the dictionary app.  That and I  
figure why try to reinvent the wheel.



I would check out the Dictionary Dashboard widget (open the widget's
package and browse through the files there). You may find it uses
shell commands or something that you can modify for your purposes.


Ummm. Ok, don't laugh at me, but I don't use Dashboard and have  
it disabled.  So I don't know much about that.  Where would I find  
the widgets for dashboard?  :-(



Alternatively, what happens if instead of revGoURL, you use load URL
"dict:///"? If you can get the data directly that way, it would
probably be the best solution.


I haven't tried that, but just for the fun of it will try it.  As  
noted above, I really don't want to mess with the data at all.


My next task will be to try and figure out how to get Dictionary.app  
to send a word to my program.  Probably not possible though.



Cheers,
Sarah


Thank you Sarah :-)
-Garrett

___
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: AppleScript Question

2006-07-14 Thread Sarah Reichelt

I'm trying to get the Dictionary.app to cooperate with my project,
but can't figure out how to do what I need.

What I want to do is when you highlight a word in a a field, right
click and select a menu entry, to send that word to the
Dictionary.app so that it will look up the word.

No problem on the highlight, right click and menu stuff, but getting
the Dictionary.app to open and look up the word is the problem.

I checked Apple's site to see if Dictionary.app was scriptable, but
it's not.  But!  It says that if you type into Safari Dict:///word
(word being the word you want to lookup) that Safari will open the
Dictionary.app program and have the Dictionary.app lookup the word.

So I tried using revGoURL, which opened Safari, and Dict:///word was
sent to Safari, but Safari added http:// in front of Dict:///word,
which of course did nothing.

I thought that I'd try to see if there was an AppleScript solution to
this using the Dict:///word idea, but my knowledge of AppleScript is
nill and my attempts so far have done nothing at all.

Does anyone have any suggestions, ideas or maybe even some code that
might accomplish what I need for this?  Something maybe that opens
Safari hidden, send the data to it without it getting http:// stuffed
in front of it?


There is an AppleScript scripting addition called XSpell that provides
AppleScript commands for checking spelling but that doesn't help if
you want the definitions.

I would check out the Dictionary Dashboard widget (open the widget's
package and browse through the files there). You may find it uses
shell commands or something that you can modify for your purposes.

Alternatively, what happens if instead of revGoURL, you use load URL
"dict:///"? If you can get the data directly that way, it would
probably be the best solution.

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


AppleScript Question

2006-07-14 Thread Garrett Hylltun

Rev 2.6.1 on OS X

Greetings,

I'm trying to get the Dictionary.app to cooperate with my project,  
but can't figure out how to do what I need.


What I want to do is when you highlight a word in a a field, right  
click and select a menu entry, to send that word to the  
Dictionary.app so that it will look up the word.


No problem on the highlight, right click and menu stuff, but getting  
the Dictionary.app to open and look up the word is the problem.


I checked Apple's site to see if Dictionary.app was scriptable, but  
it's not.  But!  It says that if you type into Safari Dict:///word   
(word being the word you want to lookup) that Safari will open the  
Dictionary.app program and have the Dictionary.app lookup the word.


So I tried using revGoURL, which opened Safari, and Dict:///word was  
sent to Safari, but Safari added http:// in front of Dict:///word,  
which of course did nothing.


I thought that I'd try to see if there was an AppleScript solution to  
this using the Dict:///word idea, but my knowledge of AppleScript is  
nill and my attempts so far have done nothing at all.


Does anyone have any suggestions, ideas or maybe even some code that  
might accomplish what I need for this?  Something maybe that opens  
Safari hidden, send the data to it without it getting http:// stuffed  
in front of it?



Thanks,
-Garrett
___
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: Applescript question

2005-03-19 Thread Howard Bornstein
> 
> No problem... here's what I use:
> 
>  tell application "System Events"
>get the name of every application process whose frontmost is true
>  end tell
> 
> If you're using OS 9, tell the Finder instead of System Events. The
> reason
> this works is that there can only be one process whose frontmost is
> true, so
> it returns the name of the frontmost process.
> 
> HTH,


Thanks Ken! This worked perfectly!

-- 
Regards,

Howard Bornstein
---
www.designeq.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Applescript question

2005-03-18 Thread Ken Ray
On 3/18/05 6:41 PM, "Howard Bornstein" <[EMAIL PROTECTED]> wrote:

> I am currently calling an application from within Rev with the "tell
>  to activate" applescript command. But I'd like to know
> what application was active when this was called (it won't be Rev,
> since this is running in the background) so I can reactivate it after
> the script is finished.
> 
> Is there a way to use Applescript to find out the currently active
> application? Forgive my utter ignorance about Applescript.

No problem... here's what I use:

tell application "System Events"
  get the name of every application process whose frontmost is true
end tell

If you're using OS 9, tell the Finder instead of System Events. The reason
this works is that there can only be one process whose frontmost is true, so
it returns the name of the frontmost process.

HTH,

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]


___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Applescript question

2005-03-18 Thread Howard Bornstein
I am currently calling an application from within Rev with the "tell
 to activate" applescript command. But I'd like to know
what application was active when this was called (it won't be Rev,
since this is running in the background) so I can reactivate it after
the script is finished.

Is there a way to use Applescript to find out the currently active
application? Forgive my utter ignorance about Applescript.

-- 
Regards,

Howard Bornstein
---
www.designeq.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Filtering with more than 4 types (OSX) - AppleScript Question

2004-01-29 Thread Sarah Reichelt
Thanks, Sarah.

The result of the "do tScript as Applescript" can be empty, but also 
"execution
error" (if you click on the cancel button for instance).
So, I believe the test :
	if tFile is empty then return empty-- no file chosen

should be
	if (tFile is empty) or (tFile is "execution error") then return empty 
   -- no
file chosen

Regards,
Jan
Thanks for the addition Jan, I hadn't actually tested that bit :-)
Sarah
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Filtering with more than 4 types (OSX) - AppleScript Question

2004-01-29 Thread Jan Decroos
Barry Levine wrote:
>> Jan,
>>
>> Would you mind providing the exact line(s) of Transcript one would use 
>> to accomplish that AppleScript task?
>>
>> TIA,
>> Barry


Sarah Reichelt wrote:
>Try this: (watch out for line wraps)
>
>on mouseUp
>   put "MooV,JPEG,PNGf,GIFf,TIFF,BMP" into tFilters
>   put "Select a Quicktime file:" into tPrompt
>
>   put getFilePath(tFilters, tPrompt) into tFile
>   answer tFile
>end mouseUp
>
>
>function getFilePath pFilters, pPrompt
>   -- change comma-delimited list of filters to AppleScript list
>   -- force each file type to 4 characters
>   put "{" into tASfilters
>   repeat for each item i in pFilters
> put quote & char 1 to 4 of (i & "") & quote & comma after 
>tASfilters
>   end repeat
>   put "}" into last char of tASfilters
>
>   -- do the AppleScript which calls the file selector
>   put "choose file with prompt " & quote & pPrompt & quote & \
>  " of type " & tASfilters into tScript
>   do tScript as AppleScript
>   put the result into tFile
>   if tFile is empty then return empty-- no file chosen
>
>   -- format from Mac file path to Rev file path
>   delete word 1 of tFile-- get rid of the word alias
>   replace quote with "" in tFile-- get rid of the quotes
>   put revUnixFromMacPath(tFile) into tFile
>   return tFile
>end getFilePath
>
>Cheers,
>Sarah

Thanks, Sarah.

The result of the "do tScript as Applescript" can be empty, but also "execution
error" (if you click on the cancel button for instance).
So, I believe the test :
if tFile is empty then return empty-- no file chosen
>
should be
if (tFile is empty) or (tFile is "execution error") then return empty-- no
file chosen

Regards,
Jan
>
>

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Filtering with more than 4 types (OSX) - AppleScript Question

2004-01-28 Thread Sarah Reichelt
On 29 Jan 2004, at 6:51 am, Barry Levine wrote:

Jan,

Would you mind providing the exact line(s) of Transcript one would use 
to accomplish that AppleScript task?

TIA,
Barry
Try this: (watch out for line wraps)

on mouseUp
  put "MooV,JPEG,PNGf,GIFf,TIFF,BMP" into tFilters
  put "Select a Quicktime file:" into tPrompt
  put getFilePath(tFilters, tPrompt) into tFile
  answer tFile
end mouseUp
function getFilePath pFilters, pPrompt
  -- change comma-delimited list of filters to AppleScript list
  -- force each file type to 4 characters
  put "{" into tASfilters
  repeat for each item i in pFilters
put quote & char 1 to 4 of (i & "") & quote & comma after 
tASfilters
  end repeat
  put "}" into last char of tASfilters

  -- do the AppleScript which calls the file selector
  put "choose file with prompt " & quote & pPrompt & quote & \
 " of type " & tASfilters into tScript
  do tScript as AppleScript
  put the result into tFile
  if tFile is empty then return empty-- no file chosen
  -- format from Mac file path to Rev file path
  delete word 1 of tFile-- get rid of the word alias
  replace quote with "" in tFile-- get rid of the quotes
  put revUnixFromMacPath(tFile) into tFile
  return tFile
end getFilePath
Cheers,
Sarah
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Filtering with more than 4 types (OSX) - AppleScript Question

2004-01-28 Thread Barry Levine
Jan,

Would you mind providing the exact line(s) of Transcript one would use 
to accomplish that AppleScript task?

TIA,
Barry
On Jan 28, 2004, at 10:00 AM, Jan wrote:

Date: Wed, 28 Jan 2004 16:54:49 +0100
From: "Jan Decroos" <[EMAIL PROTECTED]>
Subject: Re: Filtering with more than 4 types (OSX)
Smart workaround, but what if the user want to navigate to another
directory within the file selector ?
Thierry.


and by using Applescript ?

(do ... as AppleScript)

choose file with prompt "Give file:" of type {"MooV", "JPEG", "PNGf", 
"GIFf",
"TIFF", "BMP "}

Regards,
Jan
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: AppleScript Question

2001-12-17 Thread Sivakatirswami

on 12/12/01 5:27 AM, Gene wrote:

> I understand how to use AppleScript with the "Do" command but I am also
> interested
> in knowing: Is there a way to call compiled AppleScript scripts or AppleScript
> applications from Transcript  and have the ability to pass parameter values
> back
> and forth?

Our strategy here which may not address your context need, (since you want
to poke values in already compiled apps...) but it works great is: store
applescripts as text chunks, and replacement strings in those text chunks,
then later you use a replace function to poke your parameters into the text
chunk then run that as an appleScript. If you have external scripts/apps
then open them in script Editor, copy the text, save as raw text in Bbedit
or simpleText then read them first, poke your parameters, then run them...
These are not compiled of course, but with for small scripts it's not much
of an issue.
 

create a sub-stack call it something like "code_chunks"
each card carries a field with applescripts like this:

===
set tFile to "€€€theFileToLoad€€€" as alias
set tHost to "mahiai.aloha.net"
set tPath to "€€€Destination€€€"
set tUser to "someuser"
set tPassword to "somePassword"

tell application "Interarchy 5.0"
store tFile host tHost path tPath user tUser password tPassword
end tell
===
Give the card a name and the field a name you will refer to later... then in
your project script you have handlers like this:

(this is in superTalk, but minor changes will make it work in Rev)

on doUpload uploadPath,filePath,ftpServer
-- first get your applescript:
put field "codeChunk" of card "ftpServer" of stack "code_chunks" into
tAppleScript
--now insert your values/parameters
replace "€€€Destination€€€" with uploadPath in tApplescript,
replace "€€€theFileToLoad€€€" with filePath in tApplescript
--now you run the script... it's not compiled
--but for short scripts time is not an issue
do tApplescript as AppleScript
end doUpload

Of course one day I will change all the above and use the on board FTP
commands, but  need a little more robust feedback...


 
> Thanks for any help.
> Gene Kennedy


Hinduism Today

Sivakatirswami
Editor's Assistant/Production Manager
[EMAIL PROTECTED] 
www.HinduismToday.com, www.HimalayanAcademy.com,
www.Gurudeva.org, www.hindu.org

Read The Master Course Lesson of the Day at
http://www.gurudeva.org/lesson.shtml

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



Re: AppleScript Question

2001-12-16 Thread Sivakatirswami

on 12/12/01 5:27 AM, Gene wrote:

> I understand how to use AppleScript with the "Do" command but I am also
> interested
> in knowing: Is there a way to call compiled AppleScript scripts or AppleScript
> applications from Transcript  and have the ability to pass parameter values
> back
> and forth?

Our strategy here which may not address your context need, but it works
great (in Supercard but will work in Rev also) is: store applescripts as
text chunks, and replacement strings in those text chunks, then later you
use a replace function to poke your parameters into the text chunk then run
that as an appleScript. If you have external scripts then open them in
script Editor, copy the text, save as raw text in Bbedit or simpleText then
read them first, poke your parameters, then run them... These are not
compiled of course, but will for small scripts it's not much of an issue.
 

create a sub-stack call it something like "code_chunks"
each card carries a field with applescripts like this:

===
set tFile to "€€€theFileToLoad€€€" as alias
set tHost to "mahiai.aloha.net"
set tPath to "€€€Destination€€€"
set tUser to "hinduis"
set tPassword to "dbNEVH"

tell application "Interarchy 5.0"
store tFile host tHost path tPath user tUser password tPassword
end tell
===
Give the card a name and the field a name you will refer to later... then in
your project script you have handlers like this:

(this is in superTalk, but minor changes will make it work in Rev)

on doUpload uploadPath,filePath,ftpServer
-- first get your applescript:
put field "codeChunk" of card ftpServer of stack "code_chunks" into
tAppleScript
--now insert your values/parameters
replace "€€€Destination€€€" with uploadPath in tApplescript,
replace "€€€theFileToLoad€€€" with filePath in tApplescript
--now you run the script... it's not compiled
--but for short scripts time is not an issue
--modify the following for Rev.
get script (do, AppleScript, it)
end doUpload


 
> Thanks for any help.
> Gene Kennedy


Hinduism Today

Sivakatirswami
Editor's Assistant/Production Manager
[EMAIL PROTECTED] 
www.HinduismToday.com, www.HimalayanAcademy.com,
www.Gurudeva.org, www.hindu.org

Read The Master Course Lesson of the Day at
http://www.gurudeva.org/lesson.shtml

___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution



AppleScript Question

2001-12-11 Thread Gene Kennedy

I understand how to use AppleScript with the "Do" command but I am also interested
in knowing: Is there a way to call compiled AppleScript scripts or AppleScript
applications from Transcript  and have the ability to pass parameter values back
and forth?

Thanks for any help.
Gene Kennedy


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution