home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / EDG-CT1.DMS / in.adf / CT.run / Macros / Record_Overlay.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-10-13  |  3.4 KB  |  158 lines

  1. /*
  2.                         Control Tower Arexx Script
  3.                            Written By J.L. White
  4.                          (C)1995 Merlin's Software
  5. */
  6.  
  7. signal on error
  8. signal on syntax
  9. Options Results
  10.  
  11. Main:
  12. call OpenStuff()
  13. call Docs()
  14. call Routine()
  15. call CloseStuff()
  16. exit
  17. return
  18.  
  19. GetFile:
  20.     parse Arg Title, Path
  21.     Address FLY_1 SetString Path
  22.     Address FLY_1 GetFileNameNT Title
  23. return result
  24.  
  25.  
  26. GetPath:
  27.     parse Arg Title, Path
  28.     Address FLY_1 SetString Path
  29.     Address FLY_1 GetPathNameNT Title
  30. return result
  31.  
  32. GetText:
  33.     parse Arg Title, Text
  34.     Address FLY_1 SetString Text
  35.     Address FLY_1 GetStringNT Title
  36. return result
  37.  
  38.  
  39. OpenStuff:
  40.     address command "run CT:FLY"
  41.     do while (POS('FLY_1',SHOW('Ports')) = 0)
  42.         address command "wait 1"
  43.         end
  44.     TOASTERLIB="ToasterARexx.port"
  45.     call remlib('ToasterARexx.port')
  46.     call remlib('PROJECT_REXX_PORT')
  47.     call addlib('PROJECT_REXX_PORT' , 0)
  48.     call addlib(TOASTERLIB,0)
  49. return
  50.  
  51. CloseStuff:
  52.     Address FLY_1 Quit
  53.     call remlib('ToasterARexx.port')
  54.     call remlib('PROJECT_REXX_PORT')
  55.     exit
  56. return
  57.  
  58. YesOrNo: procedure
  59.     parse Arg Title,Yes,No
  60.     Address FLY_1 OK_TEXT Yes
  61.     Address FLY_1 CANCEL_TEXT No
  62.     Address FLY_1 AskYesNoNT Title
  63.     if result = "OK" then YesNo = 1
  64.     else YesNo = 0
  65. return YesNo
  66.  
  67. Info: 
  68.     parse Arg Title,Yes
  69.     Address FLY_1 OK_TEXT Yes
  70.     Address FLY_1 FYINT Title
  71. return
  72.  
  73. FindDrive:
  74.     address command "C:Info >RAM:FLY-List"
  75.     call open TempFile,"RAM:FLY-List",R
  76.     do until eof(TempFile)
  77.         line = readln(TempFile)
  78.         parse var line Drive" "Rest
  79.         if Drive = "FA0:" then 
  80.             Volume = word(Rest,7)":"
  81.     end
  82.     call close TempFile
  83.     address command "Delete >NIL: RAM:FLY-List"
  84. return Volume
  85.  
  86. GetFileName: procedure  
  87.    ARG CompleteName
  88.    c = lastpos("/",CompleteName)
  89.    if c = 0 then c = lastpos(":",CompleteName)
  90.    return substr(CompleteName, c + 1)
  91.  
  92.  
  93. GetPathName: procedure  
  94.    ARG CompleteName
  95.    c = lastpos(":",CompleteName)
  96.    if c = 0 then c = lastpos(":",CompleteName)
  97.    return left(CompleteName,c)
  98.  
  99. Docs:
  100. Answer = YesOrNo(" Do You Need Instructions?"," YES "," NO ")
  101. if Answer = 0 then return 
  102. Text = "This Macro uses your current project croutons\
  103. to record CG pages, framstores, etc. over the\
  104. top of live video as a clip. Simply add what\
  105. croutons you wish to use and tell it to start\
  106. recording. You can pull down the TBAR, click\
  107. on CG croutons, etc. and all this then gets\
  108. recorded as a clip."
  109. Address FLY_1 OK_TEXT " Continue! "
  110. Address FLY_1 FYINT Text
  111.  
  112. return
  113.  
  114.  
  115. Routine:
  116.     Answer = YesOrNo("Are You Sure You Want To Do This?"," YES "," NO ")
  117.     if Answer = 0 then return 
  118.     Address FLY_1 GetCompressionNT
  119.     Compression = result
  120.     DriveName = FindDrive()
  121.     FileName = GetFile("Select Path & Name For Flyer Clip!   ",DriveName)
  122.         call Switcher( DIIM )
  123.     call Set_View(2)
  124.         call Switcher( ENIM )
  125.         call Switcher( M001 )
  126.  
  127.     Address FLY_1 WaitSW "Click Here To Start Recording Clip"
  128.     call RECORDCLIP(FileName,0,6,Compression)
  129.     Pause = 1
  130.     do while Pause > 0
  131.         call RecordPause(0)
  132.         Address FLY_1 WaitSW "Click Here To Stop Recording Clip"
  133.         call RecordPause(1)
  134.         Pause = YesOrNo("Click OK To Continue Recording\  Or DONE To Stop Recording?"," OK "," DONE ")
  135.         end
  136. /*
  137.     call RecordPause(0)
  138.  
  139.     Address FLY_1 WaitSW "Click Here To Stop Recording Clip"
  140.     call RecordPause(1)
  141. */
  142.     call RecordStop()
  143.     call MakeIcon(FileName)
  144.         call Switcher( DIIM )
  145.     call Set_View(0)
  146.         call Switcher( ENIM )
  147.  
  148. return
  149.  
  150.  
  151. syntax:
  152. error:
  153.     Address FLY_1 OK_TEXT " OK "
  154.     Title = "An Error Was Found With This Macro On Line #"SIGL"!"
  155.     Address FLY_1 FYINT Title
  156.     Address FLY_1 Quit
  157. exit
  158.