[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

Warning: File Corruption Possible with Script



Hello Framers,

Pardon my use of public forums for this information, but it has come to my
attention that one of the scripts in my Super Web Bundle can cause the
FrameMaker file that it is run on to become corrupted. The script is called
ChangeGraphicPath and is designed to change the path of a selected imported
graphic. Because of an intermittent bug in the way FrameMaker handles
backslashes in string dialog boxes, the revised script only allows you to
change the file name of the selected imported graphic (the folder path
remains the same). I am including the revised script in this email below my
signature. Thank you very much.

Rick Quatro
Carmen Publishing
585 659-8267 (new area code)
rick@frameexpert.com
http://www.frameexpert.com

Set vGraphic = ActiveDoc.FirstSelectedGraphicInDoc;
If vGraphic.ObjectName = 'Inset'
  Find String(BKSL) InString(vGraphic.InsetFile) Backward ReturnPos(vPos)
    ReturnStatus(vFound);
  If vFound
    Get String FromString(vGraphic.InsetFile) EndPos(vPos)
      NewVar(vPath);
    Get String FromString(vGraphic.InsetFile) StartPos(vPos+1)
      NewVar(vFile);
  Else
    LeaveSub;
  EndIf
  DialogBox Type(String) Title('Please type the new file name:')
    NewVar(vNewFile) Init(vFile)
    Button(vButton);
  If vButton = CancelButton
    LeaveSub;
  EndIf
  Set vGraphic.InsetFile = vPath+vNewFile;
EndIf



** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **