home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Bonus / WSTAR2 / DISK4 / DBLSPACE.WM_ / DBLSPACE.bin
Encoding:
Text File  |  1994-02-28  |  11.2 KB  |  144 lines

  1. REM Description:  Change paragraph(s) to double spacing
  2. REM Filename: dblspace.wmc
  3. REM Created by: Steve Wylie - 11/08/93
  4.  
  5. REM Can't run if no document open
  6. IF GetDocName$() = "" THEN
  7.     MESSAGE "Please create a new document or open an existing document first."
  8.     STOP
  9. ENDIF
  10.  
  11. REM Can't run in a graphic or table frame
  12. frameType% = GetFrameType()
  13. IF frameType% <> 0 THEN
  14.     Message "The current frame must be a text frame."
  15.     STOP
  16. ENDIF
  17.  
  18. REM Can't run in frame mode
  19. ret% = ViewEditMode(1)
  20. IF ret% = 2 THEN
  21.     ret% = ViewEditMode(2)
  22.     BEEP
  23.     STOP
  24. ENDIF
  25.  
  26. REM Changed local% to 0 if you want the change to apply globally to the paragraph style.
  27. local% = 1
  28.  
  29. REM Save the beginning and end of the selection
  30. yes% = GetTextOffset(strt%, end%)
  31. IF strt% = 0 THEN strt% = 4
  32.  
  33. REM Freeze the screen so that the activity isn't visible
  34. freeze% = ViewFreezeScreen(1)
  35.  
  36. REM Count the number of paragraphs
  37. EditGotoOffset strt%, 
  38. DO
  39.     ret% = GetTextOffset(savestart%, saveend%)
  40.     ParaDown 1, 
  41.     ret% = GetTextOffset(start2%, end2%)
  42.     numParagraphs% = numParagraphs% + 1
  43. LOOP UNTIL end2% >= end% OR end2% = saveend%
  44.  
  45. REM Go to the beginning of the selection
  46. EditGotoOffset strt%, 0
  47.  
  48. FOR i% = 1 TO numParagraphs%
  49.     REM Get the style information
  50.     GetStyleFont typeFace$, size%, lineHeight%, bold%, italic%, underline%, strikeout%, hidden%, placeUnderline%, strikeoutChar$
  51.     
  52.     REM Set the line height to 240% of the font size.  Change the number from 240
  53.     REM to a different value to change the default line height.
  54.     lineHeight% = (size% * 240) / 100
  55.  
  56.     REM Redefine the style with the new line height.
  57.     DefineStyle , local%
  58.     DefineStyleFont , , lineHeight%, , , , , , , 
  59.     EndDefineStyle 1
  60.  
  61.     REM Go to the next paragraph.
  62.     ParaDown 1,0
  63.     IF GetNextChar$(1) <> "<Cr>" THEN CharRight 1,0,
  64. NEXT i%
  65.  
  66. REM Restore the selection
  67. EditGotoOffset strt%, 0
  68. if yes%=1 then EditGotoOffset end%, 1
  69.  
  70. REM Restore the screen
  71. freeze% = ViewFreezeScreen(freeze%)
  72.  
  73. 
  74. *****  WARNING *****
  75. This is a WSWin macro file.
  76. Subsequent data is binary information and should not be modified.
  77. # MF # 1.0None762570349╠ⁿΣâ"
  78. 8àêë
  79. âêçèâ
  80. 8ìî
  81. ïìÄÅ
  82. 8    
  83. 8    
  84. æÉÆ
  85. 8
  86.  âÉöâ
  87. 8
  88. ûò
  89. ïûùÿ
  90. 8
  91. 8¢Ç
  92. ܢ֣
  93. 8
  94. âÖ₧ƒâ
  95. 8á₧
  96. ÜáÖí
  97. 8
  98. 8
  99. 8óÇ
  100. 8 ñѪúº
  101. 8
  102. âÑ⌐â
  103. 8 Ѭ
  104. 8 #¡Ç
  105. ¼¡½«
  106. 8#&
  107. »Ñ▒
  108. 8&( ñ┤╡Ö╢
  109. 8()╕Ç
  110. ╖╕╣
  111. 8)* ñ║╗Ö╝
  112. 8*+╜╜Ç
  113. 8+,
  114. ╛╗╡┐ª╛â╗┐▓â
  115. 8,/└
  116. »Ñ└┴
  117. 8/1├╜┬Ç─┬┬Çâ┬├╟â
  118. 813╚╔╩╦╠═╬╧╨╤╥╙
  119. 837╓╩╘╫╓╦╫╒
  120. 87:
  121. ╪ó┘
  122. 8:;┌╦█
  123. 8;<▌Ç▄▌▐
  124. 8<?▀Çα
  125. ╖▀αß
  126. 8??$σÇ
  127. Γσµτ âµΣΦâ
  128. 8?$@ΩÇδ ΘΩδ∞
  129. 8@A╞
  130. 8ADφ
  131. »Ñφε
  132. 8DD
  133. âúÇ≡â
  134. 8DE±Ç
  135. »ª±≥
  136. 8EH
  137. ¼½½≤÷~ƒö⌡⌡⌡⌡⌡⌡⌡⌡⌡⌡⌡⌡⌡⌡⌡⌡⌡⌡⌡⌡.╖O.╖O.╖O .╖O-.╖O5.╖O;.╖OA.╖ON.╖O^.╖O    l.╖O
  138. z.╖O ê.╖O û.╖O
  139. ñ.╖O▓.╖O╢.╖O╣.╖O╜.╖O└.╖O┬.╖O─.╖O╞.╖O╔.╖O╠.╖O╧.╖O╥.╖O╘.╖O╓.╖O┌.╖O▄.╖O▐.╖Oα.╖O Γ.╖O!Σ.╖O"Θ.╖O#∞.╖O$≡.╖O%⌡.╖O&ⁿ.╖O'/╖O(
  140. /╖O)/╖O*/╖O+/╖O,"/╖O-(/╖O.-/╖O/3/╖O06/╖O1;/╖O2@/╖O3B/╖O4E/╖O5J/╖O6N/╖O7T/╖O8Y/╖O9`/╖O:g/╖O;l/╖O<o/╖O=w/╖O>y/╖O?{/╖O@/╖OAê/╖OBî/╖OCÅ/╖ODù/╖OE₧/╖OFú/╖OG¡/╖OH┤/╖OI╣/╖OJ╜/╖OK┬/╖OL╟/╖OM═/╖ON╤/╖OO╒/╖OP▄/╖OQπ/╖ORΩ/╖OS≡/╖OT≈/╖OU0╖OV
  141. 0╖OW0╖OX$0╖OY10╖OZ:0╖O[G0╖O\P0╖O]X0╖O^`0╖O_h0╖O`q0╖Oav0╖Ob{0╖OcÇ0╖Odç0╖OeÄ0╖Ofö0╖Og¢0╖Oh¥0╖Oió0╖Oj¿0╖Ok«0╖Ol╡0╖Om╛0╖On╟0╖Oo╦0╖Op╙0╖Oq╫0╖Or▄0╖OsΓ0╖OtΦ0╖Ouε0╖Ov⌠0╖Ow∙0╖Ox■0╖Oy1╖Oz1╖O{1╖O|1╖O}P  P+P+    PPP  P P
  142. ë,P  H1P+      4P      9P     >P  HCPçKP+      ÄP      ôP  ÿP     ¥P          ¿Pç╡P     ║P  ÿ┐P  ÿ─P+      εP      ≤P  °P     ■P          PçP  P     P  ⁿ!P+  #P  ⁿ(P  .P     4P          ;P          @PçNP          TP          YP     _P  JdP  JiP+  kP          sPçHäP  èP     ÉPAEƒP  ÑP     ½P  x░P  °╢P          ┴P          ╩P     ╨PA9┘P  ▀P     σP          φP          ≤P     ∙P          P  P  P  P      P          #P  (P  4.P  B4P  ,:P  N@PAMP
  143.           WP          ]P          iP          oP          wP          éP          ìP          òP          ÑP
  144.           ┤P      ║P+  ≡╛P+  d┬P  ╚P  ╬PA)┌P     αPA,≡P     ÷PA7P   P     P  P  P     #P
  145. ë<0P  @6P+      =P  CP      IP     OP  @UPA>_P  eP  kP     qP  wP     }P  ÜâP  ÜëP  ÅP     òP     ¢P¥P????01CANCELERRORNUM[T1]
  146. GETDOCNAME$[L1]""[T2][T3][L2]MESSAGE"Please create a new document or open an existing document first."[T4][T5][T6]FRAMETYPE%GETFRAMETYPE[T7][L3][L4]"The current frame must be a text frame."[T8][T9][T10]RET%VIEWEDITMODE[T11][T12][L5]2[L6][T13][T14]LOCAL%YES%GETTEXTOFFSETSTRT%END%[T15][L7][L8]4FREEZE%VIEWFREEZESCREEN[T16][T17]EDITGOTOOFFSET[T18][T19][L9][L10]SAVESTART%SAVEEND%[T20]PARADOWN[T21][T22]START2%END2%[T23]NUMPARAGRAPHS%[T24][T25][T26][T27]I%[F1][L11][L12][L13][L14]GETSTYLEFONTTYPEFACE$SIZE%LINEHEIGHT%BOLD%ITALIC%UNDERLINE%STRIKEOUT%HIDDEN%PLACEUNDERLINE%STRIKEOUTCHAR$[T28]240100[T29][T30]DEFINESTYLE[T31]DEFINESTYLEFONT[T32]ENDDEFINESTYLE[T33][T34][T35][T36][T37]GETNEXTCHAR$[L15]"<Cr>"[T38][T39][T40][L16]CHARRIGHT[T41][T42][T43][T44][T45][L17][L18][T46][T47][T48]
  147. 
  148. 
  149.