[Pythonmac-SIG] Applescript equivalent in appscript

Rajanikanth Jammalamadaka rajanikanth at gmail.com
Sat Jun 7 20:48:08 CEST 2008


Thanks for your reply Laurent.

Also, could somebody tell me how to do this:

Suppose the application pops up a window while its running and gives
me two choices: Ok or Cancel
how can I tell it to select the Ok option always?

Thanks,

Rajanikanth

On Sat, Jun 7, 2008 at 6:12 AM, Pierron Laurent
<Laurent.Pierron at loria.fr> wrote:
> Another idea : put your script in myscript.scpt
>
> In python write :
>
> from subprocess import Popen
> p = Popen("osascript" + " myscript.scpt", shell=True)
> sts = os.waitpid(p.pid, 0)
>
> See : http://docs.python.org/lib/node536.html
>
> Look at man osascript, to know more about osascript.
>
> ---
> Laurent PIERRON
>
> Le 6 juin 08 à 18:57, Rajanikanth Jammalamadaka a écrit :
>
>> Hi!
>>
>> Could some tell me what would be the appscript equivalent of the
>> following applescript?
>>
>> tell application "SomeApplication"
>>        activate
>>        open "some file"
>>        delay 300
>>        quit
>> end tell
>>
>> Also, is it possible to call apple scripts from appscript?
>>
>> Ideally, I just want to use appscript as I have to process the log
>> files created by the application after it quits.
>>
>> Thanks,
>>
>> Raj
>>
>> --
>> "For him who has conquered the mind, the mind is the best of friends;
>> but for one who has failed to do so, his very mind will be the
>> greatest enemy."
>>
>> Rajanikanth
>> _______________________________________________
>> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
>



-- 
"For him who has conquered the mind, the mind is the best of friends;
but for one who has failed to do so, his very mind will be the
greatest enemy."

Rajanikanth


More information about the Pythonmac-SIG mailing list