sachindkini Posted November 17, 2009 Posted November 17, 2009 Dear All, after the open acad i want startup with alert box "Hi abcd" (Login name) "Good morning " " Good Afternoon" "Good Eveing" , Date & time Quote
MarcoW Posted November 17, 2009 Posted November 17, 2009 Are you shure? I can imagine it might be pretty annoing... Quote
MarcoW Posted November 17, 2009 Posted November 17, 2009 You might want to use this routine: (defun c:MdON (/ company *oldmode* ) (setq company "[color=red][b]Your Companyname[/b][/color]"); put your companyname in there (setq *oldMode* (getvar "MODEMACRO")) (setvar "MODEMACRO" (strcat company ": Welcome " (menucmd "M=$(getvar,loginname)") " - Today is " (menucmd "M=$(edtime,$(getvar,date),MO/DD/YYYY)"))) (princ) ) (defun c:MdOFF ( ) (and *oldMode* (setvar "MODEMACRO" *oldMode*)) (setq *oldMode* nil) (princ) ) Put the routine in your startup suite (appload). If you use s::mdon instead of c:mdon it will startup automatically. This would suit me. Quote
alanjt Posted November 17, 2009 Posted November 17, 2009 You might want to use this routine: (defun c:MdON (/ company *oldmode* ) (setq company "[color=red][b]Your Companyname[/b][/color]"); put your companyname in there (setq *oldMode* (getvar "MODEMACRO")) (setvar "MODEMACRO" (strcat company ": Welcome " (menucmd "M=$(getvar,loginname)") " - Today is " (menucmd "M=$(edtime,$(getvar,date),MO/DD/YYYY)"))) (princ) ) (defun c:MdOFF ( ) (and *oldMode* (setvar "MODEMACRO" *oldMode*)) (setq *oldMode* nil) (princ) ) Put the routine in your startup suite (appload). If you use s::mdon instead of c:mdon it will startup automatically. This would suit me. Macro, MdOFF will never do anything; you have the *oldMode* variable localized in MdON. Quote
sachindkini Posted November 17, 2009 Author Posted November 17, 2009 dear sir, thx for reply sorry for poor english i want pop up alert box open cad in morning say "good morning" open cad in afternoon say "good afternoon" open cad in evening say "good evening" & night "good night" find attached Quote
alanjt Posted November 17, 2009 Posted November 17, 2009 dear sir, thx for reply sorry for poor english i want pop up alert box open cad in morning say "good morning" open cad in afternoon say "good afternoon" open cad in evening say "good evening" & night "good night" find attached LoL How odd. So, what's constitutes morning/afternoon/evening? Quote
autolisp Posted November 18, 2009 Posted November 18, 2009 (setq usernm (getenv "username")) (setq ttdt (rtos (getvar "cdate") 2 4)) (setq year (substr ttdt 1 4)) (setq month (substr ttdt 5 2)) (setq day (substr ttdt 7 2)) (setq hourms (substr ttdt 10 2)) (setq mints (substr ttdt 12 2)) (setq hourm (atoi hourms)) (if (> hourm 12) (setq houri (- hourm 12)) (setq houri hourm)) (if (> hourm 12) (setq ampm "pm") (setq ampm "am")) (setq hour (itoa houri)) (setq alrtxt (strcat "Hello " usernm "\n" month "-" day "-" year " " hour ":" mints ampm)) (vlr-beep-reaction) (alert alrtxt) Quote
autolisp Posted November 18, 2009 Posted November 18, 2009 (setq alrtxt (strcat "Hello " usernm "\nDate:" month "-" day "-" year "\nLogin time- " hour ":" mints ampm)) Quote
asos2000 Posted November 18, 2009 Posted November 18, 2009 autolisp great How could we add this checkbox? Quote
David Bethel Posted November 18, 2009 Posted November 18, 2009 You cannot add the check box with a call to (alert) you would have to make a full blown DCL and a good bit of coding. -David Quote
alanjt Posted November 18, 2009 Posted November 18, 2009 You cannot add the check box with a call to (alert) you would have to make a full blown DCL and a good bit of coding. -David Then just store the checkbox variable with setenv. Quote
autolisp Posted November 19, 2009 Posted November 19, 2009 dear see the code any one help me commress this code (setq usernm (getenv "username")) (setq ttdt (rtos (getvar "cdate") 2 4)) (setq year (substr ttdt 1 4)) (setq month (substr ttdt 5 2)) (setq day (substr ttdt 7 2)) (setq hourms (substr ttdt 10 2)) (setq mints (substr ttdt 12 2)) (setq hourm (atoi hourms)) (if (> hourm 12) (setq houri (- hourm 12)) (setq houri hourm)) (if (> hourm 12) (setq ampm "pm") (setq ampm "am")) (setq hour (itoa houri)) (setq greet "Morning") (if (and (>= hourm 12) (< hourm 18)) (setq greet "Afternoon")) (if (and (>= hourm 18) (<= hourm 23)) (setq greet "Evening")) (setq alrtxt (strcat "Welcome " usernm "\nGood " greet "\nDate: " day "-" month "-" year "\nLogIn Time " hour ":" mints ampm)) (vlr-beep-reaction) (alert alrtxt) Quote
autolisp Posted November 19, 2009 Posted November 19, 2009 dear (setq usernm (getenv "username")) (setq ttdt (rtos (getvar "cdate") 2 4)) (setq year (substr ttdt 1 4)) (setq month (substr ttdt 5 2)) (setq day (substr ttdt 7 2)) (setq hourms (substr ttdt 10 2)) (setq mints (substr ttdt 12 2)) (setq hourm (atoi hourms)) (if (> hourm 12) (setq houri (- hourm 12)) (setq houri hourm)) (if (> hourm 12) (setq ampm "pm") (setq ampm "am")) (setq hour (itoa houri)) (setq greet "Morning") (if (and (>= hourm 12) (< hourm 18)) (setq greet "Afternoon")) (if (and (>= hourm 18) (<= hourm 23)) (setq greet "Evening")) (setq alrtxt (strcat "Welcome " usernm "\nGood " greet "\nDate: " day "-" month "-" year "\nLogIn Time " hour ":" mints ampm)) (vlr-beep-reaction) (alert alrtxt) plz help me above the code. alert box all text will be centered & font Size increase, bold & color Quote
flowerrobot Posted November 19, 2009 Posted November 19, 2009 Dosnt any think that is an assignemnt for study..... Because NO one you want this every time.. Please get pissed when i put an alert telling them ive change settings/done updates Quote
TimSpangler Posted November 19, 2009 Posted November 19, 2009 dear alert box all text will be centered & font Size increase, bold & color This won't happen with an alert or with straight dcl. At least not without some skill and a whole lot of code. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.