Looking for an easier way to convert FM12 files to MIF12

Shmuel shmuelw1 at gmail.com
Sun Mar 8 10:54:20 PDT 2015


An HTML attachment was scrubbed...
URL: <http://lists.frameusers.com/pipermail/framers-frameusers.com/attachments/20150308/9e02e436/attachment.htm>
-------------- next part --------------

Opt("TrayIconDebug", 1) ; This helps for debugging the script
Opt("WinTitleMatchMode", 2) ; 2=subStr match

Dim $max, $x, $y
Dim $fileTypeNumber = 4 ; This is the number of the desired file type in the "Save as type" list. For example, if you want to save as MIF and MIF is number 4, this number should be 4.

MsgBox(262145, "Script", "Open all files in the book, then click OK." & @CRLF & @CRLF & _
   "Note: It is recommended to delete old files of the Save As type in the book folder before continuing. For example, if you are saving MIFs, delete all MIF in this folder. This avoids the warning message that you already have a file with the same name.")
$max = InputBox("","How many files in book (approximately)?")
Opt("WinTitleMatchMode", 2) ; 2=subStr match
WinActivate(".fm") ; Activates the FM window
WinWaitActive(".fm")
Sleep(500) ; Waits 500 milliseconds
For $x = 1 To $max
   Send("!fa") ; Opens Save As dialog box
   Sleep(100)
   Send("{TAB}")
   For $y = 1 To $fileTypeNumber
	  Send("{DOWN}")
	  Sleep(50)
   Next
   Sleep(100)
   Send("{ENTER}")
   Sleep(100)
   Send("!s")
   WinWaitClose("Save Document")
   Send("!fc")
   Opt("WinTitleMatchMode", 3) ; 3=exact match
   Sleep(300)
   If WinExists("FrameMaker") Then MsgBox(262145, "Script", "Close all warnings, then click OK.")
Next


More information about the framers mailing list