[Date Prev][Date Next]
[Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[New search]
To: "Frank Elmore" <elmsoft@xxxxxxxxxxxxxx>
Subject: Re: Opening Files with Script--Does it Corrupt Paths
From: "Rick Quatro" <frameexpert@xxxxxxxxxxxxxx>
Date: Tue, 28 Sep 1999 14:00:21 -0400
Cc: "Framers2" <framers@xxxxxxxxx>, "Framers1" <Framers@xxxxxxxxxxxxxx>
References: <006a01bf0524$f2b6efe0$4dd9cdcf@carmen> <37E922C2.56805371@mindspring.com> <019601bf06aa$2803ae00$5bdacdcf@carmen> <37EF8FD5.FABF0F94@mindspring.com> <07c501bf0916$955b91c0$66dacdcf@carmen> <37EFDB2E.26D3B0C1@mindspring.com>
Sender: owner-framers@xxxxxxxxx
Hi Frank, Below is the snippet of script that was causing me the problem. If any of the documents contained missing graphics, the script would open them anyway because of "RefFileNotFound(AllowAllRefFilesUnFindable)" parameter. However, the next time the document was opened, it would prompt the user for "BadFileName" instead of the original path to the missing graphic. It only did this for the first missing graphic in the document. As it turns out, the solution was to eliminate "MakeIconic(True)" and use "MakeVisible(False)". When this was used, the path to the first graphic was not corrupted. In fact, it appears that the "MakeVisible(False)" is the only setting that won't corrupt the path. As expected, the behavior is the same with the FDK. If I find out any more info, I will post it. By the way, there is a reason I am using MakeIconic(True) in the script. You cannot use Apply PageLayout to an invisible document. Loop ForEach(BookComponent) In(ActiveBook) LoopVar(vBookComp) Open Document File(vBookComp.Name) NewVar(vCurrentDoc) UpdateTextReferences(No) UpdateXRefs(No) RefFileNotFound(AllowAllRefFilesUnFindable) MakeIconic(True) AlertUserAboutFailure(False); // Do stuff to the document here. Save Document DocObject(vCurrentDoc); Close Document DocObject(vCurrentDoc); EndLoop Rick Quatro Carmen Publishing 716 659-8267 frameexpert@mindspring.com FrameScript Information at http://www.mindspring.com/~frameexpert > Hello Rick, > > I haven't seen this before, but I've seen other FDK oddities (especially since > we're working with the MAC version). I'd be interested in hearing what happens > with your FDK solution. > > Frank Elmore > Project leader for FrameScript > > Rick Quatro wrote: > > > Hi Frank, > > > > I am sorry for the misunderstanding. It probably isn't a FrameScript > > problem. I am using a loop to open book components: > > ... > > Open Document File(vBookComp.Name) NewVar(vCurrentDoc) > > UpdateTextReferences(No) UpdateXRefs(No) > > RefFileNotFound(AllowAllRefFilesUnFindable) > > MakeIconic(True) AlertUserAboutFailure(False); > > ... > > After performing a few operations on each of the files, the script saves and > > closes the document. > > ... > > Save Document DocObject(vCurrentDoc); > > Close Document DocObject(vCurrentDoc); > > ... > > I am using the following because none of the operations that the script > > performs has anything to do with imported graphics. > > > > RefFileNotFound(AllowAllRefFilesUnFindable) > > > > However, here is what I am finding. When the user opens the document after > > the script has been run on it, it prompts them for missing graphics as > > expected. But, the first file name that it asks them for is BadFileName. If > > they click Skip This File, the next file name is a regular path name like it > > should be. It appears that the path name of the first imported graphic in > > each document is somehow getting corrupted. > > > > My solution is to use: > > > > RefFileNotFound(Cancel) > > > > and have the user update graphics before running the script OR make sure the > > file is open first. If the user clicks Ignore Missing Graphics and has the > > file open, the first path name is preserved. This approach is workable, but > > I would still like to find out for sure if using the > > "AllowAllRefFilesUnFindable" is what is actually causing the BadFileName. > > > > I am going to try to duplicate the BadFileName with the FDK. What bothers me > > is that somewhere I saw a post on this, BUT I CAN'T REMEMBER WHERE. I've > > searched my archived mail high and low, but I can't find it. > > > > Rick Quatro > > Carmen Publishing > > 716 659-8267 > > frameexpert@mindspring.com > > FrameScript Information at http://www.mindspring.com/~frameexpert > > > > > Hello Rick, > > > > > > I know of nothing in FrameScript that would corrupt a file name. The edit > > fields > > > on dialog boxes will mess up file names because of the back slash > > characters. It > > > handles them as special characters and modifies them in ways only Adobe > > can > > > know about. I'm not sure I can help any more without seeing the script. > > > > > > Frank Elmore > > > Project leader for FrameScript > > > > > > Rick Quatro wrote: > > > > > > > Hi Frank, > > > > > > > > I THINK I saw something in one of your messages about this, but I > > couldn't > > > > find it. Here is what is happening: > > > > > > > > I've got a couple of scripts that open a series of files invisibly. They > > > > allow the documents to be open even though there are missing graphics. > > When > > > > the script is done, it saves and closes the documents. It appears that > > this > > > > might be corrupting the path to the first graphic in each document. When > > the > > > > user opens the file interactively, it is asking for BadFileName. > > > > > > > > If this is what's happening, I can have the script test for this. My > > > > questions: > > > > > > > > Is this peculiar to FrameScript, or would it happen in the FDK? > > > > Is this peculiar to 5.5.6? > > > > > > > > Thanks so much for your help. > > > > > > > > Rick Quatro > > > > Carmen Publishing > > > > 716 659-8267 > > > > frameexpert@mindspring.com > > > > FrameScript Information at http://www.mindspring.com/~frameexpert > > > > > > > > > Hello Rick, > > > > > > > > > > The easiest way to convert a IntT to a StringT is to use the F_Sprintf > > > > function, > > > > > as follows: > > > > > > > > > > UCharT buf [30]; > > > > > IntT intval; > > > > > > > > > > intval = 999; > > > > > > > > > > F_Sprintf (buf, "%d", intval); > > > > > > > > > > The character array buf will have the string equivalent to the number. > > If > > > > you > > > > > want the value in an actual string pointer, do the above, then use the > > > > > F_StrCopyString function to make a string pointer. > > > > > > > > > > StringT strval; > > > > > > > > > > strval = F_StrCopyString (buf); > > > > > > > > > > Make sure that you use the F_Free function to free the memory when > > you're > > > > done. > > > > > > > > > > As for your FrameScript question, you can use the Open/Read/Close > > textfile > > > > > commands to read an .ini file. Use the Find command to check for the > > > > brackets > > > > > ([]) and the Get String command to remove them for the section > > headers. > > > > Likewise > > > > > you can use the Find command to check for an equal sign (=) and the > > Get > > > > Command > > > > > to get the key and the value. > > > > > > > > > > BTW, we are still working out what exactly will be in the next > > release, > > > > but SGML > > > > > support is definitely in. We are still looking into the idea of > > generating > > > > > object code. Good luck on your new child. My two are enough for me. > > > > > > > > > > Frank Elmore > > > > > Project leader for FrameScript > > > > > > > > > > Frank Elmore > > > > > Project leader for FrameScript > > > > > > > > > > Rick Quatro wrote: > > > > > > > > > > > Hi Framers, > > > > > > > > > > > > I need some FDK help. I am trying to convert an IntT variable to a > > > > StringT > > > > > > variable. The only way I can see to do it is with the F_StrCatIntN > > > > function. > > > > > > This works, but I have to create a dummy " " string, so I end up > > with a > > > > > > space in front of the new string. Is there a better way to convert > > an > > > > IntT > > > > > > to a StringT? Thanks in advance. > > > > > > > > > > > > s = F_StrCopyString(" "); > > > > > > s = F_Realloc(s, (IntT)vAbsolutePage+F_StrLen(s), NO_DSE); > > > > > > F_StrCatIntN(s, (IntT)vAbsolutePage, (IntT)3); > > > > > > > > > > > > Rick Quatro > > > > > > Carmen Publishing > > > > > > 716 659-8267 > > > > > > frameexpert@mindspring.com > > > > > > FrameScript Information at http://www.mindspring.com/~frameexpert > > > > > > > > > > > > > > > > > > _________________________________________________________________________ > > > > > > (un)subscribe send an email to majordomo@FrameUsers.com with > > subject > > > > of: > > > > > > Subscribe: subscribe Framers Unsubscribe: unsubscribe > > Framers > > > > > > subscribe digest Framers unsubscribe > > Framers > > > > > > > > > > > > 1999 FrameUsers Conference: > > http://www.FrameUsers.com/conference/ > > > > > > Dr. John Warnock Keynote on Adobe and the Future of FrameMaker > > > > > > Don't miss a special 2-day conference course with Shlomo Perets > > > > > > > > > > > > _________________________________________________________________________ > > > > > > > > > > > > ** To unsubscribe, send a message to majordomo@omsys.com ** > > ** with "unsubscribe framers" (no quotes) in the body. ** > ** To unsubscribe, send a message to majordomo@omsys.com ** ** with "unsubscribe framers" (no quotes) in the body. **