Jump to content

Recommended Posts

Posted

Dear All,

 

after the open acad i want startup with alert box

"Hi abcd" (Login name) "Good morning " " Good Afternoon" "Good Eveing" , Date & time

Posted

Are you shure? I can imagine it might be pretty annoing...

Posted

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.

Posted
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.

Posted

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

alert.JPG

alert1.jpg

Posted
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?

Posted

(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)

Posted

(setq alrtxt (strcat "Hello " usernm "\nDate:" month "-" day "-" year "\nLogin time- " hour ":" mints ampm))

Posted

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

Posted
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.

Posted

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)

Posted

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

Posted

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

Posted
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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...