home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
draftit.zip
/
Example.MAC
< prev
next >
Wrap
Text File
|
1996-07-02
|
1KB
|
46 lines
/*Example Macro for DraftIT, needs Rexxutil to call
Syssleep (to slow it down for demonstration purposes)*/
CALL RxFuncAdd 'SysLoadFuncs','Rexxutil','SysLoadFuncs'
CALL SysLoadFuncs
rc = dt_yesno('Do you want to open a new window?')
if rc = YES then call dt_new
else do
call dt_say "I'm going to open one anyway!"
call dt_new
end
call dt_insert 'First line of text.'
call dt_say 'Now we are going to manipulate this line!'
call dt_setcursor 0
call dt_mark 5
call dt_cut
rc = dt_pull("What's your name?")
name = rc
if rc = NOANSWER then do
call dt_say 'You gave no answer. I will call you Jim!'
name = 'Jim'
end
if rc = '' then do
call dt_say 'You gave no answer. I will call you Jim!'
name = 'Jim'
end
call dt_insert name"'s"
call Syssleep 1
count = length(name)+3
call dt_say 'And a very poetic line it is!'
call dt_setcursor count
call dt_insert 'very poetic '
rc = dt_getlength()
call dt_setcursor rc
call dt_insert (d2c(13)||d2c(10))
call dt_insert (d2c(13)||d2c(10))
call dt_insert ' By 'name||', 'Date()
call Syssleep 2
call dt_say 'And now I will show you the macro script!'
call dt_open directory()'\Example.MAC'