Cut/paste text in a new TextFrame, and place it on the text original position
With this script, the pagraphs with style "_DESTACADOS" are cut and paste in a new TextFrame, but place them in to first page. I need place it on the text original position...
var myDocument = app.activeDocument;
var myRegExp = ".+";
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.appliedParagraphStyle = "_DESTACADOS";
app.findGrepPreferences.findWhat = myRegExp;
var myFoundItems = myDocument.findGrep(true);
if(myFoundItems.length != 0){
for(var myCounter = 0; myCounter < myFoundItems.length; myCounter ++){
myFoundItem = myFoundItems[myCounter];
myX1 = myFoundItem.characters.item(0).horizontalOffset;
myY1 = myFoundItem.characters.item(0).baseline;
myX2 = myX1 + 50;
myY2 = myY1 + 50;
app.selection = myFoundItem;
app.cut();
myTextFrame = myDocument.textFrames.add();
myTextFrame.geometricBounds = [myY1, myX1, myY2, myX2];
app.selection = myTextFrame.insertionPoints[0];
app.paste(); // Pega el texto del caso encontrado
myTextFrame.applyObjectStyle(app.activeDocument.objectStyles.item("_Destacados"), true);
myTextFrame.fit(FitOptions.FRAME_TO_CONTENT);
THANKS...
Hi Marcos Suárez,
If you've xml for the indesign document, u can use the following.
myElement.placeIntoInlineFrame(["8p","6p1"]);
I hope this code is useful in ur script.
#include "glue code.jsx"
var doc = app.activeDocument;
var myRuleSet = new Array ( new idd)
with(doc)
var elements = xmlElements;
__processRuleSet(elements.item(0), myRuleSet)
function idd()
var newstyle=doc.objectStyles.add("ObjectStyle1");
newstyle.appliedParagraphStyle="Ap3";
newstyle.strokeColor="None";
newstyle.fillColor="None";
this.name = "idd"
this.xpath = "//title/p2" //set this xpath value to the xmltree element which u want to set into frame.
this.apply = function(myElement, myRuleProcessor)
var txt=myElement.placeIntoInlineFrame(["8p","6p1"]);
txt.fit(FitOptions.frameToContent);
txt.applyObjectStyle(newstyle, true);
return true;
This will create a textframe around the selected content which u want to do so...
For more info, refer XMLElement.placeIntoInlineFrame() in Object Model Viewer....
With Regards,
Vel.
Similar Messages
-
I have never seen this before when I try to copy and paste, I get a
"Copy/cut/ paste is not available in Mozilla and firefox. Do you want more information about this issue? "
I have copied and pasted hundreds of times before with Mozilla and firefox . This just happened suddenly.
when I go to find more information on this issue, it give a long drawn out explanation I cant follow.
What happened?When you right-click the link, the page immediately tells you you can't copy, or does that occur after you choose Copy Link Location?
If it appears immediately, you can switch a setting in Firefox that should prevent sites from blocking the normal right-click menu. Here's how you would do that:
(1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
(2) In the search box above the list, type or paste '''context''' and pause while the list is filtered
(3) Double-click the '''dom.event.contextmenu.enabled''' preference to switch it from true to false.
This setting does have a complication: On Google Maps and other sites that have their own right-click menu, Firefox's menu then will block the site's menu. To clear Firefox's menu so you can access the site's menu tap either the Alt key or Esc key once (but sometimes Esc removes both). -
Copy/Cut/Paste is not available in Mozilla and Firefox.
Do you want more information about this issue?
That's what Firefox sad to me...I was Rich text editing,but I can
not use copy paste on.
I did the same site and Rich text editing with Opera,
and there was no problem.
I love Firefox,and I want ti use it,but if this is not posibile to do in Firefox,I must go with Opera from now on.
Pleace,responde to me,I need to fix a problem.
I hope you understanded my Engish!
Thank you...Try to use the keyboard if the buttons on the web page aren't working.
* Copy: Ctrl+C or Ctrl+Insert
* Paste: Ctrl+V or Shift+Insert
* Cut: Ctrl+X or Shift+Delete
See:
*http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard
*https://addons.mozilla.org/firefox/addon/allowclipboard-helper/ -
In iMovie 11, how can you cut/paste a clip that has subtitles and actually have the subtitles get cut/pasted. When I try, the subtitles disappear into the void and I have to do the subtitling all over again.
If you think this is a bug, you can report it here:
Apple - Mac OS X - Feedback -
i have a mac pro and i copied a pdf form resume to a site
called local work.ca and tried to paste it and this
is what showed up as a answer (copy/cut/paste is not available
in mozilla and firefox
i have firfox 6.0.1 can you help me please*http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard
*https://addons.mozilla.org/firefox/addon/allowclipboard-helper/ - AllowClipboard Helper -
Copy/Cut/Paste is not available in Mozilla and Firefox.
Do you want more information about this issue?
Yes!https://support.mozilla.com/en-US/kb/Clipboard+not+working
This extension will help you set the necessary permissions - Allow Clipboard Helper extension: <br />
https://addons.mozilla.org/en-US/firefox/addon/852 -
Having trouble with touch screen. Freezes, texting adds more letters, screen locks up. Got new phone, synced new phone and now it does the same thing??
I also tried the Hard Restart and still has the problem?
-
Sometimes when I open a link in a new tab and then switch to the tab, the address bar clears and I'll have to re open the tab and hope that doesn't happen again. Sometimes this happens again and again. Most of the times if I just open the link in a new tab and don't switch to it, this won't happen. But as I switch too the tab, the text would disappear and the link wouldn't open.
Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
* Don't make any changes on the Safe mode start window.
* https://support.mozilla.com/kb/Safe+Mode
* [[Troubleshooting extensions and themes]]
In Firefox 4 you can use one of these to start in <u>[[Safe mode]]</u>:
* Help > Restart with Add-ons Disabled
* Hold down the Shift key while double clicking the Firefox desktop shortcut (Windows) -
Installed a new printer and one line on the top is skipped
Appreciate your inputs.
We have been using the 'Check Printing report' for quite a while; We recently installed a new printer and we see that the alignment has gone wrong.
The checks are printing from one line below as it is skipping one line. Where do we adjust the setting so that the printing starts from the place where we want?
Thanks in advanceHi
Im no expert but I doubt its a template issue more likely to be the control escape sequence on the printer diriver set up. Check your printer manual and the current set up you have.
Regards
Tim -
My iMessage won't activate my email but will with phone number. I type my password and it says it's wrong I change it and it still says its wrong. I even made a new account and it still says the password is wrong.
Hi hectorness12!
Thanks for using the Apple Support Communities! I have found an article that can help you with troubleshooting your iMessage issue. The article can be found here:
iOS: Troubleshooting FaceTime and iMessage activation
http://support.apple.com/kb/ts4268
Thanks,
Braden -
My iphone was stolen. If i buy a new one and to register with the same Apple ID, my photos will be recovered in the new device?
If you have a backup of the old phone that backup contains camera roll photos. Restore from that backup to get your camera roll photos back
-
Just updated the latest Epson software printer update from Apple. Now all my prints look solarized. How do I get rid of the new update and go back to the perfect prints I had before? Help please. Wasting ink and paper at the moment!!!!!!
I have tried the printer with my laptop (not updated) and everything is fine. It's just the beautiful 27" Imac that can no longer print.Might be a corrupted printer preference file ...
Open the Finder. From the Finder menu bar click Go > Go to Folder
Type this exactly as you see it here:
~/Library/Preferences
Click Go
Move the com.apple.PrinterPrefs.plist file from the Preferences folder to the Trash.
Restart your Mac, restart the printer... -
My daughter is currently using my Apple ID with her ipod touch. I will be upgrading her to an iPhone 4S and would like to use a different Apple ID and a new computer and still keep all the current music and Apps that she has now. How do I do this?
Make a new Apple ID for her.
Use it on her iPhone 4S for iCloud, iMessage and FaceTime.
Use your ID on her iPhone 4S for iTunes and App Stores.
Sign in with your Apple ID on iTunes Store (on iTunes app of her new computer)
Authorize her new computer with your Apple ID in iTunes (iTunes menu>Store>Authorize this Computer)
Check "Share my Library on my Local Network" in iTunes Preferences in your and her computer
Sign in Home Sharing of her iTunes with your Apple ID.
Copy all the Music she wants from the old computer to the new one. (Must be on the same network)
Copy all the apps she wants from the old computer to the new one. (Must be on the same network)
Export all playlist as xml files from the old computer to the new one.(right click on the playlist to export and "File>Library>Import Playlist to Import)
Sync her iPhone 4S with all content she wants from her new computer (all data from the old computer will be deleted)
Are you sharing Contacts or other data from iCloud?
Be careful or ask for help about moving from iCloud account to another one. -
I want to set up 5 different ipods to sync from one library, but want to be able to control what is synced to each ipod and have it remember that for future synching and just look for new songs and not sync all the other music in the library
Click here for options.
(58961) -
How do I create a new account and get stuff from the old account to the new account
How do I create a new account and get stuff from the old account to the new account
There are instructions on this page for creating a new account : Set up an Apple ID in iTunes
Or if you don't want to give credit card details : Create an iTunes Store, App Store, or iBooks Store account without a credit card or other payment method
But you won't be able to transfer purchases from your old account to it, all content that you download from the store will remain tied to the account that downloaded it.
Maybe you are looking for
-
Iphoto freezes when trying to make an album or card. what to do?
I've previously worked with iphoto maing calendars or cards. After a thorough back up of my macbook pro, iphoto has showed repeatedly fails in launching the card, calender or album functions, while working adequate in sharing for example in facebook.
-
Wireless drops on the move of my MacBook Pro 15
My MacBook Pro 15 (Early 2011, Lion 10.7.3) keeps dropping the wireless connection when I move the computer around the house. There are no issues on the wireless router capacity cause i can still use it from outside the apartment, but it immediately
-
In Photoshop CS4, when you drag an image to open it, the program opened in a new tab automatically. Since version CS5, in doing so, the software simply inserts the image on the tab that is already open. There configuring Photoshop CS6 equal to CS4 (w
-
Need information on upgrade project
Hi all, Could anyone kindly let me know what are the information that i should know regarding an R/3 upgrade project? If anyone has got any document please forward it to [email protected] Awaiting replies. Thanks in advance. Best Regards, Ram.
-
Adding another application to adobe air installer
Hi, i created an application with adobe air myApp.air and i want to add a driver file in this installer so when the user installing the air application it will also install the needing drivers (it is an application also for windows and mac). is it po