home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 61
/
af061a.adf
/
Macros
/
MakePlayerFile.clssa
< prev
next >
Wrap
Text File
|
1993-10-11
|
5KB
|
169 lines
/***********************************************************************
GADGET: "'Make Player'" "7" AUTO TYP: "?"
$DAT >>MakePlayerFile.clssa<< 04.10.1993 (C) ProDAD Holger Burkarth
************************************************************************/
Options Results
Address clariSSA
SSAPlay="c:SSAPlay"
FailAt 10
AltFail=RESULT
DO FOREVER
Anims=""
AnimDatei=""
IF GetVersion()="P" THEN DO
GetAnimInfo MASTER MULTI
IF RESULT~="" THEN DO
PARSE VAR RESULT . "NAME" '"' AnimDatei '"' .
PARSE VAR RESULT "NAME" '"'AnimDatei'"' "FRAMES" frames MultiMode
IF MultiMode~="MULTI" THEN AnimDatei=""
END
END
IF AnimDatei="" THEN DO
GetAnimInfo MASTER
PARSE VAR RESULT "'" AnimDatei "'" .
END
IF RESULT~="" THEN DO
MSRequester "TITLE '*** Make Player ***'''",
"'Create a batch-file for the SSAPlayer.'",
"PTEXT '** Info **'",
"'Save current data as PlayeFile.'"
IF RC~=0 THEN LEAVE
Art=RESULT
IF Art=1 THEN DO
MSRequester "TITLE '*** Make Player ***''Info'",
"'Create a batch-file for the Player.'",
"'First choose a file name to save the data'",
"'as. The current settings will be retrained'",
"'when it is played back unless changes have'",
"'been made.'",
"'Start the batch-file with the Shell (CLI)'",
"'as follows:'",
"'-------------------------'",
"' execute [Filename] (hit Return key)'",
"'-------------------------'",
"'Filename => Name of the batch file'",
"PTEXT 'Ok'"
END
ELSE IF Art=2 THEN DO
FileSelect 'TITLE "Choose batch-file" PTEXT "Save"'
IF RC~=0 THEN LEAVE
Datei=RESULT
GetPlayMode
PARSE VAR RESULT . "MOUSESTART" Maus . "SLOWPLAY" slow "DFPMode" dfp .
Line=" -SRN "
IF Maus="ON" THEN Line=Line "-M"
ELSE Line=Line "-m"
IF slow="ON" THEN Line=Line "-SP"
ELSE Line=Line "-sp"
IF dfp="ON" THEN Line=Line "-DFP"
ELSE Line=Line "-dfp"
GetPref
PARSE VAR RESULT . "USE24BB" BB24 .
IF BB24="ON" THEN Line=Line "-24BB"
ELSE Line=Line "-24bb"
Append=0
DateiArt=0;
IF Exists(Datei) THEN DO
MSRequester "TITLE 'File already exists.''Append new data to existing file?'",
"PTEXT 'Append data to existing file'",
"'Create new file'",
"'Create new file (with Workbench icon)'"
IF RC~=0 THEN LEAVE
if RESULT=1 THEN Append=1
DateiArt=RESULT
END
ELSE DO
MSRequester "TITLE 'Create player-batch-file'",
"PTEXT 'Create file'",
"'Create file (with Workbench icon)'"
IF RC~=0 THEN LEAVE
DateiArt=RESULT+1
END
INTRequest "'Enter number of playback repeats.''1 => playback once'" 1
IF RC~=0 THEN LEAVE
IF RESULT>1 THEN Line=Line "-l"RESULT
INTRequest "'Enter wait time between loading''and playback. (1/50)sec.''0 == immediately''50 == 1 second'" 0
IF RC~=0 THEN LEAVE
IF RESULT>0 THEN Line=Line "-d"RESULT
Line=Line '"'AnimDatei'"'
IF Append=1 THEN DO
flag='Append'
ADDRESS COMMAND "Copy " '"'Datei'" t:MPF'
IF Open(rr,"T:MPF","Read") THEN DO
IF Open(ww,Datei,"Write") THEN DO
DO FOREVER
Zeile=ReadLn(rr)
IF Zeile="" THEN LEAVE
IF Index(Zeile,"-srn")>0 THEN DO
Zeile=Left(Zeile,Index(Zeile,"-srn")-1)
END
call WriteLn(ww,Zeile)
END
call Close(ww)
END
call Close(rr)
END
ADDRESS COMMAND "Delete t:MPF"
END
ELSE flag='Write'
IF Open(bd,Datei,flag) THEN DO
IF DateiArt=3 THEN DO
ADDRESS COMMAND "Copy Batch-Icon "'"'Datei".info"'"'
END
IF DateiArt~=1 THEN DO
call Writeln(bd,"; clariSSA / SSA /Batch-File")
call Writeln(bd,"; SSA => Super Smooth Animation")
call Writeln(bd,"; Copyright 1991-1993 by proDAD")
call Writeln(bd,"; Start the batch-file with execute <Filename>")
IF DateiArt=3 THEN DO
call Writeln(bd,"; Doubleklick on the Icon start the script.")
call Writeln(bd,"; (Required: OS2.x and IconX)")
END
call Writeln(bd,";")
call Writeln(bd,";")
call Writeln(bd,"stack 6000")
END
call Writech(bd,SSAPlay)
call Writeln(bd,Line" -srn")
call Close(bd)
END
ELSE Message "'Error: Cannot open the file.'"
END
END; ELSE Message '"There is no MASTER-Anim"'
LEAVE
END
FailAt AltFail
exit
GetVersion: procedure
DO
Information
PARSE VAR RESULT . "VERSION:" cl .
RETURN (cl)
END