/* Read ImpMAster Prefs and dump data onto Clip List */

pref=getclip('IMP_PREF')

If ~open('Prefs',pref,'r') then Do
	'requestnotify title "Imp Master" Prompt "No Prefs!"'
	exit
end

FORMAT=READLN('Prefs');
IF ~(FORMAT='Imp Master V1') then do
	'RequestNotify TITLE "Imp Master" PROMPT "Prefs File Incompatibility."'
	exit
end

call close('prefs')

yname='spot/readprefs'(pref,"NAME")
yaddr='spot/readprefs'(pref,"ADDRESS")
rarea='spot/readprefs'(pref,"REPORT")
uuxc='spot/readprefs'(pref,"UUDECODE")

if yname='' then do
	'RequestNotify TITLE "Imp Master" PROMPT "NAME Field Missing from Prefs"'
	exit
end
if yaddr='' then do
	'RequestNotify TITLE "Imp Master" PROMPT "ADDRESS Field Missing from Prefs"'
	exit
end
if rarea='' then do
	'requestnotify TITLE "Imp Master" PROMPT "REPORT Field Missing from Prefs"'
	exit
end
if uuxc='' then do
	'requestnotify TITLE "Imp Master" PROMPT "UUDECODE Field Missong from Prefs"'
	exit
end

call setclip('IMP_NAME',yname)
call setclip('IMP_ADDR',yaddr)
call setclip('IMP_REPORT',rarea)
call setclip('IMP_UUXC',uuxc)

exit ''
