CompuServe Messages

Script Macros

    30-Nov-91 15:36:14
Sb: #30764-Script Macros
Fm: Art Steinmetz 76044,3204
To: J.R. BOOKWALTER 76665,1335
* Now you're gettin' it! The script works great. Now we can just tack features on around that base to address problems and make it as general as possible. Here's two refinements. Regarding your need to manually set the first lead ruler. The modifications below will apply arbitrary ruler settings to the current paragraph. The script you sent me didn't have pagebreak 'CONTINUED's but I've added a feature I think deals with it. The requires you to use PW's EXTRACT command to examine the line in some detail. This could slow you down. Note the use of Arexx labels to create subroutines. This makes the script easier to follow. — Art */ Options results ADDRESS 'ProWrite' * not necessary but let's you start this from CLI for tests */ * Lead Head margin and indent settings (decipoints) */ LeadRuler = "1080, 810, 180, TabRight, 5580" RequestText 'Number to start with?' /* Request shot number to start with */ If rc ~= -0 Then Exit number = result + 1 Find "*" /* Search for the first lead line marker */ If rc ~= 0 Then Exit /* If lead line is not found, exit */ CALL MakeRuler(LeadRuler) /* see procedure below */ RetainFormat /* remember what we've created */ CursorUp /* back up some */ DO Forever Find "*" /* Search for lead line marker */ If rc ~= 0 Then Exit /* If lead line is not found, exit */ IF (pos('CONTINUE',GetSentence()) > 0) THEN /* is a page break */ number = number -1 /* next two lines required cuz 'GetSentence' messes with selection */ CursorUp /* back up some */ Find "*" /* find same symbol again */ Type number /* Type first shot number */ ApplyFormat ASCII 9 /* Tab in one stop to fix lead line */ CursorDown CursorLeft ASCII 9 Type number newNumber = number + 1 If number < newNumber Then number = newNumber END [ MORE ]