home *** CD-ROM | disk | FTP | other *** search
- /*
- Control Tower Arexx Script
- Written By J.L. White
- (C)1995 Merlin's Software
- Lines=5
- 01=Lightning Bolts
- 02=
- 03=This script loads each image of the File List Window
- 04=into ImageFX and adds simulated lightning bolts over
- 05=a series of frames or a Flyer clip.
-
- */
-
- options results
-
- arg FrameNum TotalNum
- address "IMAGEFX.1"
- ScreenToFront
- if FrameNum = 0 then do
- FrameNum = 1
- call PickLine()
- call open TempFile,"RAM:CT-IFLB",W
- call writeln TempFile,Answer
- call close TempFile
- end
- else do
- call open TempFile,"RAM:CT-IFLB",R
- line = readln(TempFile)
- parse var line X1 Y1 X2 Y2
- call close TempFile
- end
-
- call GetXYCords
- d = (42 * FrameNum % TotalNum)
- GetMain
- PARSE VAR result name wid ht .
-
- outerglow = ((wid + ht) % 2) % 50
- IF outerglow < 1 THEN outerglow = 1
-
- Hook Lightning X1 Y1 0 X Y 255 OGlowRad outerglow Deviation d Probability 36 Seed 3711
-
- exit
-
-
- GetXYCords:
- TotalKey = 1
- NumKey = (TotalNum/TotalKey)
- FirstNum = ((NumKey - (NumKey-(FrameNum-1)))%NumKey)+1
- SecNum = FirstNum+1
- if FirstNum = TotalKey then do
- NumKey = NumKey - 1
- NewNum = (((FrameNum-((FirstNum-1)*NumKey)))-(TotalKey-1))
- end
- else
- NewNum = ((FrameNum-((FirstNum-1)*NumKey)))
- if X2 < X1 then do
- DiffX = -((X1-X2)/(NumKey))
- end
- else do
- DiffX = ((X2-X1)/(NumKey))
- end
- if Y2 < Y1 then do
- DiffY = -((Y1-Y2)/(NumKey))
- end
- else do
- DiffY = ((Y2-Y1)/(NumKey))
- end
- X = (X1 + (DiffX*NewNum))-DiffX
- Y = (Y1 + (DiffY*NewNum))-DiffY
- X = X % 1
- Y = Y % 1
- return
-
- PickLine:
- Menu ToolBox
- RequestNotify "Draw Line From Point A To Point B For Lightning!"
- DrawTool Line
- HidePanel
- Undo On
- WaitFor SELECTDOWN
- parse var result X1 Y1
- WaitFor SELECTUP
- parse var result X2 Y2
- Undo
- ShowPanel
- Undo Off
- X1 = strip(X1)
- Y1 = strip(Y1)
- X2 = strip(X2)
- Y2 = strip(Y2)
- Answer = X1" "Y1" "X2" "Y2
- RequestResponse "Is The Line You Have Drawn Correct?"
- if rc ~= 0 then call PickLine()
-
- return
-