REM Description: File Save As 4.8a Dialogue for WSWin REM WSWin Macro File: SAVEAS48.WMC BEGIN DIALOG grpdlg 160, 135, "File Save As Options" GROUPBOX 4, 4, 150, 125, "Choose Option:" OPTIONGROUP cgroup% PUSHBUTTON 20, 18, 120, 12, "Save As with &Short File Names", 3 PUSHBUTTON 20, 31, 120, 12, "Save As with &Long File Names", 4 PUSHBUTTON 20, 44, 120, 12, "Save As &Default", 5 PUSHBUTTON 20, 57, 120, 12, "Save to &Quick Paths", 6 PUSHBUTTON 20, 70, 120, 12, "Export to Quick &Paths", 7 PUSHBUTTON 20, 83, 120, 12, "&Rename File", 8 PUSHBUTTON 20, 96, 120, 12, "&Email", 9 PUSHBUTTON 20, 109, 120, 12, "SendE&mail", 10 END DIALOG ret% = DIALOG(grpdlg) IF ret% = 2 THEN STOP IF ret% = 3 THEN GOTO ShortFileSave: IF ret% = 4 THEN GOTO LongFileSave: IF ret% = 5 THEN GOTO Default: IF ret% = 6 THEN GOTO Shortname: IF ret% = 7 THEN GOTO ShortExport: IF ret% = 8 THEN GOTO Rename: IF ret% = 9 THEN GOTO Email: IF ret% = 10 THEN GOTO SendEmail: Default: FileSaveAs GOTO FINISH ShortFileSave: BEGIN DIALOG grpdlg 160, 108, "Save As Options" GROUPBOX 4, 4, 150, 98, "Short File Name:" OPTIONGROUP ogroup% PUSHBUTTON 20, 18, 120, 12, "Save to &Quick Paths", 3 PUSHBUTTON 20, 31, 120, 12, "Export to Quick &Paths", 4 PUSHBUTTON 20, 44, 120, 12, "Set &Current Directory", 5 PUSHBUTTON 20, 57, 120, 12, "&Save to Set Directory", 6 PUSHBUTTON 20, 70, 120, 12, "Save &New File", 7 PUSHBUTTON 20, 83, 120, 12, "Save New File and &Extension", 8 END DIALOG ret% = DIALOG(grpdlg) IF ret% = 2 THEN STOP IF ret% = 3 THEN GOTO Shortname IF ret% = 4 THEN GOTO ShortExport IF ret% = 5 THEN GOTO SetDir IF ret% = 6 THEN GOTO SaveSetS IF ret% = 7 THEN GOTO NewPathS IF ret% = 8 THEN GOTO NewExtS LongFileSave: BEGIN DIALOG grpdlg 160, 108, "Long File Name Options" GROUPBOX 4, 4, 150, 98, "Long File Name:" OPTIONGROUP ogroup% PUSHBUTTON 20, 18, 120, 12, "Save to &Quick Paths", 3 PUSHBUTTON 20, 31, 120, 12, "Export to Quick &Paths", 4 PUSHBUTTON 20, 44, 120, 12, "Set &Current Directory", 5 PUSHBUTTON 20, 57, 120, 12, "&Save to Set Directory", 6 PUSHBUTTON 20, 70, 120, 12, "Save &New File", 7 PUSHBUTTON 20, 83, 120, 12, "Save New File and &Extension", 8 END DIALOG ret% = DIALOG(grpdlg) IF ret% = 2 THEN STOP IF ret% = 3 THEN GOTO Longname IF ret% = 4 THEN GOTO LongExport IF ret% = 5 THEN GOTO SetDir IF ret% = 6 THEN GOTO SaveSet IF ret% = 7 THEN GOTO NewPath IF ret% = 8 THEN GOTO NewExt Shortname: DECLARE SUB FOLDER (dirName$) CALL FOLDER (dirName$) string$ = INPUTBOX$("Please type in a File Name") orig$ = string$ + ".wsd" FileSaveAs dirName$ + "\" + orig$ GOTO ContinueClose LongName: DECLARE SUB FOLDER (dirName$) CALL FOLDER (dirName$) string$ = INPUTBOX$("Please type in a Long File Name") orig$ = string$ + ".wsd" FileSaveAsCopy dirName$ + "\" + orig$ GOTO ContinueClose ShortExport: DECLARE SUB FOLDER (dirName$) CALL FOLDER (dirName$) string$ = INPUTBOX$("Please type in a File Name without extension") GOTO ExportType LongExport: DECLARE SUB FOLDER (dirName$) CALL FOLDER (dirName$) string$ = INPUTBOX$("Please type in a Long File Name without extension") GOTO ExportType ExportType: BEGIN DIALOG grpdlg 170, 147, "Export Type" GROUPBOX 4, 4, 160, 137, "File Export Type:" OPTIONGROUP egroup% PUSHBUTTON 20, 18, 130, 12, "Export as &WinWord6", 3 PUSHBUTTON 20, 31, 130, 12, "Export as Word&Star 7.0", 4 PUSHBUTTON 20, 44, 130, 12, "Export as W&PWin 6.1", 5 PUSHBUTTON 20, 57, 130, 12, "Export as &AmiPro", 6 PUSHBUTTON 20, 70, 130, 12, "Export as WordPerfec&t 5.1", 7 PUSHBUTTON 20, 83, 130, 12, "Export as &DOS Text with Format Tags", 8 PUSHBUTTON 20, 96, 130, 12, "Export as DOS Text with &Line Breaks", 9 PUSHBUTTON 20, 109, 130, 12, "Export as DOS Text without Line &Breaks", 10 PUSHBUTTON 20, 122, 130, 12, "Export as WSW&in Text", 11 END DIALOG ret% = DIALOG(grpdlg) IF ret% = 2 THEN STOP IF ret% = 3 THEN FileExport dirName$ + "\" + string$ + ".DOC", "Microsoft Word for Windows 6.0-7.0" IF ret% = 4 THEN FileExport dirName$ + "\" + string$ + ".WS", "WordStar 7.0" IF ret% = 5 THEN FileExport dirName$ + "\" + string$ + ".WPD", "WordPerfect for Windows 6.1" IF ret% = 6 THEN FileExport dirName$ + "\" + string$ + ".SAM", "Ami Pro 2.0, 3.0" IF ret% = 7 THEN FileExport dirName$ + "\" + string$ + ".WP5", "WordPerfect 5.1, 5.2" IF ret% = 8 THEN FileExport dirName$ + "\" + string$ + ".TXT", "DOS Text with Format Tags" IF ret% = 9 THEN FileExport dirName$ + "\" + string$ + ".TXT", "DOS Text with Line Breaks" IF ret% = 10 THEN FileExport dirName$ + "\" + string$ + ".TXT", "DOS Text without Line Breaks" IF ret% = 11 THEN FileExport dirName$ + "\" + string$ + ".WSX", "WSWin Text" GOTO ContinueClose NewPathS: DECLARE SUB FOLDER (dirName$) CALL FOLDER (dirName$) string$ = INPUTBOX$("Please type in a File Name and Extension") orig$ = string$ FileSaveAs dirName$ + "\" + orig$ GOTO FINISH NewPath: DECLARE SUB FOLDER (dirName$) CALL FOLDER (dirName$) string$ = INPUTBOX$("Please type in a Long File Name and Extension") orig$ = string$ FileSaveAsCopy dirName$ + "\" + orig$ GOTO ContinueClose NewExtS: DECLARE SUB FOLDER (dirName$) CALL FOLDER (dirName$) string$ = INPUTBOX$("Please type in a File Name and Extension") orig$ = string$ FileSaveAs dirName$ + "\" + orig$ GOTO FINISH NewExt: DECLARE SUB FOLDER (dirName$) CALL FOLDER (dirName$) string$ = INPUTBOX$("Please type in a Long File Name and Extension") orig$ = string$ FileSaveAsCopy dirName$ + "\" + orig$ GOTO ContinueClose Setdir: dirName$ = INPUTBOX$("Please type in the name of a Directory/Folder") SetCurrentDir dirName$ CHDIR dirName$ GOTO FINISH SaveSetS: dirName$ = GetCurrentDir$() SetCurrentDir dirName$ CHDIR dirName$ string$ = INPUTBOX$("Please type in a Long File Name") orig$ = string$ + ".wsd" FileSaveAs dirName$ + "\" + orig$ GOTO FINISH SaveSet: dirName$ = GetCurrentDir$() SetCurrentDir dirName$ CHDIR dirName$ string$ = INPUTBOX$("Please type in a Long File Name") orig$ = string$ + ".wsd" FileSaveAsCopy dirName$ + "\" + orig$ GOTO ContinueClose Rename: REM Description: Rename a file REM Filename: rename.wmc REM Created by: Rewrite 2/4/98 of a delete file by Steven Wylie - 11/08/93 start: REM rem currentDir$ = GetCurrentDir$() REM Start at the document directory. The user can always change it in the dialog box. GetPrivateProfileString "Preferences", "DocumentDirectory", curDir$, docDir$, "wsw.ini" Pathname: DECLARE SUB FOLDER (dirName$) CALL FOLDER (dirName$) FileRename: rem currentDir$ = CHDIR docDir$ CHDIR dirName$ title$ = "Choose a File to Rename" REM Get a filename from the user. Only one file at a time will be used. filename$ = GetFileBox$("*.*", title$) IF filename$ = "" THEN STOP IF Access(filename$, 0) = 0 THEN msg$ = filename$ + chr$(13) + chr$(13) + "This file does not exist." ret% = MESSAGEBOX(msg$, "Rename File Error", 16) STOP ENDIF DECLARE FUNCTION DOSRENAME LIB "d:\ws\wswin\mscomstf.dll" (file1$, file2$) AS INTEGER file1$ = filename$ string$ = INPUTBOX$("Please type in a new File Name") file2$ = string$ DOSRENAME file1$, file2$ BEGIN DIALOG grpdlg 160, 57, "" GROUPBOX 4, 4, 150, 47, "Open Renamed File:" OPTIONGROUP cgroup% PUSHBUTTON 20, 18, 120, 12, "&Yes", 4 PUSHBUTTON 20, 31, 120, 12, "&No", 3 END DIALOG ret% = DIALOG(grpdlg) IF ret% = 2 THEN STOP IF ret% = 3 THEN GOTO FINISH IF ret% = 4 THEN newName$ = dirName$ + "\" + file2$ FileOpen newName$ GOTO FINISH email: FileName$ = INPUTBOX$("Please type in the name of a File") FileExport "f:\" + FileName$ + ".eml", "DOS Text without Line Breaks" goto FINISH SendEmail: FileName$ = INPUTBOX$("Please type in the name of a File") FileExport "h:\postroad\glinx\sndnotes\" + FileName$ + ".pop", "DOS Text with Line Breaks" goto FINISH ContinueClose: BEGIN DIALOG grpdlg 240, 108, "" GROUPBOX 4, 4, 230, 98, "Choose Option:" OPTIONGROUP cgroup% PUSHBUTTON 20, 18, 200, 12, "Continue &Editing of Open File (as 8.3)", 3 PUSHBUTTON 20, 31, 200, 12, "Add information to &DESCRIPT.ION of Open File (as 8.3)", 4 PUSHBUTTON 20, 44, 200, 12, "Continue Editing of File using &LFN", 5 PUSHBUTTON 20, 57, 200, 12, "Add WSD LFN &Information to DESCRIPT.ION for FAT Alias", 6 PUSHBUTTON 20, 70, 200, 12, "&Close File and Open File", 7 PUSHBUTTON 20, 83, 200, 12, "&Close File and Open New File", 8 END DIALOG ret% = DIALOG(grpdlg) IF ret% = 2 THEN STOP IF ret% = 3 THEN GOTO FINISH IF ret% = 4 THEN GOTO Calmira IF ret% = 5 THEN GOTO Edit IF ret% = 6 THEN GOTO LFNCalmr IF ret% = 7 THEN GOTO CloseOpen IF ret% = 8 THEN GOTO CloseNew Edit: FileClose 0, 2 FileNewDefaults TypeText string$ StartOfDoc ret% = EditReplace(" ", "", 0, 1, 1, 0, 1, 0, 0, 0) StartOfDoc rem This is for 6~#.3 FAT Alias rem CharRight 6, 0, rem This is for 8.3 Friendly FAT Alias CharRight 8, 0, WordLeft 1, 1 EditCopy ret% = GetClipboardText(text$) FileClose 0, 2 rem This is for 6~#.3 FAT Alias rem FileOpen dirname$ + "\" + text$ + "~1.wsd" rem This is for 8.3 Friendly FAT Alias FileOpen dirname$ + "\" + text$ + ".wsd" goto FINISH Calmira: calmir$ = INPUTBOX$("Please type in File Description") FileNewDefaults FileImport dirname$ + "\" + "DESCRIPT.ION", "DOS Text",2, EndOfStory TypeText "" TypeText orig$ TypeText " " TypeText calmir$ delfile$ = dirname$ + "\" + "descript.ion" KILL delfile$ FileExport delfile$, "DOS Text without Line Breaks" FileClose 0,2 GOTO ContinueClose LFNCalmr: FileNewDefaults TypeText string$ StartOfDoc ret% = EditReplace(" ", "", 0, 1, 1, 0, 1, 0, 0, 0) StartOfDoc rem This is for 6~#.3 FAT Alias rem CharRight 6, 1, rem This is for 8.3 Friendly FAT Alias CharRight 8, 1, EditCopy ret% = GetClipboardText(text$) FileClose 0,2 FileNewDefaults FileImport dirname$ + "\" + "DESCRIPT.ION", "DOS Text",2, EndOfStory TypeText "" TypeText text$ TypeText ".wsd " TypeText string$ delfile$ = dirname$ + "\" + "descript.ion" KILL delfile$ FileExport delfile$, "DOS Text without Line Breaks" FileClose 0,2 GOTO ContinueClose CloseOpen: FileClose 0, 2 SetCurrentDir dirName$ CHDIR dirName$ FileOpen GOTO FINISH CloseNew: FileClose 0, 2 SetCurrentDir dirName$ CHDIR dirName$ FileNewDefaults GOTO FINISH FINISH: SUB FOLDER (dirName$) BEGIN DIALOG grpdlg 160, 148, "Quick List Options" GROUPBOX 4, 4, 150, 138, "Select Folder/Directory:" OPTIONGROUP pgroup% PUSHBUTTON 20, 18, 120, 12, "WSWin &Default Directory", 3 PUSHBUTTON 20, 31, 120, 12, "&Kentville Church Directory", 4 PUSHBUTTON 20, 44, 120, 12, "Minor &Hockey Directory", 5 PUSHBUTTON 20, 57, 120, 12, "&Linda's Directory", 6 PUSHBUTTON 20, 70, 120, 12, "&James' Directory", 7 PUSHBUTTON 20, 83, 120, 12, "&Matthew's Directory", 8 PUSHBUTTON 20, 96, 120, 12, "&Working Directory", 9 PUSHBUTTON 20, 109, 120, 12, "&A:\ Drive", 10 PUSHBUTTON 20, 122, 120, 12, "Select a New &Path", 11 END DIALOG ret% = DIALOG(grpdlg) IF ret% = 2 THEN STOP IF ret% = 3 THEN dirName$ = "C:\_philip" IF ret% = 4 THEN dirName$ = "C:\_philip\kubc" IF ret% = 5 THEN dirName$ = "C:\_philip\kamha" IF ret% = 6 THEN dirName$ = "C:\_LINDA" IF ret% = 7 THEN dirName$ = "C:\_JAMES" IF ret% = 8 THEN dirName$ = "C:\_MATTHEW" IF ret% = 9 THEN dirName$ = "C:\CPM\USER11" IF ret% = 10 THEN dirName$ = "A:" IF ret% = 11 THEN dirName$ = INPUTBOX$("Please type in the name of a Directory/Folder") END SUB