--Baseline Shift Script, v2.0

--Perry Whittle

--pwhittle@earthlink.net

--September 1999

  

--This script requires that a range of text be selected, either in

--layout or story mode. The script then asks the user some questions

--via some dialog boxes, and applies the baseline shift the user 

--has requested.

  

--Users who want to change the default settings should look for three

--blank commented lines in a row and read the instructions following 

--those lines.  There are two places for customization.

  

--Version 2.0 does not change the function of this script or its user

--interface. The only changes are to the scripting which is now more 

--intelligent and more efficient.

  

--This script has been tested on PageMaker 6.52 on Windows95 and Macintosh OS 7.5.3.

  

--check computer platform getplatform >gt;>gt; platform --check that text is selected. If not, create error message. getpmstate >gt;>gt; pMState switch pMState caseof 3 goto startLabel caseof 8 goto startLabel default goto sorryNoTextLabel endswitch label startLabel -- Start dialog if platform = MACINTOSH -- set values for Mac dialog box diaBeg1 = -188 diaBeg2 = -62 diaBeg3 = 188 diaBeg4 = 62 pshButA1 = 266 pshButA2 = 86 pshButA3 = 368 pshButA4 = 110 pshButB1 = 6 pshButB2 = 86 pshButB3 = 100 pshButB4 = 110 pshButC1 = 136 pshButC2 = 86 pshButC3 = 258 pshButC4 = 110 txtStatA1 = 10 txtStatA2 = 15 txtStatA3 = 360 txtStatA4 = 80 else -- set values for PC dialog box diaBeg1 = -94 diaBeg2 = -31 diaBeg3 = 94 diaBeg4 = 31 pshButA1 = 133 pshButA2 = 43 pshButA3 = 184 pshButA4 = 59 pshButB1 = 3 pshButB2 = 43 pshButB3 = 50 pshButB4 = 59 pshButC1 = 68 pshButC2 = 43 pshButC3 = 129 pshButC4 = 59 txtStatA1 = 3 txtStatA2 = 3 txtStatA3 = 184 txtStatA4 = 40 endif

-- Start dialog box : Choose First&Last or Entire Selection dialogbegin diaBeg1, diaBeg2, diaBeg3, diaBeg4,Baseline Shift Pushbutton pshButA1,pshButA2,pshButA3,pshButA4,"First/Last" Static txtStatA1,txtStatA2,txtStatA3,txtStatA4,"Apply baseline shift to first and last characters of selection? (First and last is useful for telephone area codes and capital letters in parenthesis.)" Pushbutton pshButB1,pshButB2,pshButB3,pshButB4,"Cancel" Pushbutton pshButC1,pshButC2,pshButC3,pshButC4, "Entire Selection" dialogend >gt;>gt; dialogStart, ..., ..., ... -- check button clicked and store User's choice in variable or cancel switch dialogStart caseof "First/Last" shiftChars = "Shift First & Last of Selection" goto MoreChoicesLabel caseof "Entire Selection" shiftChars = "Shift Entire Selection" goto MoreChoicesLabel default goto cancelLabel endswitch

label MoreChoicesLabel if platform = MACINTOSH -- set values for Mac dialog box -- diaBeg, pshButA, pshButB values as before -- txtStatA revised, the other values are new