[英]Add a ExtendScript to a button in Indesign
Well the title pretty much explains the problem. 那么标题几乎可以解释问题。
I have a InDesign document containing buttons. 我有一个包含按钮的InDesign文档。 One of the buttons should go back to the page the user comes from (previous page).
按钮之一应返回到用户来自的页面(上一页)。 So I want to create a
var
containing the value of the pagenumber on the button on the previous page like this: 所以,我想创建一个
var
包含在这样前面的页面上的按钮,页面编号的值:
var prevPage = this.pageNum;
Then on the button that should get the user back to where he came from add this: 然后在应该使用户回到其来源的按钮上,添加以下内容:
this.pageNum = prevPage;
This works if I do this after the PDF is created. 如果我在创建PDF后执行此操作,则此方法有效。 But since this is a time consuming hassle to do every time the client makes corrections I would like to do it in InDesign.
但是,由于每次客户进行更正都是一件耗时的麻烦事,因此我想在InDesign中进行。
I know I can add an action to the button containing a menu-action "go to previous page". 我知道我可以向包含菜单动作“转到上一页”的按钮添加动作。 This literally goes through the Acrobat menu and takes you to the previous page.
这实际上是通过Acrobat菜单进行的,并带您到上一页。
The problem is that the Acrobat app doesn't have that menu. 问题在于Acrobat应用程序没有该菜单。 So the action can't find the menu items and won't work.
因此,该操作无法找到菜单项,因此无法正常工作。
I would like to add a script to the button... but seriously wondering if this is possible. 我想在按钮上添加一个脚本...但是认真地想知道这是否可行。 I couldn't even find a plugin that does this.
我什至找不到能做到这一点的插件。
Hope the stack-brothers have a solution. 希望兄弟姐妹们有解决方案。
Use the script below for the button action. 将以下脚本用于按钮操作。 It to the previous view on the view stack, which is equivalent to clicking the Previous View button on the Acrobat toolbar.
它到视图堆栈上的上一个视图,等效于单击Acrobat工具栏上的“上一个视图”按钮。
app.goBack();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.