Conversion to Extends Script from FrameScript
Hi, I want to convert my frameScript code into extends script. And as we know in frameScript most of the functions are predefined and i am not able to find the alternate of those function in ExtendScript
Please find my frameScript below
Set PlatformEncodingMode = True;
Set Displaying = 0;
Execute Fc KbdMinimize;
Set gvBookName = Arg1;
Set gvMarkerFileName = Arg2;
Open Book File (gvBookName) NewVar(bookobj)
BookIsInUse(ResetLockAndContinue)
FileIsInUse(ResetLockAndContinue)
RefFileNotFound(Cancel)
UpdateXRefs(No)
ReturnFilename(returnFilename)
FontNotFoundInDoc (OK)
FileIsOldVersion (OK)
AlertUserAboutFailure(False);
Set ActiveBook = bookobj;
write console 'book path'+returnFilename;
Run eSys.ExtractPathName FullPath(returnFilename) NewVar(Pathname);
Open Document File (Pathname+'2.CompilerProfile.fm') NewVar(docobj)
BookIsInUse(ResetLockAndContinue)
FileIsInUse(ResetLockAndContinue)
RefFileNotFound(Cancel)
UpdateXRefs(No)
ReturnStatus(gvErrorList)
FontNotFoundInDoc (OK)
FileIsOldVersion (OK)
AlertUserAboutFailure(False);
If ErrorCode = 0
eStr.SaveToTextFile{' ', gvMarkerFileName};
Set vDoc = ActiveDoc;
Set vMarker = vDoc.FirstMarkerInDoc;
Loop While (vMarker)
If vMarker.MarkerTypeId.InvariantName = 'AutoEdoc'
Find String ('ds2mif') InString(vMarker.MarkerText) ReturnStatus(gvfound);
If gvFound = 1
Set tmp = eStr.ReplaceAll{vMarker.MarkerText, 'CR LF', ''};
Set vMarkerText = '{' + tmp + '} ';
Write Console 'The current marker is '+vMarkerText;
Set gvIntVal = eStr.SaveToTextFile{vMarkerText, gvMarkerFileName, 'APPEND'};
EndIf
EndIf
Set vMarker = vMarker.NextMarkerInDoc;
EndLoop
Close Document DocObject(docobj) IgnoreMods;
EndIf
Close Book BookObject(bookobj) IgnoreMods;
Quit Session;
The highlighted texts are the built-in function in FrameScript my question is are the same in extendScript as well?
I am very new at extendScript. Can anyone suggest me how can I write this script into ExtendScript?
Also, anyone has any study material in this please share it with me at my email: manish13102373@gmail.com.
Thanks,
Manish
