View Full Version : Lisp routine to send Fdisk message
Father-of-Ten
2006-03-02, 09:56 PM
I need some help from someone that knows Lisp.
I have a few people here at work that I need to get their attention.
I would like to add a lisp routine to bring up a dialog box that says something like this:
*******************************************
Hardware Error 56.9 - Fdisk necessary
System will now reformat hard drive
Call Extension 2032
Hit enter to continue
*******************************************
Or something kind of like this. I need to be able to get their attention and I think that this might be a good way to do that.
Thanks
Maverick91
2006-03-02, 09:57 PM
I need some help from someone that knows Lisp.
I have a few people here at work that I need to get their attention.
I would like to add a lisp routine to bring up a dialog box that says something like this:
*******************************************
Hardware Error 56.9 - Fdisk necessary
System will now reformat hard drive
Call Extension 2032
Hit enter to continue
*******************************************
Or something kind of like this. I need to be able to get their attention and I think that this might be a good way to do that.
ThanksI can't recall how exactly to do that, but I like it!
Sammie
2006-03-02, 09:59 PM
Hi Father-of-Ten,
Please note I have *moved* this thread from the C (http://forums.augi.com/forumdisplay.php?f=45)offee Without Cad forum to this one, as I feel this particular forum is a more appropriate place for such a topic.
Thanks,
Samantha Hally
CWC Forum Moderator
Sammie
2006-03-02, 10:02 PM
I'd also recommend checking out the ATP Courses (http://www.augi.com/education/schedule.asp?page=292) available, as I know there is a LISP course coming up in April. The instructor has also included in his class that he will custom make a LISP routine for each student!
Also sift through the past ATP course, as there may be a course on LISP that may help!
Hi Father-of-Ten,
Hehehe:veryevil:
The alert box is the easy part:
(defun c:test ()
(alert (strcat "*******************************************\n"
"Hardware Error 56.9 - Fdisk necessary\n"
"System will now reformat hard drive\n"
"Call Extension 2032\n"
"Hit enter to continue\n"
"*******************************************"
)
)
)
Where and when to call it is the other story. Is there a particular condition where you want it to pop up?
rkmcswain
2006-03-03, 03:13 AM
...or if you want to make it look more like a windows dialog...
(command ".vbastmt" "MsgBox \"Hardware Error &H0001543\" & vbCrLf & \"Fdisk required\" & vbCrLf & \"System will now restart and format C:\" & vbCrLf & \"Call extension 2032\", vbCritical + vbOKOnly, \"Fatal Error!\"")
kennet.sjoberg
2006-03-03, 08:53 AM
. . . I have a few people here at work that I need to get their attention. . . .
Is this really the right way ?
: ) Happy Computing !
kennet
Robert.Hall
2006-03-03, 02:22 PM
This sounds evil. What else do you plan on doing?
Father-of-Ten
2006-03-03, 02:34 PM
Thanks Tim for the code.
Where I want this message to appear is when they first open up AutoCAD. I was thinking on putting it in the acad.lsp "Application DataAutodeskAutoCAD 2006R16.2enuSupport" that resides in the support folder. What do you think??
Father-of-Ten
2006-03-03, 03:11 PM
This sounds evil. What else do you plan on doing?
Hello Robert
So you think it sound evil.....Hum.....When someone opens AutoCAD they get a message that says that their hard drive is going to be reformatted.......Hum...... I think it sounds well..... really nice.......
I also want to use this to write routines to ask for user input when writing a list routine to create some custom tools, etc...
Father-of-Ten
2006-03-03, 04:00 PM
Is this really the right way ?
: ) Happy Computing !
kennet
I was also looking to use this for other reasons. Sometime a good shock to someone who is not following the rules will help, But I would be very selective and maybe I would not use it at all.
I am very new to writing lisp routines and I am trying to find creative way to learn it.
Have a great day
boesiii
2006-03-03, 06:03 PM
That sounds like a good prank!
jswantek
2006-03-03, 06:25 PM
I really don't know much of anything about programming, but I love this idea. Could you post a full routine with maybe some instructions? I have to access my coworkers' computers frequently with remote access. If I could plant this in there and have it come up when they start a new drawing, that would be awesome.
I don't think this is evil at all, I think it's impressive.
What do you think? Should we redefine a command like:
(command "undefine" "line")
(defun c:line () ;;redefinistion of the line command
(alert (strcat "*******************************************\n"
"Hardware Error 56.9 - Fdisk necessary\n"
"System will now reformat hard drive\n"
"Call Extension 2032\n"
"Hit enter to continue\n"
"*******************************************"
)
)
(command "redefine" "line");sets line command back to original
(princ)
)
or something else? We can plug in pretty much any command.
R.K., your message box is much cooler8) , but I didn't want to plug it in without asking.
Hi all,
Question: BTW, is there any way to hook something similar to this into the color control and/or linetype control? My idea is to have those controls execute the layer control instead (if possible) with a message that the administrator has been notified of the infraction and the incident has been logged - disciplinary action pending.
Enforcement of Bylayer seems to be an issue around here, which I don't get; isn't it just as easy to reach up and change the layer as it is the color or linetype? I already put the layers there to use FER CRYIN' OUT LOUD!
:banghead:
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.