home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
xbase
/
library
/
fox
/
workgrp
/
sp_task.prg
< prev
next >
Wrap
Text File
|
1993-09-02
|
2KB
|
76 lines
* Sample Schedule Plus code
* load the FLL
SET LIBRARY TO foxmapi.fll
* start a mapi session
hmapisession = 0
retval=mplogon(0, "", "", 3, 0, @hmapisession)
* create cursors for recipients and tasks
=mpcursor("MapiRecip", "")
=mpcursor("SPlusRest", "")
* clear reciepient cursor and set initial values
SELECT mapirecip
SET SAFETY OFF
ZAP
SET SAFETY ON
APPEND BLANK
REPLACE reserved WITH 0
REPLACE recipclass WITH 0
REPLACE name WITH ""
REPLACE address WITH ""
REPLACE eidsize WITH 0
REPLACE entryid WITH ""
* clear reciepient cursor and set initial values
* note this cursor is setup to hold all tasks for the current date
* because restdata is filled with a blank string.
SELECT splusrest
SET SAFETY OFF
ZAP
SET SAFETY ON
APPEND BLANK
REPLACE reserved WITH 0
REPLACE itemtype WITH "Task"
REPLACE resttype WITH "All"
REPLACE restdata WITH ""
* start a splus session
hsession = 0
retval=spbegin(0, 0, 0, 0, @hsession)
* get the first task from the users schedule?
lpszitemid=SPACE(1)
retval=spfindnext(hsession, 0, "MapiRecip", "SPlusRest", "", 0, 0, @lpszitemid)
WAIT WINDOW "return from SPFindNext = " + STR(retval)
retval=spreadtask(hsession, 0, "MapiRecip", lpszitemid, 0, 0, "SPlusTask", "SPlusAssoc", "", "")
WAIT WINDOW "return from SPReadTask = " + STR(retval)
SELECT mapirecip
LIST
SELECT splustask
LIST
SELECT splusassoc
LIST
SELECT splustask
GOTO TOP
REPLACE TEXT WITH "Text = Hello from foxprow"
REPLACE projctname WITH "ProjectName = Hello from foxprow"
REPLACE priority WITH "9"
lpszitemid = ""
retval=spsavetask(hsession, 0, "MapiRecip", "SPlusTask", "SPlusAssoc", "", "", 0, 0, @lpszitemid)
WAIT WINDOW "return from SPSaveTask = " + STR(retval) + " TaskID = " + lpszitemid
retval=spend(hsession, 0, 0, 0)
retval=mplogoff(hmapisession, 0, 0, 0)
SET LIBRARY TO