home *** CD-ROM | disk | FTP | other *** search
- /*
- Control Tower Arexx Script
- Written By J.L. White
- (C)1995 Merlin's Software
- Lines=8
- 01=Build Project
- 02=
- 03=This script takes the individual files
- 04=in your list and builds a flyer project
- 05=from them. It also has the option to add
- 06=your choice of transition in between the
- 07=files and checks to make sure the crouton
- 08=in front of it is of the correct type.
- */
-
- parse arg InFile FileNum TotalNum FrameRepeat WhichScript TotalScript Times Select
- signal on error
- signal on syntax
- options results
- TOASTERLIB="ToasterARexx.port"
- call remlib(TOASTERLIB)
- call remlib('PROJECT_REXX_PORT')
- call addlib('PROJECT_REXX_PORT' , 0)
- call addlib(TOASTERLIB,0)
-
-
- if Times > 1 then do
- Address CT_1 OK_TEXT " OK "
- Address CT_1 FYINT "This Routine Does Not Work\With Multiple Script Lists"
- Address CT_1 Abort
- Address CT_1 Quit
- exit
- end
- InFile = Translate(InFile," ","ยค")
-
- if FileNum = 1 & WhichScript = 1 then do
- call set_view(0)
- Num = YesOrNo("Do You Want To Add To Existing Project Or Create New One?","ADD TO EXISTING","CREATE NEW")
- if Num = 1 then do
- Address CT_1 ClickMouse "110|069"
- Address CT_1 ClickMouse "160|255"
- Address CT_1 ClickMouse "105|255"
- Address CT_1 ClickMouse "419|263"
- Address CT_1 Update
- end
- OutFile = GetFile("Select Path & Name For Project!","Toaster:Projects")
- Name = GetFileName(OutFile)
- if Name = "" then do
- Title = "You Must Enter A Valid Name For Frames!"
- Address CT_1 OK_TEXT " OK "
- Address CT_1 FYINT Title
- Address CT_1 Abort
- Address CT_1 Quit
- exit
- end
- Fade = YesOrNo("Want To Add Transition Between Files?","PLEASE DO","NO THANKS")
- if Fade = 2 then do
- FadeFile = GetFile("Select Effect For Transition!","Toaster:Effects")
- Name = GetFileName(FadeFile)
- if Name = "" then do
- Address CT_1 OK_TEXT " OK "
- Title = "You Must Enter A Valid Name For Effect!"
- Address CT_1 FYINT Title
- Address CT_1 Abort
- Address CT_1 Quit
- exit
- end
- end
- else FadeFile = ""
- call open TempFile,"RAM:CT-MP",W
- call writeln TempFile,OutFile
- call writeln TempFile,Fade
- call writeln TempFile,FadeFile
- call close TempFile
- end
- else do
- call open TempFile,"RAM:CT-MP",R
- line = readln(TempFile)
- parse var line OutFile
- line = readln(TempFile)
- parse var line Fade
- line = readln(TempFile)
- parse var line FadeFile
- call close TempFile
- end
-
- InFile = strip(InFile)
- OutFile = strip(OutFile)
-
-
- call Routine
-
- call remlib('PROJECT_REXX_PORT')
- call remlib('ToasterARexx.port')
- exit
-
-
- GetFileName: procedure
- ARG CompleteName
- c = lastpos("/",CompleteName)
- if c = 0 then c = lastpos(":",CompleteName)
- return substr(CompleteName, c + 1)
-
-
- GetPathName: procedure
- ARG CompleteName
- c = lastpos(":",CompleteName)
- if c = 0 then c = lastpos(":",CompleteName)
- return left(CompleteName,c)
-
- GetFile:
- parse Arg Title, Path
- Address CT_1 SetString Path
- Address CT_1 GetFileNameNT Title
- return result
-
-
- YesOrNo: procedure
- parse Arg Title,Yes,No
- Address CT_1 OK_TEXT Yes
- Address CT_1 CANCEL_TEXT No
- Address CT_1 AskYesNoNT Title
- if result = "OK" then YesNo = 2
- else YesNo = 1
- Address CT_1 OK_TEXT " OK "
- return YesNo
-
- Routine:
-
- call CroutonLoad(InFile)
- if Fade = 2 & FileNum ~= TotalNum then do
- if CheckType() = 1 then do
- call CroutonLoad(FadeFile)
- end
- end
- if FileNum = TotalNum then do
- call ProjectSave(OutFile)
- end
- Address CT_1 Quit
- return
-
-
-
- CheckType: procedure
- call CroutonPick("LAST")
- Num = CroutonSpot()-1
- Add = 1
- Row = 1
- Column = 1
- do Loop = 0 to Num
- Add = Add + 1
- if Add = 9 then do
- Column = 0
- Row = Row + 1
- end
- Column = Column + 1
- end
- call croutontype(Row,Column)
- if result = "CLIP" | result = "STIL" | result = "FRAM" then Type = 1
- else Type = 0
- return Type
-
- syntax:
- error:
- Address CT_1 OK_TEXT " OK "
- Title = "An Error Was Found With This Script On Line #"SIGL"!"
- if SIGL ~= 137 then do
- Address CT_1 FYINT Title
- Address CT_1 Abort
- end
- Address CT_1 Quit
- call croutonpick()
- exit
-
-