bjrams
10th May 2005, 09:04 pm
Trying to use this code to load profiles on startup of new user.
The first part works fine, but loading the profiles, seems the function to sample-profile-import doesn't work, and I'm guessing the sample-profile-set-active will not either.
May I get some assistance with figuring this one out, I'd appreciate it.
(defun-q S::STARTUP ()
;;force standard profiles function
;=================================
(setq flagfile (strcat "c:\\" (getenv "username") ".txt")) ;;set user's name of marker file
(if (not (findfile flagfile))
(progn (setq fi (open flagfile "w")) ;;file doesn't exist, so write the marker file & import profile
(setq fi (close fi))
(if (not (vl-bb-ref ':sample-imported-profile)) ;; have we imported the profile yet?
(progn
(vl-bb-set ':sample-imported-profile T)
(sample-profile-import "c:\\My_Profile.arg" "My_Profile" T)
(sample-profile-set-active "My_Profile")
)
)
)
)
(princ)
) ;end s::startup
The first part works fine, but loading the profiles, seems the function to sample-profile-import doesn't work, and I'm guessing the sample-profile-set-active will not either.
May I get some assistance with figuring this one out, I'd appreciate it.
(defun-q S::STARTUP ()
;;force standard profiles function
;=================================
(setq flagfile (strcat "c:\\" (getenv "username") ".txt")) ;;set user's name of marker file
(if (not (findfile flagfile))
(progn (setq fi (open flagfile "w")) ;;file doesn't exist, so write the marker file & import profile
(setq fi (close fi))
(if (not (vl-bb-ref ':sample-imported-profile)) ;; have we imported the profile yet?
(progn
(vl-bb-set ':sample-imported-profile T)
(sample-profile-import "c:\\My_Profile.arg" "My_Profile" T)
(sample-profile-set-active "My_Profile")
)
)
)
)
(princ)
) ;end s::startup