Re: PDF Watermark Issue
Re: PDF Watermark Issue
- Subject: Re: PDF Watermark Issue
- From: Takaaki Naganoya <email@hidden>
- Date: Tue, 22 May 2018 20:40:45 +0900
Hi Stan,
Thank you for your comment.
My question was not so clear. So…
(1) I want to use “tools.py” within a AppleScript bundle. (OK)
(2) I want to call it via “do shell script” command. (OK)
(3) I Want to call it with suitable parameters <—— How?
They say is is not so good….
https://discussions.apple.com/thread/6620337
> 2018/05/22 2:02、Stan Cleveland <email@hidden>のメール:
>
> On May 21, 2018, at 05:18 AM, Takaaki Naganoya <email@hidden> wrote:
>>
>> Maybe we can call this python script from AppleScript via “do shell script”
>> command.
>> Can we call this with suitable parameters?
>
> Hi Takaaki,
>
> Maybe I'm misunderstanding your question and you already know this, but what
> follows demonstrates an AS call to simple Python code with concatenated
> parameters:
>
> set desiredNum to 2
> set desiredMax to 5
> do shell script "python2.7 -c 'for i in range(" & desiredMax & "): print \"i
> equals " & ¬
> desiredNum & "\" if i==" & desiredNum & " else None'"
> --> "None
> None
> i equals 2
> None
> None"
>
> I'm not a Python expert, but suspect that this method won't work for Python
> code that's very much more complicated. Perhaps you could store more complex
> code in a Python executable file and call it using "python2.7 -m
> [module-name]" as a do shell script command in AS? Am not sure—that's
> definitely beyond my pay grade.
>
> Regards,
> Stan C.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
--
Takaaki Naganoya
email@hidden
http://piyocast.com/as/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden