Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Just learning corelscript. please help.

15 views
Skip to first unread message

scotnery

unread,
Apr 13, 1998, 3:00:00 AM4/13/98
to

Please email me at:sn...@ix.netcom.com
two questions:
1.)Are there any good photopaint corelScript arcives
2.)I had an error in this script for "fileopen" command line 50.
'------------------------This script creates an animated gif file from a
number of gifs
'------that are all in the same folder listed as
('a1.gif','a2.gif','a3.gif',etc...)
#include "ScpConst.csi"
BEGIN DIALOG OBJECT Settings 200, 120, "Corel SCRIPT Frame Animate", SUB
SettingsSub
TEXT 2,5,170,30,.Message1,"Make sure the gif files are saved in
correct format! example: a4.gif"
TEXT 5, 26, 120, 10, .Foldername, ""
PUSHBUTTON 135, 25, 60, 10, .Folderfind, "Folder"
TEXT 5,46,65,10, .Message2,"Number of Frames:"
TEXTBOX 70,45,15,10, .Framenumber

GROUPBOX 5,61,190,39, .Message3,"Animation Order:"
OPTIONGROUP .taper
OPTIONBUTTON 8,72,50,10, .notape, "1-2-3-4-5"
OPTIONBUTTON 8,85,50,10, .tape, "1-2-3-2-1"
PUSHBUTTON 70,106,38,10, .help,"Huh?"
PUSHBUTTON 110,106,38,10, .ok, "Animate"
PUSHBUTTON 150,106,38,10, .cancel,"Cancel"
END DIALOG

Settings.SetStyle STYLE_MINIMZERESIZE
Settings.Foldername.SetStyle STYLE_SUNKEN

DIALOG Settings

SUB SettingsSub(BYVAL ControlID%, BYVAL Event%)
DIM fila AS STRING
DIM Foldername AS STRING
DIM fil AS STRING
DIM DialogWidth AS INTEGER
DIM DialogHeight AS INTEGER
DIM i AS INTEGER
DIM filenum AS INTEGER

WITH Settings
IF Event% = EVENT_MOUSE_CLICK THEN
'Only Browse button
IF (ControlID%=Settings.Folderfind.GetId())THEN
Foldername$ = GETFOLDER("c:\corel")
IF Foldername$ <> "" THEN
SETCURRFOLDER Foldername$
.Foldername.SetText GETCURRFOLDER()
END IF
END IF
IF (ControlID%=Settings.help.GetId()) THEN
END IF
IF (ControlID%=Settings.ok.GetId()) THEN
filenum=VAL(Settings.Framenumber.Gettext())
IF
((Settings.Foldername.Gettext())<>"")AND((Settings.Framenumber.Gettext())<>0)
THEN
WITHOBJECT "CorelPhotoPaint.automation.7"
.FileOpen fila$,0,0,0,0,0,1,1
.MovieCreate
END WITHOBJECT
FOR i=1 TO filenum STEP 1
fil$=CHR(i)
fil$="a"+i
WITHOBJECT "CorelPhotoPaint.automation.7"
.MovieInsertFile fil$,0,0,0,0,0,i,0
END WITHOBJECT
NEXT
END IF
END IF
IF (ControlID%=Settings.cancel.GetId()) THEN
STOP
END IF
ENDIF
END WITH
END SUB

Colin MacNeill

unread,
Apr 14, 1998, 3:00:00 AM4/14/98
to

On Mon, 13 Apr 1998 13:08:57 -0400, scotnery <sn...@ix.netcom.com>
wrote:

>Please email me at:sn...@ix.netcom.com
>two questions:
>1.)Are there any good photopaint corelScript arcives

Try

http://tfts.i-us.com

Its the only site on the 'net specifically devoted to CorelSCRIPT and
scripting.

>2.)I had an error in this script for "fileopen" command line 50.

Hmm. The problem isn't the syntax of the .FileOpen line, it's a
parsing problem with that complex Dynamic Dialog subroutine. I'd have
to creep through the code to nail the problem; you may want to take a
look at the AVI Maker script (June 1997) which does pretty much the
same thing yours does.

Hope this helps.
----
Colin MacNeill
Contributing Editor for Scripting, The CorelDRAW Journal
http://tfts.i-us.com

0 new messages