Copy link to clipboard
Copied
This is kind of a continuation of my question from yesterday. I have a script that creates a box at the bottom of my page when i origionally made it and had it altered it overwrote the existing text box in that area. I did this on accident. How can i make it place the box there and if the file already has it there leave it alone. We type info in it and i dont want it over written every time.
|
Hi,
I am not clear on what is needed but i see in your code in the addTextFrame method you check if a textframe with the name exists or not and if it exists you remove it and then again add a new textframe. If you don't want to remove the old one you could comment out the remove method call and exit out of the code in this condition. I may be understanding something wrong if this is not what you want, please explain a bit more on what is wrong with the code you posted.
If you want to prevent accid
...Copy link to clipboard
Copied
Hi,
I am not clear on what is needed but i see in your code in the addTextFrame method you check if a textframe with the name exists or not and if it exists you remove it and then again add a new textframe. If you don't want to remove the old one you could comment out the remove method call and exit out of the code in this condition. I may be understanding something wrong if this is not what you want, please explain a bit more on what is wrong with the code you posted.
If you want to prevent accidental moving of this box you could also explore locking the layer on which you are creating it.
-Manan
Copy link to clipboard
Copied
You answered it. thank you. I had to change the Remove to exit. I totally missed that it said .remove on on line 18. Thanks again.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now