home *** CD-ROM | disk | FTP | other *** search
Wrap
INI File | 1995-09-12 | 30.5 KB | 1,605 lines
[ver] 4 [sty] [files] [charset] 82 ANSI (Windows, IBM CP 1252) [revisions] 0 [prn] HP DeskJet 500 [port] LPT1: [lang] 1 [desc] 810952929 19 806460105 2555 10 0 0 0 0 1 [fopts] 0 1 0 0 [lnopts] 2 Body Text 1 [docopts] 5 2 [GramStyle] [ParaNum] 1 [tag] Body Text 2 [fnt] Arial 240 0 16384 [algn] 1 1 216 0 0 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 0 1 1 0 16 0 0 [nfmt] 272 1 3 . , $ Body Text 0 0 [tag] Body Single 3 [fnt] Times New Roman 240 0 49152 [algn] 1 1 0 0 0 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 0 1 1 0 0 0 0 [nfmt] 280 1 2 . , $ Body Single 0 0 [tag] Function 4 [fnt] Arial 240 0 16385 [algn] 1 1 0 0 0 [spc] 33 244 1 0 0 1 100 [brk] 68 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 1 0 1 1 0 0 0 0 [nfmt] 272 1 3 . , $ Body Text 0 0 [tag] Table Text 5 [fnt] Arial 240 0 16384 [algn] 1 1 0 0 0 [spc] 33 273 1 0 0 1 100 [brk] 4 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 0 1 1 0 0 0 0 [nfmt] 272 1 3 . , $ Table Text 0 0 [tag] FuncBody 6 [fnt] Arial 240 0 16384 [algn] 1 1 216 0 0 [spc] 33 273 1 0 0 1 100 [brk] 36 [line] 8 0 1 0 1 1 1 10 10 1 [spec] 0 0 0 1 1 0 16 0 0 [nfmt] 272 1 3 . , $ Body Text 0 0 [lay] Standard 513 [rght] 15840 12240 1 540 1440 1 1440 2340 0 1 0 1 0 2 1 540 9900 12 1 720 1 1440 1 2160 1 2880 1 3600 1 4320 1 5040 1 5760 1 6480 1 7200 1 7920 1 8640 [hrght] [lyfrm] 1 11200 0 0 12240 1440 0 1 3 1 0 0 0 0 0 0 0 0 1 [frmlay] 1440 12240 1 1440 72 1 792 1440 0 1 0 1 1 0 1 1440 10800 1 3 9360 [txt] > [frght] [lyfrm] 1 13248 0 14400 12240 15840 0 1 3 1 0 0 0 0 0 0 0 0 2 [frmlay] 15840 12240 1 1440 792 1 14472 1440 0 1 0 1 1 0 1 1440 10800 2 2 4680 3 9360 [txt] > [elay] [l1] 0 [pg] 10 43 0 30 0 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 87 0 5 0 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 125 0 5 0 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 129 0 5 512 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 171 0 5 512 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 212 0 13 0 0 1 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 227 0 5 512 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 237 0 5 512 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 282 0 5 0 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 286 0 0 1025 0 0 0 65535 65535 Standard 65535 0 0 0 0 0 0 0 0 0 65535 0 0 65535 0 0 0 0 0 [edoc] <:#284,9360><-!><-!><-!><-!><-">' Select Tools | Macro | Playback and choose this file to install WideOpen <:#284,9360>' Please read WIDEOPEN.SAM for documentation <:#284,9360> <:#284,9360>Declare GetPathFromFile$(file$) <:#293,9360><+!> <:#293,9360><+!>FUNCTION WideOpenInstall<-!><+!>()<-!> <:I720,0,0,0><:#284,9360>if (Decide("Install WideOpen now?")=0) then <:I720,0,0,0><:#284,9360> exit function <:I720,0,0,0><:#284,9360>endif <:I720,0,0,0><:#284,9360>path$ = GetPathFromFile$(GetRunningMacroFile$()) <:I720,0,0,0><:#284,9360>src$=strcat$(path$, "wideopen.smm") <:I720,0,0,0><:#284,9360>dest$ = strcat$(GetMacPath$(), "wideopen.smm") <:I720,0,0,0><:#284,9360> <:I720,0,0,0><:#284,9360>if (DOSGetFileAttr(dest$) <<<;> -1) then <:I720,0,0,0><:#284,9360> if decide("{dest$} exists already. Do you want to overwrite it?")=1 then <:I720,0,0,0><:#284,9360> DosCopyFile(src$, dest$) <:I720,0,0,0><:#284,9360> endif <:I720,0,0,0><:#284,9360>else <:I720,0,0,0><:#284,9360> DosCopyFile(src$, dest$) <:I720,0,0,0><:#284,9360>endif <:I720,0,0,0><:#284,9360> <:I720,0,0,0><:#284,9360>if DOSGetFileAttr(dest$)=-1 then <:I720,0,0,0><:#568,9360> Message("Failed to copy {src$} to {dest$}. WideOpen not installed; try manual install.") <:I720,0,0,0><:#284,9360> exit function <:I720,0,0,0><:#284,9360>endif <:I720,0,0,0><:#284,9360> <:I720,0,0,0><:#284,9360>src$=strcat$(path$, "widen14.exe") <:I720,0,0,0><:#284,9360>dest$=strcat$(GetWindowsDirectory$(), "widen14.exe") <:I720,0,0,0>Exec(strcat$(src$, " -shutdown"), 1) <:I720,0,0,0><:#284,9360>if (DOSGetFileAttr(dest$) <<<;> -1) then <:I720,0,0,0><:#284,9360> if decide("{dest$} exists already. Do you want to overwrite it?")=1 then <:I720,0,0,0><:#284,9360> DosCopyFile(src$, dest$) <:I720,0,0,0><:#284,9360> endif <:I720,0,0,0><:#284,9360>else <:I720,0,0,0><:#284,9360> DosCopyFile(src$, dest$) <:I720,0,0,0><:#284,9360>endif <:I720,0,0,0><:#284,9360> <:I720,0,0,0><:#284,9360>if DOSGetFileAttr(dest$)=-1 then <:I720,0,0,0><:#568,9360> Message("Failed to copy {src$} to {dest$}. WideOpen not installed; try manual install.") <:I720,0,0,0><:#284,9360> exit function <:I720,0,0,0><:#284,9360>endif <:I720,0,0,0><:#284,9360> <:I720,0,0,0><:#284,9360>Call WideOpenInstallAutoExec() <:I720,0,0,0><:#284,9360>Message("WideOpen installed!") <:#284,9360>END FUNCTION <:#284,9360> <:#293,9360><+!>FUNCTION GetPathFromFile$(file$)<-!> <:#284,9360> length = len(file$) <:#284,9360> c=length <:#284,9360> while (c<;>1 AND (NOT mid$(file$, c, 1) = "\")) <:#284,9360> c= c - 1 <:#284,9360> wend <:#284,9360> GetPathFromFile$ = Left$(file$, c) <:#293,9360><+!>END FUNCTION<-!> <:#284,9360> <:#293,9360><+!>FUNCTION GetName<-!><+!>FromPath<-!><+!>$(file$)<-!> <:#284,9360> length = len(file$) <:#284,9360> c=length <:#284,9360> while (c<;>1 AND (NOT mid$(file$, c, 1) = "\")) <:#284,9360> c= c - 1 <:#284,9360> wend <:#284,9360> GetNameFromPath$ = Right$(file$, length-c) <:#293,9360><+!>END FUNCTION<-!> <:#284,9360> <:#293,9360><+!>FUNCTION WideOpenInstallAutoExec<-!><+!>()<-!> <:I720,0,0,0><:#284,9360>declare OpenAutoExec() <:I720,0,0,0><:#284,9360><:><:>StatusBarMsg("Installing wideopen in AUTOEXEC.SMM") <:I720,0,0,0><:#284,9360>OpenAutoExec() <:I720,0,0,0><:#568,9360>Replace(0,0,FindFromPage1 + ReplaceAll, "call wideopen.smm!InstallWideOpenMenus()", "") <:I720,0,0,0><:#284,9360>Save() ' and save it <:I720,0,0,0><:#284,9360>FileClose() ' and close it <:I720,0,0,0><:#284,9360> <:I720,0,0,0><:#284,9360>OpenAutoExec() <:I720,0,0,0><:#284,9360>type("call wideopen.smm!InstallWideOpenMenus()") <:I720,0,0,0><:#284,9360><:><:>StatusBarMsg("Saving AUTOEXEC.SMM") <:I720,0,0,0><:#284,9360>Save() ' and save it <:I720,0,0,0><:#284,9360>FileClose() ' and close it <:I720,0,0,0><:#284,9360>DECLARE InstallWideOpenMenus() <:I720,0,0,0><:#284,9360>InstallWideOpenMenus() <:I720,0,0,0><:#284,9360><:><:>StatusBarMsg("WideOpen installed") <:I720,0,0,0><:#284,9360>StatusBarMsg("") <:#284,9360>END FUNCTION <:#293,9360><+!> <:#293,9360><+!>FUNCTION WideOpenUninstall<-!><+!>()<-!> <:I720,0,0,0><:#284,9360>if (Decide("Are you sure you want to uninstall WideOpen now?")=0) then <:I720,0,0,0><:#284,9360> exit function <:I720,0,0,0><:#284,9360>endif <:I720,0,0,0><:#284,9360>declare OpenAutoExec() <:I720,0,0,0><:#284,9360><:><:>StatusBarMsg("Uninstalling wideopen in AUTOEXEC.SMM") <:I720,0,0,0><:#284,9360>OpenAutoExec() <:I720,0,0,0><:#568,9360>Replace(0,0,FindFromPage1 + ReplaceAll, "call wideopen.smm!InstallWideOpenMenus()", "") <:I720,0,0,0><:#284,9360> <:I720,0,0,0><:#284,9360><:><:>StatusBarMsg("Saving AUTOEXEC.SMM") <:I720,0,0,0><:#284,9360>Save() ' and save it <:I720,0,0,0><:#284,9360>FileClose() ' and close it <:I720,0,0,0><:#284,9360><:><:>StatusBarMsg("WideOpen uninstalled") <:I720,0,0,0><:#568,9360>Message("WideOpen uninstalled-- The next time Ami Pro is started, WideOpen will not be used.") <:I720,0,0,0><:#284,9360>StatusBarMsg("") <:#284,9360>END FUNCTION <:#293,9360><+!> <:#293,9360><+!> <:#293,9360><+!>FUNCTION InstallWideOpenMenus() <:I720,0,0,0><:#284,9360>menu="&File" <:I720,0,0,0><:#284,9360>mac="wideopen.smm" <:I720,0,0,0><:#284,9360>StatusBarMsg("Installing WideOpen for Ami Pro") <:I720,0,0,0><:#568,9360>changemenuaction(1, menu, "&Open... Ctrl+O", "{mac}!WideOpen", "Open an existing document using WideOpen (shift to disable)") <:I720,0,0,0><:#568,9360>changemenuaction(1, menu, "&Open... ^O", "{mac}!WideOpen", "Open an existing document using WideOpen (shift to disable)") <:I720,0,0,0><:#568,9360>changemenuaction(1, menu, "&Save Ctrl+S", "{mac}!WideSave", "Save document using WideOpen (shift to disable).") <:I720,0,0,0><:#568,9360>changemenuaction(1, menu, "&Save ^S", "{mac}!WideSave", "Save document using WideOpen (shift to disable).") <:I720,0,0,0><:#568,9360>changemenuaction(1, menu, "Save &As...", "{mac}!WideSaveAs", "Save document under a new name using WideOpen (shift to disable).") <:I720,0,0,0><:#284,9360>StatusBarMsg("") <:#284,9360>END FUNCTION <:#284,9360> <:#293,9360><+!>FUNCTION GetWideOpenID()<-!> <:I720,0,0,0><:#284,9360>id = DDEInitiate("Widen14", "Widen14") <:I720,0,0,0><:#284,9360>IF id = 0 <:I720,0,0,0><:#284,9360> Exec("widen14.exe", 1) <:I720,0,0,0><:#284,9360> FOR I = 1 to 10 <:I720,0,0,0><:#284,9360> id = DDEInitiate("Widen14", "Widen14") <:I720,0,0,0><:#284,9360> IF id <;> 0 <:I720,0,0,0><:#284,9360> OK = TRUE <:I720,0,0,0><:#284,9360> BREAK <:I720,0,0,0><:#284,9360> ENDIF <:I720,0,0,0><:#284,9360> NEXT <:I720,0,0,0><:#284,9360>ENDIF <:I720,0,0,0><:#284,9360>return(id) <:#284,9360>END FUNCTION <:#284,9360> <:p<* >> <:#293,9360><+!>FUNCTION WideOpen()<-!> <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360>IgnoreKeyboard(1) <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360>id = GetWideOpenID() <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360>IF id = 0 <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#568,9360> Message("Could not communicate with WideOpen. Please start WIDEN.EXE manually or deinstall WideOpen.") <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> EXIT FUNCTION <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360>ENDIF <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#568,9360>DDEExecute(id, "open -filter 'Ami Pro|*.sam|Ami Pro Macro|*.smm|Rich Text Format|*.rtf|Windows Write|*.wri|Word for Windows 6.0|*.doc|All files|*.*|'") @Body Single@<:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360>FileName = DDEReceive$(id, "ShortName") <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360>if FileName = "::Default::" then <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> FileOpen <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360>elseif FileName <<<;> "" then <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> FileType = DDEReceive$(id, "FilterName") <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> format = 1 <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> if Right$(FileName, 3) = "SAM" then <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> FileType = "" <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> format = 1 <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> elseif Right$(FileName, 3) = "DOC" then <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> FileType = "Word for Windows 6.0" <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> format = 16 <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> elseif Right$(FileName, 3) = "TXT" then <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> FileType = "ASCII" <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> format = 5 <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> elseif Right$(FileName, 3) = "RTF" then <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> FileType = "Rich Text Format" <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> format = 16 <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> endif <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> LongName = DDEReceive$(id, "LongName") <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> StatusBarMsg("Opening {LongName}...") <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> FileOpen(FileName, format, FileType) <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> StatusBarMsg("") <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360>endif <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360>DDETerminate(id) <:R><:#284,9360>END FUNCTION <:#284,9360> <:p<* >> <:#293,9360><+!>FUNCTION WideSaveAs()<-!> <:I720,0,0,0><:#284,9360>IgnoreKeyboard(1) <:I720,0,0,0><:#284,9360>id = GetWideOpenID() <:I720,0,0,0><:#284,9360>IF id = 0 <:I720,0,0,0><:#568,9360> Message("Could not communicate with WideOpen. Please start WIDEN.EXE manually or deinstall WideOpen.") <:I720,0,0,0><:#284,9360> EXIT FUNCTION <:I720,0,0,0><:#284,9360>ENDIF <:I720,0,0,0><:#284,9360> <:I720,0,0,0><:#284,9360>name = GetDocInfo$(7) ' description <:I720,0,0,0><:#284,9360>if name="" then name = GetDocInfo$(1) endif <:I720,0,0,0><:#284,9360>dir = GetDocInfo$(2) <:I720,0,0,0><:#852,9360>DDEExecute(id, "save -filter 'Ami Pro|*.sam|Ami Pro Macro|*.smm|ASCII|*.txt|Rich Text Format|*.rtf|Windows Write|*.wri|Word for Windows 6.0|*.doc|All files|*.*|' -file '{name}' -dir '{dir}' ") <:I720,0,0,0><:#284,9360> <:I720,0,0,0><:#284,9360>FileName = DDEReceive$(id, "ShortName") <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> if FileName = "::Default::" then <:I720,0,0,0><:R><:#284,9360> SaveAs <:I720,0,0,0><:#284,9360>elseif FileName <<<;> "" then <:I720,0,0,0><:#284,9360> LongName = DDEReceive$(id, "LongName") <:I720,0,0,0><:#284,9360> StatusBarMsg("Saving {LongName}") <:I720,0,0,0><:#284,9360> <:I720,0,0,0><:#284,9360> format = 32 <+@><:I720,0,0,0><:S+-1><:#284,9360> FileType = DDEReceive$(id, "FilterName") <:I720,0,0,0><:#284,9360> if FileType = "Ami Pro" then <:I720,0,0,0><:#284,9360> FileType = "" <:I720,0,0,0><:#284,9360> elseif FileType = "ASCII" then <:I720,0,0,0><:#284,9360> format = 4 <:I720,0,0,0><:#284,9360> endif <:I720,0,0,0><:#284,9360> <:I720,0,0,0><:#284,9360>' The junk below is to keep Ami from popping up an overwrite dialog <:I720,0,0,0><:#568,9360> tmpname = strcat$(left$(FileName, len(FileName) - 5), "0.", right$(FileName, 3)) <:I720,0,0,0><:#284,9360> SaveAs(tmpname, format, LongName, FileType) <:I720,0,0,0><:#284,9360> FileClose <:I720,0,0,0><:#284,9360> DDEExecute(id, strcat$("rename '", tmpname, "' '", LongName, "'")) <:I720,0,0,0><:#284,9360> <:I720,0,0,0><:#284,9360>' Now choose the filetype and format for the open <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> If Right$(FileName, 3) = "SAM" then <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> FileType = "" <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> format = 1 <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> elseif Right$(FileName, 3) = "DOC" then <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> FileType = "Word for Windows 6.0" <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> format = 16 <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> elseif Right$(FileName, 3) = "TXT" then <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> FileType = "ASCII" <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> format = 5 <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> elseif Right$(FileName, 3) = "RTF" then <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> FileType = "Rich Text Format" <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> format = 16 <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> endif <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> FileOpen(FileName, format, FileType) <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> doc$ = GetNameFromPath$(LongName) <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> doc$ = left$(doc$, len(doc$) - 4) <:I540,0,0,0><:R1,12,1,1170,1,1440,1,2160,1,2880,1,3600,1,4320,1,5040,1,5760,1,6480,1,7200,1,7920,1,8640,><:#284,9360> DocInfo (doc$, "", 0) <:I720,0,0,0><:R><:#284,9360>endif <:I720,0,0,0><:#284,9360>DDETerminate(id) <:#284,9360>END FUNCTION <:p<* >> <:#293,9360><+!>FUNCTION WideSave()<-!> <:I720,0,0,0><:#284,9360>IgnoreKeyboard(1) <:I720,0,0,0><:#284,9360>if GetOpenFileName$() = "" <:I720,0,0,0><:#284,9360> WideSaveAs() <:I720,0,0,0><:#284,9360>else <:I720,0,0,0><:#284,9360> Save() <:I720,0,0,0><:#284,9360>endif <:#284,9360>END FUNCTION <:#284,9360> <:p<* >> <:#568,9360><+">' OpenAutoExec - Open-Create the autoexec.smm then position the insertion point just<-"> <:#284,9360><+">' before the first END FUNCTION<-"> <:#284,9360>' @Function@<:#293,9360><:ZOpenAutoExec>FUNCTION OpenAutoExec(<:Z~OpenAutoExec>) <:#284,9360>defstr fid; <:#284,9360> <:#284,9360>Declare FindAutoExec() <:#284,9360><:ZMACUTEMP><:Z~MACUTEMP>auto = FindAutoExec(); ' Determine where the autoexec is <:#284,9360> <:#284,9360>if (0 = Assign(&fid, fopen(auto, "r"))) ' Does it exist? <:#284,9360> sty = GetProfileString$("AmiPro", "defstyle", "amipro.ini") <:#284,9360> if sty = "" <:#284,9360> sty = "_default.sty" <:#284,9360> endif <:#284,9360> new(sty, 0, 0) ' No let ami create it. <:#284,9360> type("FUNCTION auto()<[>enter]") ' And fill in an empty <:#284,9360> type("END FUNCTION<[>enter]") ' Function - End Function Pait <:#284,9360> type("<[>ctrlhome]") ' Position at top of file <:#284,9360> saveas(auto, 32,"", "") ' Create it. <:#284,9360>else <:#284,9360> fclose(fid) ' it existed. so close this <:#284,9360> FileOpen(auto, 1, "") ' let ami open <:#284,9360>endif <:#284,9360>Replace(0, 0, 24576, "End function", "") ' position at first end function <:#284,9360>type("<[>home]") ' before the End <:#284,9360>type("<[>enter]") ' create a line <:#284,9360>type("<[>up]") ' position on that line <:#284,9360>END FUNCTION ' that all folks <:#284,9360>' <:#235,9360><:f200,BArial,0,0,0><+">' FindAutoExec - determine where the autoexec.smm file is. If we can find it in the macro<-"> <:#235,9360><+"><:f200,BArial,0,0,0>' directory or the docs directory, return the amipro directory.<-"> <:#235,9360><+"><:f200,BArial,0,0,0>'<-"><:f> @Function@<:#293,9360><:ZFindAutoExec>FUNCTION FindAutoExec()<:Z~FindAutoExec> <:#284,9360>defstr fid; <:#284,9360>auto = strcat$(GetMacPath$(), "autoexec.smm") ' check macro dir first <:#284,9360>if (0 = Assign(&fid, fopen(auto, "r"))) ' Does it exist? <:#284,9360> auto = strcat$(GetDocPath$(), "autoexec.smm") ' Now the docs dir <:#284,9360> if (0 = Assign(&fid, fopen(auto, "r"))) ' Does it exist? <:#284,9360> auto = strcat$(GetAmiDirectory$(), "autoexec.smm") ' lastly amipro dir <:#284,9360> else <:#284,9360> fclose(fid) <:#284,9360> endif <:#284,9360>else <:#284,9360> fclose(fid) <:#284,9360>endif <:#284,9360>return auto <:#284,9360>END FUNCTION <:#284,9360> <:#284,9360> > [Embedded] 00024238 > [macsum] 12 WideOpenInstall 0 0 4 5 GetPathFromFile$ 1025 1 3 46 GetNameFromPath$ 1226 1 3 55 WideOpenInstallAutoExec 1440 0 1 64 WideOpenUninstall 1819 0 1 83 InstallWideOpenMenus 2275 0 3 101 GetWideOpenID 2920 0 4 113 WideOpen 3232 0 6 129 WideSaveAs 4208 0 10 171 WideSave 5701 0 1 227 OpenAutoExec 5807 0 4 240 FindAutoExec 6255 0 3 269 [macse] 14 WideOpenInstall 0 2 "Install WideOpen now?" 13 5 0 18 0 11 00000089 6 0 15 9 0 802 13 16 GetPathFromFile$ [X] 13 8 1 0 16 "{1}" "wideopen.smm" 13 8 2 0 295 13 0 16 [X] "wideopen.smm" 13 8 3 0 775 "{3}" 13 5 -1 18 1 11 00000374 0 2 "{3} exists already. Do you want to overwrite it?" 13 5 1 18 0 11 00000361 0 803 "{2}" "{3}" 10 00000393 0 803 "{2}" "{3}" 0 775 "{3}" 13 5 -1 18 0 11 00000526 0 3 "Failed to copy {2} to {3}. WideOpen not installed; try manual install." 6 0 15 9 0 16 "{1}" "widen14.exe" 13 8 2 0 1288 13 0 16 [X] "widen14.exe" 13 8 3 0 16 "{2}" " -shutdown" 13 0 22 [X] 1 0 775 "{3}" 13 5 -1 18 1 11 00000806 0 2 "{3} exists already. Do you want to overwrite it?" 13 5 1 18 0 11 00000793 0 803 "{2}" "{3}" 10 00000825 0 803 "{2}" "{3}" 0 775 "{3}" 13 5 -1 18 0 11 00000958 0 3 "Failed to copy {2} to {3}. WideOpen not installed; try manual install." 6 0 15 9 16 WideOpenInstallAutoExec 0 3 "WideOpen installed!" 6 0 15 9 14 GetPathFromFile$ 0 14 "{0}" 13 8 2 6 2 8 3 6 3 5 1 18 3 0 15 "{0}" "{3}" 1 13 7 "\" 18 0 1 3 1 1 11 00000161 6 3 5 1 3 1 8 3 10 00000052 0 806 "{0}" "{3}" 13 8 1 6 1 15 9 14 GetNameFromPath$ 0 14 "{0}" 13 8 2 6 2 8 3 6 3 5 1 18 3 0 15 "{0}" "{3}" 1 13 7 "\" 18 0 1 3 1 1 11 00000161 6 3 5 1 3 1 8 3 10 00000052 6 2 6 3 3 1 0 807 "{0}" [X] 13 8 1 6 1 15 9 14 WideOpenInstallAutoExec 0 789 "Installing wideopen in AUTOEXEC.SMM" 16 OpenAutoExec 5 8192 5 1024 3 0 2 488 1 0 0 [X] "call wideopen.smm!InstallWideOpenMenus()" "" 2 103 1 2 147 1 16 OpenAutoExec 0 6 "call wideopen.smm!InstallWideOpenMenus()" 0 789 "Saving AUTOEXEC.SMM" 2 103 1 2 147 1 16 InstallWideOpenMenus 0 789 "WideOpen installed" 0 789 "" 6 0 15 9 14 WideOpenUninstall 0 2 "Are you sure you want to uninstall WideOpen now?" 13 5 0 18 0 11 00000118 6 0 15 9 0 789 "Uninstalling wideopen in AUTOEXEC.SMM" 16 OpenAutoExec 5 8192 5 1024 3 0 2 488 1 0 0 [X] "call wideopen.smm!InstallWideOpenMenus()" "" 0 789 "Saving AUTOEXEC.SMM" 2 103 1 2 147 1 0 789 "WideOpen uninstalled" 0 3 "WideOpen uninstalled-- The next time Ami Pro is started, WideOpen will not be used." 0 789 "" 6 0 15 9 14 InstallWideOpenMenus 7 "&File" 8 1 7 "wideopen.smm" 8 2 0 789 "Installing WideOpen for Ami Pro" 0 523 1 "{1}" "&Open... Ctrl+O" "{2}!WideOpen" "Open an existing document using WideOpen (shift to disable)" 0 523 1 "{1}" "&Open... ^O" "{2}!WideOpen" "Open an existing document using WideOpen (shift to disable)" 0 523 1 "{1}" "&Save Ctrl+S" "{2}!WideSave" "Save document using WideOpen (shift to disable)." 0 523 1 "{1}" "&Save ^S" "{2}!WideSave" "Save document using WideOpen (shift to disable)." 0 523 1 "{1}" "Save &As..." "{2}!WideSaveAs" "Save document under a new name using WideOpen (shift to disable)." 0 789 "" 6 0 15 9 14 GetWideOpenID 0 8 "Widen14" "Widen14" 13 8 1 6 1 5 0 18 0 11 00000288 0 22 "widen14.exe" 1 5 1 8 2 5 10 6 2 18 2 12 00000189 10 00000288 5 1 6 2 3 0 8 2 10 00000113 0 8 "Widen14" "Widen14" 13 8 1 6 1 5 0 18 3 11 00000275 5 1 8 3 10 00000288 10 00000156 6 1 15 9 6 0 15 9 14 WideOpen 0 32 1 16 GetWideOpenID 13 8 1 6 1 5 0 18 0 11 00000189 0 3 "Could not communicate with WideOpen. Please start WIDEN.EXE manually or deinstall WideOpen." 6 0 15 9 0 11 "{1}" "open -filter 'Ami Pro|*.sam|Ami Pro Macro|*.smm|Rich Text Format|*.rtf|Windows Write|*.wri|Word for Windows 6.0|*.doc|All files|*.*|'" 0 10 "{1}" "ShortName" 13 8 2 6 2 7 "::Default::" 18 0 11 00000432 24 102 10 00000953 6 2 7 "" 18 1 11 00000953 0 10 "{1}" "FilterName" 13 8 3 5 1 8 4 0 807 "{2}" 3 13 7 "SAM" 18 0 11 00000587 7 "" 8 3 5 1 8 4 10 00000860 0 807 "{2}" 3 13 7 "DOC" 18 0 11 00000689 7 "Word for Windows 6.0" 8 3 5 16 8 4 10 00000860 0 807 "{2}" 3 13 7 "TXT" 18 0 11 00000775 7 "ASCII" 8 3 5 5 8 4 10 00000860 0 807 "{2}" 3 13 7 "RTF" 18 0 11 00000860 7 "Rich Text Format" 8 3 5 16 8 4 0 10 "{1}" "LongName" 13 8 5 0 789 "Opening {5}..." 2 102 1 "{2}" "{4}" "{3}" 0 789 "" 0 9 "{1}" 6 0 15 9 14 WideSaveAs 0 32 1 16 GetWideOpenID 13 8 1 6 1 5 0 18 0 11 00000191 0 3 "Could not communicate with WideOpen. Please start WIDEN.EXE manually or deinstall WideOpen." 6 0 15 9 0 279 7 13 8 2 6 2 7 "" 18 0 11 00000257 0 279 1 13 8 2 0 279 2 13 8 3 0 11 "{1}" "save -filter 'Ami Pro|*.sam|Ami Pro Macro|*.smm|ASCII|*.txt|Rich Text Format|*.rtf|Windows Write|*.wri|Word for Windows 6.0|*.doc|All files|*.*|' -file '{2}' -dir '{3}' " 0 10 "{1}" "ShortName" 13 8 4 6 4 7 "::Default::" 18 0 11 00000554 24 104 10 00001470 6 4 7 "" 18 1 11 00001470 0 10 "{1}" "LongName" 13 8 5 0 789 "Saving {5}" 5 32 8 6 0 10 "{1}" "FilterName" 13 8 7 6 7 7 "Ami Pro" 18 0 11 00000742 7 "" 8 7 10 00000787 6 7 7 "ASCII" 18 0 11 00000787 5 4 8 6 0 14 "{4}" 13 5 5 3 1 0 806 "{4}" [X] 13 0 807 "{4}" 3 13 0 16 [X] "0." [X] 13 8 8 2 104 1 "{8}" "{6}" "{5}" "{7}" 24 147 0 16 "rename '" "{8}" "' '" "{5}" "'" 13 0 11 "{1}" [X] 0 807 "{4}" 3 13 7 "SAM" 18 0 11 00001062 7 "" 8 7 5 1 8 6 10 00001335 0 807 "{4}" 3 13 7 "DOC" 18 0 11 00001164 7 "Word for Windows 6.0" 8 7 5 16 8 6 10 00001335 0 807 "{4}" 3 13 7 "TXT" 18 0 11 00001250 7 "ASCII" 8 7 5 5 8 6 10 00001335 0 807 "{4}" 3 13 7 "RTF" 18 0 11 00001335 7 "Rich Text Format" 8 7 5 16 8 6 2 102 1 "{4}" "{6}" "{7}" 16 GetNameFromPath$ "{5}" 13 8 9 0 14 "{9}" 13 5 4 3 1 0 806 "{9}" [X] 13 8 9 2 109 1 "{9}" "" 0 0 9 "{1}" 6 0 15 9 14 WideSave 0 32 1 0 267 13 7 "" 18 0 11 00000085 16 WideSaveAs 10 00000094 2 103 1 6 0 15 9 14 OpenAutoExec 16 FindAutoExec 13 8 2 5 0 0 259 "{2}" "r" 13 0 805 &1 [X] 13 18 0 11 00000330 0 286 "AmiPro" "defstyle" "amipro.ini" 13 8 3 6 3 7 "" 18 0 11 00000208 7 "_default.sty" 8 3 2 101 1 "{3}" 0 0 0 6 "FUNCTION auto()[13]" 0 6 "END FUNCTION[13]" 0 6 "[16420]" 2 104 1 "{2}" 32 "" "" 10 00000363 0 260 "{1}" 2 102 1 "{2}" 1 "" 2 488 1 0 0 24576 "End function" "" 0 6 "[36]" 0 6 "[13]" 0 6 "[38]" 6 0 15 9 14 FindAutoExec 0 295 13 0 16 [X] "autoexec.smm" 13 8 2 5 0 0 259 "{2}" "r" 13 0 805 &1 [X] 13 18 0 11 00000317 0 268 13 0 16 [X] "autoexec.smm" 13 8 2 5 0 0 259 "{2}" "r" 13 0 805 &1 [X] 13 18 0 11 00000291 0 798 13 0 16 [X] "autoexec.smm" 13 8 2 10 00000304 0 260 "{1}" 10 00000330 0 260 "{1}" 6 2 15 9 6 0 15 9 00024263