REM Description: Mark beginning of block REM WSWin Macro File: ctrlkb.wmc REM Created by: Rich Zuris - 1/6/94 InsertBookmark "BlockBegin", "", 1, , 0 IF ExistBookmark ("BlockEnd") THEN EditGoto 7, , "BlockEnd", 1 END IF REM Description: Copy a previously-marked block REM WSWin Macro File: ctrlkc.wmc REM Created by: Rich Zuris - 2/27/94 'If begin or end markers not set, don't continue IF ExistBookmark("BlockBegin") = 0 OR ExistBookmark("BlockEnd") = 0 THEN BEEP ret% = MessageBox("No block is currently marked.", "WSWin Macro", 48) STOP END IF 'Save current position and mark status select% = GetTextOffset(beg%, end%) 'Mark and copy block EditGoto 7, , "BlockBegin", 0 EditGoto 7, , "BlockEnd", 1 EditCopy 'Return to previous position and mark status EditGotoOffset beg%, IF select% = 1 THEN EditGotoOffset end%, 1 'Paste new text EditPaste REM Description: Unhide a previously-marked block REM WSWin Macro File: ctrlkh.wmc REM Created by: Rich Zuris - 2/27/94 'If begin and end markers set, select the block IF ExistBookmark("BlockBegin") AND ExistBookmark("BlockEnd") THEN EditGoto 7, , "BlockBegin", 0 EditGoto 7, , "BlockEnd", 1 ELSE BEEP END IF REM Description: Mark end of block REM WSWin Macro File: ctrlkk.wmc REM Created by: Rich Zuris - 1/6/94 InsertBookmark "BlockEnd", "", 1, , 0 IF ExistBookmark ("BlockBegin") THEN EditGoto 7, , "BlockBegin", 1 END IF REM Description: Move a previously-marked block REM WSWin Macro File: ctrlkv.wmc REM Created by: Rich Zuris - 2/27/94 'If begin or end markers not set, don't continue IF ExistBookmark("BlockBegin") = 0 OR ExistBookmark("BlockEnd") = 0 THEN BEEP ret% = MessageBox("No block is currently marked.", "WSWin Macro", 48) STOP END IF 'Save current position and mark status select% = GetTextOffset(beg%, end%) 'Mark and cut block EditGoto 7, , "BlockBegin", 0 EditGoto 7, , "BlockEnd", 1 CharRight 1, 1, 1 EditCut 'Return to previous position and mark status EditGotoOffset beg%, IF select% = 1 THEN EditGotoOffset end%, 1 'Paste new text EditPaste REM Description: Delete a previously-marked block REM WSWin Macro File: ctrlky.wmc REM Created by: Rich Zuris - 2/27/94 'If begin or end markers not set, don't continue IF ExistBookmark("BlockBegin") = 0 OR ExistBookmark("BlockEnd") = 0 THEN BEEP ret% = MessageBox("No block is currently marked.", "WSWin Macro", 48) STOP END IF 'Save current position and mark status select% = GetTextOffset(beg%, end%) 'Mark and cut block EditGoto 7, , "BlockBegin", 0 EditGoto 7, , "BlockEnd", 1 CharRight 1, 1, 1 EditCut 'Return to previous position and mark status EditGotoOffset beg%, REM Description: Go to begin-block marker REM WSWin Macro File: ctrlqb.wmc REM Created by: Rich Zuris - 2/27/94 'If begin marker set, go to it IF ExistBookmark("BlockBegin") = 0 THEN BEEP ELSE EditGoto 7, , "BlockBegin", 0 END IF REM Description: Go to end-block marker REM WSWin Macro File: ctrlqk.wmc REM Created by: Rich Zuris - 2/27/94 'If end marker set, go to it IF ExistBookmark("BlockEnd") = 0 THEN BEEP ELSE EditGoto 7, , "BlockEnd", 0 END IF REM Description: Emulates WSDOS ^U undo action REM WSWin Macro File: ctrlu.wmc REM Created by: Karl Fuss InsertBookmark "StartPaste",,,, EditPaste EditGoto 7,, "StartPaste", InsertBookmark "StartPaste",,,, 1 next$ = GetNextChar$ (0) IF next$ = "" AND LEFT$(next$, 4) <> "" THEN CharLeft 1,0, CharRight 1,0, ELSE CharRight 1,0, CharLeft 1,0, ENDIF REM Description: Delete line. Emulates WSDOS ^Y command. REM WSWin Macro File: ctrly.wmc REM Created by: Karl Fuss StartOfLine EndOfLine 1 next$ = GetNextChar$ (0) IF LEFT$(next$, 4) = "" THEN StartOfLine LineDown 1, 1 EditCut ELSE EditCopy EditDelete ENDIF next$ = GetNextChar$ (0) IF next$ = "" AND LEFT$(next$, 4) <> "" THEN CharLeft 1,0, CharRight 1,0, ELSE CharRight 1,0, CharLeft 1,0, ENDIF