Scripting inDesign: How can I move an element placed using Javascript?
Hey all,.
I tried to write a script that puts an object slug from an indesign library to a document and then put in my area of slug. Everything seems to work except the command move. I think the problem is that I did not choose my asset placed correctly.
Help, please!
That's what I have so far:
Create new document
var doc = app.documents.add ();
Get the values of page size
var l = doc.documentPreferences.pageWidth;
var h = doc.documentPreferences.pageHeight;
Create the layer called SLUG
var slugLayer = doc.layers.add({name:"SLUG"});)
Definition of document slug greatness of space
doc.documentPreferences.documentSlugUniformSize = false;
doc.documentPreferences.slugBottomOffset = "20 mm";
Open the InDesign file to the library that contains the file of slug
var slugLibrary = app.open(File("/Users/Shared/Slug.indl"));
Place the slug script go here
var myPlacedAsset = slugLibrary.assets.item ("Slug");
var mySlug = myPlacedAsset.placeAsset (doc);
Close the library of slug
slugLibrary.close ();
Move the object of slug to the slug area
mySlug.move([0,0]);
Layer of locking SLUG
slugLayer.locked = true;
placeAsset is an array, then this line: mySlug.move([0,0]);
Replace: mySlug [0].move([0,0]);
Tags: InDesign
Similar Questions
-
How can I move Photoshop Elements 9 to another computer?
I recently got a new computer, and I tried to change Photoshop Elements 9 to it from my old laptop. I had PSE9 included with a bamboo tablet and I don't have the box so I don't know what is the serial number. When I try and save it as a product on my adobe account nothing happens. Help?
If you didn't save it before and you don't have the serial number, I fear that you won't be able to install it.
-
I just bought a new computer, and I just discovered that I can't spend my version of 12 items from my old PC to my new PC because it came with a license for one computer only. I bought 14 items today at the store. How can I move all of my photos of 12 items on my old PC (which are all nicely filed), for my new PC in 14 elements? I would appreciate any help with my question. Thank you.
Hello
You must make a backup of your catalog with items 12 and then restore using 14 items. A guide for the backup and restore are help from Elements Organizer | Back up or restore the catalogs.
-Pierre D
-
How can I move 6 InDesign to my new computer?
How can I move 6 InDesign to my new computer? I need to move all the files on and software Creative suite.
You don't move, install you. Run help--> desactiver disable on the old system, then install it on the new.
Mylenium
-
How can I configure the element with the script names?
Could Hello someone give me a hand?
I created symbols on the stage of this script below.
------------------------------------------------------
for (k = 0; k < 5; k ++) {}
sym.createChildSymbol ("mySymB", "Stage");
}
------------------------------------------------------
How can I configure the element with the script names?
Because, when I try to control a symbol by using the getSymbol("---") command.
I need to know the name of the item given to each symbol.
Concerning
Yes, you're right.
Using 'Code-Example' If you write sym.getSymbol ("mySymB") that edge returns the undefined value.
With "Drag-and-drop-Example", you can use sym.getChildSymbols ().
-
How can I move a picture of PES 10 to 5 Lightroom?
How can I move a picture of PES 10 to 5 Lightroom?
Hi Farlaner,
Please visit the following link: How to import photos from Photoshop Elements, other Lightroom catalogs or applications like iPhoto
Let me know if it helps.
Kind regards
Tanuj
-
How can I move items in photoshop from one pc to another
How can I move items in photoshop from one pc to another? My old PC died.
Hello
You can download Photoshop Elements under the link below and the license if with your serial key:
https://helpx.Adobe.com/Photoshop-elements/KB/Photoshop-elements-downloads.html
-
How can I move panels in Muse?
As a user of Indesign, I was very excited when I saw MUSE is like Indesign for the creation of Web sites, but I'm having some problems with it. I don't want to confuse the issues, so I'll need to open 2 questions in this forum (for the moment). It is my first question, the basic one.
How can I move and organize panels?
I see the Panel upwards and I want it on the left side, but I can't move it, that is fixed and I can't find the option to unlock and allow me to move.
Can any idea about how I do this?
See you soon
The screenshot show an old AIR base version of Muse, which does not allow to move paels.
Support just the latest version and everything works fine!
-
How can I move items 9 of my old xp computer to my new computer windows 8?
How can I move element 9 of my old xp computer to my new computer windows 8?
If you have an installation for Elements 9 disc, then I suggest you uninstall Elements 9 from your old computer, disable this feature during the uninstallation. On the computer of Windows 8, insert the disc and install Elements 9, enable it during installation. However, it is untested, according to this document from Adobe: http://forums.adobe.com/message/4527508. Let me know how it goes.
-
How can I move files/folders to iCloud back to their original finder folder
I just updated to OS Sierra and noticed that my documents folder was empty. How can I move files/folders to iCloud back to their original finder folder?
Thank you
The Duke
See it - Add your files, Desktop and Documents in iCloud Drive - Apple Support
-
How can I move applications to iPhone7 more page host?
How can I move apps on the iPhone plus 7? The old method of holding up to jiggle apps app and it enters edit mode does not work.
With 3D Touch, you cannot press the icon without getting another action. With the new devices with 3D Touch, just gently place your finger on the icon and wait for it to start the jiggling. Then you can drag it to the new location.
-
How can I move documents in iCloud to my hard drive
How can I move documents in iCloud to my hard drive
See this - copies of records or make your iCloud - Apple Support data
-
My phone icon left the lower bar. How can I move it back
My phone icon left the lower bar. How can I move it back
Press and hold on the icon of the app until it wiggles and then drag it in the dock. After you do this, press the home button to stop agitation apps. Note that you can have 4 icons in the dock.
Organize the applications on your iPhone, iPad or iPod touch - Apple Support
-
How can I move a movie from my mac to my iphone 6 using itunes 12.4.3.1?
How can I move a movie from my mac to my iphone 6 using itunes 12.4.3.1? I know that you can synchronize, but where I put the (m4v) movie on my computer, and then how I do I synchronize? I tried to drop, but my phone doesn't pair with my Mac Pro 5.1...
Have you tried to put the movie in area iTunes movies?
-
My tab toolbar is a sidebar on the left side of the screen. I just downloaded v. 38.05 after doing a clean install of Mavericks on my MacBook Pro. Something didn't look right, but I couldn't understand it at fisrt. It is only afterwards that I had opened more than 1 pill I discovered the toolbar of the tab was "hidden" and not in its usual place? I want it to work along the top of the window to my other toolbars at the same time. How can I move it?
Thank you!
You only have the tabs in a side bar if you have installed an extension that provides this feature.
Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.
- Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
- Do NOT click on the reset button on the startup window Mode safe
Maybe you are looking for
-
Hi their. I need to update the bios of my Satellite C660. I have download the installation package versionn 2. But I get this message: "Tere is an error occurred." Please check the items below. BIOS version more than 200. Battery capacity more than 1
-
Dv6-7300sa envy: Envy HP dv6-7300sa eGPU
Hello I was doing some research for some time the possibility to connect an external GPU to my laptop. The solution I found is an adapter EXP GDC beast/Ares 7.0 http://www.Amazon.com/laptop-external-PCI-E-graphics-card/DP/B00Q4VMLF6 http://www.banggo
-
I have Windows XP Professional on my Dell E-310. I got a VIRUS episode 2 weeks agoand NOW my PC will NOT be reset to a previous RESTORE POINT using System Restore.Any Suggestions?
-
I tried to insert the installation disc, and it relies on the error message that it does not give me an option of chkdsk, or anything else. When I start from safe mode, the computer hangs on the screen "loading Windows files". Is there something I c
-
I try to open a file was updated and an error comes up saying netexe.exe has stopped working. How to solve this problem?