[AS] text box mystery??

Hi
I am experiencing a strange issue with a text box, with text in it, was hoping that some one may have some idea's as to why?
I create a new document that has a rectangle in it, I save the doc, then I add
a text field and text via script , in this text field is the dimensions of the rectangle, the date and the file name, the script then saves the doc and closes it, this all works perfectly.
If I need to edit the file I need to update the text fields information to comply with, date etc, so I have the script if exists already a text field delete it and then replace it with
a new text field with new information in it, this works, but the dimensions of the rectangle come back incorrect, (rectangle not touched at all by me).
If I manualy delete the text field then run the script to add another text field the dimensions of the rectangle come back as correct.
Snippet of code (it's not pretty) that revolves around my issue, ant ideas any one?
tell every page of myDocument
set my_Document to get name of myDocument as text
tell application "Adobe InDesign CS3"
tell document 1
if exists text frame 1 of myDocument then
delete text frame 1
tell application "Adobe InDesign CS3"
if modified of active document is true then
tell active document to save
end if
end tell
set title_Rect to make new text frame at page 1 of myDocument with properties {stroke color:swatch "None" of myDocument, geometric bounds:mySlugTitleBounds, fill color:swatch "None" of myDocument}
set text of title_Rect to (my_Document & " - " & _Date & " - " & _PageHeight_Width & return & return & " " & _Window)
move title_Rect to {(myPageWidth - myPageWidth + 1), (myPageHeight + 12)}
repeat with myCharacterCounter from 1 to (count characters of parent story of title_Rect)
set properties of character myCharacterCounter of parent story of title_Rect to ¬
{applied font:"Arial", font style:"Regular", point size:"7.5", underline:false, fill color:"Keyline"}
end repeat
else
tell application "Adobe InDesign CS3"
set titleRect to make new text frame at page 1 of myDocument with properties {stroke color:swatch "None" of myDocument, geometric bounds:mySlugTitleBounds, fill color:swatch "None" of myDocument}
set text of titleRect to (my_Document & " - " & _Date & " - " & _PageHeight_Width & return & return & " " & _Window)
move titleRect to {(myPageWidth - myPageWidth + 1), (myPageHeight + 12)}
end tell
------- set font size and point size -------
repeat with myCharacterCounter from 1 to (count characters of parent story of titleRect)
set properties of character myCharacterCounter of parent story of titleRect to ¬
{applied font:"Arial", font style:"Regular", point size:"7.5", underline:false, fill color:"Keyline"}
end repeat
end if
end tell
Cheers
Kev

I'm not sure what you're getting at, but this sort of thing struck me:<br /><br />> repeat with myCharacterCounter from 1 to (count characters of parent story of<br />> titleRect) <br />> set properties of character myCharacterCounter of parent story of titleRect to<br />> ¬ <br />> {applied font:"Arial", font style:"Regular", point size:"7.5",<br />> underline:false, fill color:"Keyline"}<br /><br />Why are you doing it a character at a time? Better to  just:<br /><br />set properties of parent story of titleRect to ¬<br />{applied font:"Arial", font style:"Regular", point size:"7.5",<br />underline:false, fill color:"Keyline"}<br /><br /><br />-- <br />Shane Stanley <[email protected]>

Similar Messages

  • Help on resizing text boxes and general image techniques

    Using CS2.
    I have two basic questions.  One has to do with getting the best vector images (with text) that I can for placement in InDesign documents.  The other has to do with the specifics of working with text boxes in FW.
    The easiest way for me to produce vector images has been by using PowerPoint.  I do all the graphics work and then save it as a gif.  I do cropping in a graphics tool (Irfanview, PS) and then insert or place the image.  As long as there is no resizing, things work well.  I'm not sure how things like DPI are controlled using this technique but I'm assuming that also would be done with the graphics tool.  I know Irfanview allows for the dpi to be specified during resizing.
    The problem starts to show up when the gif object is resized.  Things get distorted and I lose the crispness of the image contents.  I'm certainly not an expert on graphics however I've been thinking I either need to 1) make the actual size of graphics in PP the size of the final placed image so there is no resizing (just some cropping) or 2) to work in a tool like FW where (I'm assuming) there are better capabilities to resize vector graphics.  My sense (again, not an expert) is that the process I'm using converts to vector graphics in PP to a bitmap image in the gif and that resizing doesn't work as well for bitmaps as for vector objects.  Do I have that right?
    Moving on to question 2:
    Can text boxes be resized in FW without distorting the text?  Can their size be seen when originally drasing them?  Perhaps spoiled by PowerPoint, I like to set the width of vector objects (e.g. rectangle) and the width of the text that will fill it to the same size.  (I know PP has the ability to put borders on text boxes but when working in FW I need to work with 2 objects, the rectangle and the text box).  Say I have a rectangle that is 81px wide.  Can I set a text box to 81px wide without distorting the text?
    I tend to want to control actual object sizes so I can get good spacial alignment.  For example, I tend to set the width of a text object to an odd number of px so that any line coming out of the text object aligns well with the text.  I must admit that it may be time for me to use a different technique in FW (e.g. more alignment of multiple objects vs. knowing dimensions and seting locations).  Does my approach need improvement?
    Thanks for any advice
    Tom

    As I wean off of PP I've started looking at FW and Illustrator (I have both).  I've done a logo or two in FW and have used it to build some simple web graphics (e.g. buttons, menus).  It can, as I recall, be a little more complex than what I need in this case.
    Since PP is not a graphics program, its drawing capabilities are very limited. As a consequence, any graphics application will have many more features than you're used to seeing and more than you need for any one project.
    I did a little experimenting with Illustrator and my first impression is that it will work better for me for this work.  It seems a little more intuitive.
    Is a general guideline to use FW for web-destined graphics and Illustrator for what I used to do in PP?
    Your suggested guideline is good. Also, note that if you make a logo or vector graphic in Illustrator (saving as .ai format), you can import that into Fireworks and work with it as a vector object there. FW can import and use, just not create, .ai objectes and files.
    FW has some vector tools, they are tucked away under Window > Others > Path. Since FW is intended for producing Web graphics, it is a hybrid application, capable of both vector and photo/image editing. Given that it has some of both, it necessarily doesn't have everything that Illustrator has nor everything that Photoshop has. It has most the features of both of those programs, as long as the feature is useful for a Web graphics designer. For pure photo editing Photoshop has the edge; for pure illustration, Illustrator has the edge. Both Photoshop and Illustrator support color profiles and other features important for print that Fireworks does not. All are good programs, but there are reasons to prefer one over the other depending on what kind of graphics you need to create or work with and what your intended use of the work is. (But any of them will be superior to PowerPoint! )
    I'm not sure I can unravel the mystery with the text box resizing.  I suspect theres an option selected.  Knowing it can be done is enough for me to do some homework.
    Maybe...don't think of text boxes at all. You have text objects. The object has a bounding box that is determined by the underlying definition of the font, but it isn't in a text box. (Sometimes swooshs will extend beyond the defining box of a character in the font, but that is another issue). The bounding box for the text object is similar to the bounding box of a circle or a star or an irregular shape. There's a reference box for the dimensions, but the text is not inside some other independent container.
    To resize, select the text object and change the font size either using the Properties palette or using the scale tool to drag on a corner of the scaling outline (different from the bounding box, and I don't know why, sorry).
    I think that,with Illustrator, you can define text boxes (or other shapes) and fill them with text. *searches* Ah.. Like these: http://school.tatoland.com/illustrator/aitype.html
    cheers!
    Lorraine

  • Strange spell-checking Wikipedia/dictionary/Google box pops up in text boxes

    I'm not really sure how to describe this... if I'm typing in a text box such as the one I'm using to type this - this has happened on Tumblr and AOL Mail most frequently - occasionally, and seemingly randomly, a box will pop up on the right side of the text box. It's almost like another frame overlaying the inside of the text box... I tried to get it to pop up purposefully so I could take a screenshot but every time I managed it I accidentally clicked inside the text box and the mysterious box disappeared.
    The box seems to be some sort of dictionary service. Sometimes it shows links to Wikipedia or Google, and sometimes it shows a dictionary site that I can't remember the name of but have never heard of otherwise.
    When the box pops up, after I click back inside the text box and it goes away, everything seems normal, but if you look at the sent message, it'll have this text at the bottom, as if it's an artifact the mystery box left behind:
    "WikipediaWictionaryChambers (UK)Google imagesGoogle defineThe Free DictionaryJoin exampleWordNetGoogleUrban DictionaryAnswers.comrhymezone.comMerriam-Webster<>0wvcidfjoguarm"
    The box seems to pop up when I double click on a word or something of the likes. As I said, I couldn't quite figure out how to make it show up on purpose.
    I don't have any plugins installed that I think would do this, and I'm most definitely spyware and adware free. I've had this popping up in Firefox for a VERY long time now.
    As I was typing this out, I took a little Tumblr break and the box popped up. I've taken a screenshot, here it is: http://img.photobucket.com/albums/v97/shiverstheninja/weirdbox.png

    I just typed out a long e-mail and the box didn't pop up, so it doesn't ''seem'' to be happening in safe mode. However, I've typed out plenty of long e-mails without the box popping up just due to random happenstance. I really don't know what causes it to show up, it seems to be a keystroke or a certain way of clicking but as I said I can't seem to make it happen on purpose.
    I know I can't be the only person who has this happening, as I can Google the artifact it leaves behind (all the names of the search engines and such) and see that other people have accidentally posted it as well, leading me to believe the box popped up for them and left that text behind and they did not realize it happened. (You don't realize it happens before you hit the post button because that text does not show up until the post has actually been sent through.)

  • Expand Text Box? "Advanced" text options not hidden?

    The title text box/editor is very small in the 10.2 update.  It's just big enough for 2 lines of text.  I find it fairly inconvenient to have it so small (I am referring to the text box in the inspector).  I'm guessing there is no way to expand this to fit more lines of text in, but if anyone knows how that'd be sweet! Otherwise I'm just crossing my fingers it gets a quick update since I'm using it every day for work.
    Also, the "advanced" tab always being collapsed in the basic text editing tools is annoying, too.  I use this every time I make a title(which I'm making two videos a day, so it's a little more tedious now after the update).  Personally, for a professional program I would consider the options in the "advanced" section to actually be basic and fairly necessary...based on how I use it, so maybe I'm not a normal case.
    Nothing is broken, just less convenient...
    Thanks y'all!

    That is a wonderful idea if I could find where to do that (maybe another feedback will be to make finding the feedback area easier (: ). Where can I find the feedback area?  Thanks for the quick reply as well!

  • Open and read from text file into a text box for Windows Store

    I wish to open and read from a text file into a text box in C# for the Windows Store using VS Express 2012 for Windows 8.
    Can anyone point me to sample code and tutorials specifically for Windows Store using C#.
    Is it possible to add a Text file in Windows Store. This option only seems to be available in Visual C#.
    Thanks
    Wendel

    This is a simple sample for Read/Load Text file from IsolateStorage and Read file from InstalledLocation (this folder only can be read)
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Windows.Storage;
    using System.IO;
    namespace TextFileDemo
    public class TextFileHelper
    async public static Task<bool> SaveTextFileToIsolateStorageAsync(string filename, string data)
    byte[] fileBytes = System.Text.Encoding.UTF8.GetBytes(data);
    StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
    var file = await local.CreateFileAsync(filename, CreationCollisionOption.ReplaceExisting);
    try
    using (var s = await file.OpenStreamForWriteAsync())
    s.Write(fileBytes, 0, fileBytes.Length);
    return true;
    catch
    return false;
    async public static Task<string> LoadTextFileFormIsolateStorageAsync(string filename)
    StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder;
    string returnvalue = string.Empty;
    try
    var file = await local.OpenStreamForReadAsync(filename);
    using (StreamReader streamReader = new StreamReader(file))
    returnvalue = streamReader.ReadToEnd();
    catch (Exception ex)
    // do somthing when exception
    return returnvalue;
    async public static Task<string> LoadTextFileFormInstalledLocationAsync(string filename)
    StorageFolder local = Windows.ApplicationModel.Package.Current.InstalledLocation;
    string returnvalue = string.Empty;
    try
    var file = await local.OpenStreamForReadAsync(filename);
    using (StreamReader streamReader = new StreamReader(file))
    returnvalue = streamReader.ReadToEnd();
    catch (Exception ex)
    // do somthing when exception
    return returnvalue;
    show how to use it as below
    async private void Button_Click(object sender, RoutedEventArgs e)
    string txt =await TextFileHelper.LoadTextFileFormInstalledLocationAsync("TextFile1.txt");
    Debug.WriteLine(txt);
    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。

  • Is there a way to create a link within a document that will pull text from the document and open it up in a separate text box within the document?

    I am trying to link sections of an form within a PDF back to instructions within the same PDF document.  Instead of having this jump back to the page within the document I would like for it to pull up the identified text within a separate pop-up text box on the same page where the form lives.  Is this possible?

    Hi gwebster,
    Instead of linking back to the instructions page, may be you can use tool tips or comments so that the instructions can be seen besides the text.
    Regards,
    Rave

  • I am using the big date calendar template and when I submit it to apple for printing I lose the name of two months. These names are not text boxes. I see the names when I send it in but something happens during the transmission to apple. It was suggested

    I am using the big date calendar template in iPhoto. I am on Lion 10.7.2, macbook air. The names of the months are on each calendar page but something happens when I send the data to Apple. The names are part of the template. They are not text boxes. I lose two names on the calendar after it is sent to Apple. Apple suggested I make a pdf file of my calendar before sending it in and check to make sure every name shows. I did this with a calendar I just sent in. The calendar was correct. All names of the months were showing. After sending the data two month names disappeard because when it arrived by mail, it was incorrect. Apple looked at my calendar via a pdf file and it was incorrect.  This is second time this has happened. I called Apple and they had me delete several folders in the Library folder, some preferences and do a complete reinstall of iPhoto.  I have not yet remade the defective calendar. I am wondering if anyone else has had this problem?
    kathy

    Control-click on the background of the view all pages window and select "Preview Calendar" from the contextual menu.
    You can also save the pdf as a file to compare to the printed calendar.  If the two names are visible in the pdf file then the printed copy should show them.  Contact Apple for a refund.  Apple Print Products - Apple Store (U.S.)

  • After choosing a blank template in PAGES, i am unable to type in the main body of the docs. I have to open a text box to type. Pls help

    Hi all, need help here. I just face this problem today. When i click the pages icon and after choosing a blank template, i am unable to type anything in the document. All icons in the format bar at the top cannot be clicked (font, font size etc). I will have to open a text box in order to type it.
    If i open an existing PAGES doc, duplicate and rename it, then i delete all existing text that i have written, only then i can type in at the doc.
    To illustrate my problem, attached is a pic from my Macbook screen
    Please help.

    Maybe try turning on the grammar checker.

  • I use preview's annotate feature to take notes by making text boxes in a PDF file. When I open the notes up again to review, all the text boxes have been rotated 90 degrees. Is there any way to prevent this from happening?

    If I click the boxes twice they rotate back but this is very annoying and time consuming.

    Just checking...still no fix for this? I upgraded to OSX 10.8.4 recently and started using Preview to annotate lecture notes, only to find text boxes rotated later on. Appears to be okay if I go back and click on all text boxes and save again.
    Any new updates on this topic re: why this is occuring and how to permanently fix it?

  • Did you know how to link the text in two or more text boxes?

    Did anyone know how to link the text in two or more text boxes in Pages 5.0? Thanks for your answer.
    Qualcuno sa come collegare il testo in due o più caselle di testo nella versione 5.0 di Pages. Grazie per le vostre risposte.

    It's just one of the many, many features that have been eliminated or changed. Leave feedback for the Pages team using the link in the Pages menu and review & rate the new versions in the Mac App Store.
    If you previously had iWork '09, those apps are still in your Applications folder in a folder named iWork '09. You can continue to use them to get things done.

  • In iWork Pages 5.1, how do I eliminate "text" in the Text Box?

    In iWork Pages 5.1, how do I eliminate the word "text" which appears in the Text Box, when I've used a color filler and no words?

    Select the text and delete.
    If you don't want text in the box, don't use a text box ie in Shapes there are various shapes. Select one without 'T'.

  • I have created a .pdf form with text boxes, but the recipients are unable to fill in their answers.

    How can I distribute a form with text boxes so that the recipients are able to type into the boxes?

    This forum is for the Adobe FormsCentral (formscentral.adobe.com) which is a service that allows you to create, collect and analyze data using an online web form. You should ask PDF related form questions in the Acrobat forums: http://forums.adobe.com/community/acrobat/forms
    I'll move your post to that forum so you don't need to retype it. They can help you out...
    Randy

  • How do you keep text box formatting data after saving and closing a PDF? (Acrobat XI)

    I love that Acrobat XI has the feature "Edit Text & Images". It saves me and my company time when modifying PDFs for our clients. Though I am having some formatting woes...
    When I insert a new text box into the document, I can span the entire text box from top to bottom of the page. I can type whatever I want in it and it makes it simple for editing later. Though, when I save the document, close it, and reopen it, all the text that was in one huge text box is broken out into multiple text boxes (per line of text). This makes it a pain to do any edits to the document because the text overlaps and does not wrap (different text boxes over one another). How can I stop this from happening? Is there a way to combine multiple text boxes maybe? What is the best solution to this issue? (running trial version of Acrobat XI on Win7 64-bit)

    Why we have chosen not to use comments is due to the how jumbled they become on a page. We are basically going back and putting detailed annotations/footnotes (with numbered markers) to identify what portion of the page the functionality lives/exist. Comments also sometimes close so you cannot find them very easily...
    I have just figured out with this form text field solution, I can't use underlined text...sigh...
    Update: Figured out the underlined text, CTRL+I

  • How to pop-up a text box for a grid item on a user defined table?

    Hello,
    I have a user defined table with a grid & one of the columns is for comments. What I'm trying to do is to pop up a text box when double clicking in the column field. This would be the same as the Item Details column in the Sales Order ittems grid.
    Thanks,
    Ron

    Please post your question on SDK forum.  Only SDK could meet your need.
    Thanks,
    Gordon

  • Pictures and text boxes in rtf template

    Hi there,
    are there any general rules for applying pictures and text boxes to rtf-templates?
    As far as I have experienced, the text boxes are not shown when generating a report. Is it generally not possible to display text boxes? Are there any work arounds?
    Thank you,
    BR
    Lena

    Hi,
    do you mean instead of text boxes?
    Yes, that is no pborlem.
    Are there any known issues regardings pictures and any other design elements?
    Thank you!
    BR
    Lena

Maybe you are looking for