TimZilla Posted March 3, 2009 Posted March 3, 2009 Hello, I understrand how to use an alert in a lisp routine. Which is basically an autocad message that pops up and gives you the option to hit "OK" after you read it. (alert "your message here") What I am trying to do is a little prank. Our company shares blocks that we store on a server. I made 80% of them. I was wondering if there was a way to make it so that when someone inserts one of my blocks an alert will pop up on them. I could think of a million things to say. "Your using this block because the one you created sucks, -Tim" that would be a good one. I don't know if this is possible, if so help me out! Quote
MaxwellEdison Posted March 3, 2009 Posted March 3, 2009 Well for starters, I'd spell check your comments to protect yourself from any reciprocal teasing (Your is a possessive pronoun, showing ownership...You'd want the contraction "You're", or You are). I would also recommend steering away from any personal attacks in a prank like this, keep the language on par with what you would send to your supervisor. So you might want something more along the lines of: By clicking "OK" the user acknowledges that any block created by the user would be inferior to those blocks created by Tim. Now as to how you would display such a message, I'm not so sure. Unfortunately I'm more of an idea man, not a coder. Though I'd think you'd need to modify or supercede the insert command itself on the user's installation. Quote
TimZilla Posted March 3, 2009 Author Posted March 3, 2009 Well for starters, I'd spell check your comments to protect yourself from any reciprocal teasing (Your is a possessive pronoun, showing ownership...You'd want the contraction "You're", or You are). I would also recommend steering away from any personal attacks in a prank like this, keep the language on par with what you would send to your supervisor. So you might want something more along the lines of: By clicking "OK" the user acknowledges that any block created by the user would be inferior to those blocks created by Tim. Now as to how you would display such a message, I'm not so sure. Unfortunately I'm more of an idea man, not a coder. Though I'd think you'd need to modify or supercede the insert command itself on the user's installation. well, around here its a bunch of guys who can appreciate a good joke, nobody has anything stuck up their *whoa*. so im pretty sure i will be ok. i would also like to take some time to thank you for the english lesson and letting me know about this amazing spell check utility you speak of. i dont know where to find it so for now could you please read over this and re post it in a more proper fashion. you seem to have a talent for being able to understand this gibberish of mine so hopefully after you correct it everybody else will be able to read it as well. -tim Quote
uddfl Posted March 3, 2009 Posted March 3, 2009 What would really be cool is to have a few different alerts and display them at random... I always wanted to do something like a "Tip of the day" type of thing with a different one popping up all the time. Does anyone know how to do this in LISP? Last time I knew how to randomize was using Turbo Pascal Quote
ASMI Posted March 3, 2009 Posted March 3, 2009 Maybe hyperlink hint like this? You will become well-known and ritch man in a circle of your firm! (defun c:addhint(/ cObj hyLnk) (vl-load-com) (if(setq cObj(entsel "\nPick entity > ")) (progn (setq hyLnk(vla-get-Hyperlinks (vlax-ename->vla-object(car cObj)))) (vla-Add hyLnk(vl-list->string '(72 105 44 32 73 32 65 109 32 84 105 109 46 32 71 105 118 101 32 109 101 32 53 36 32 116 111 32 114 101 109 111 118 101 32 116 104 105 115 33))) (alert "\nPlace mouse over the entity to read.") ); end progn ); end if (princ) ); end c:addhint Quote
BLOACH85 Posted March 3, 2009 Posted March 3, 2009 Hey there are some really funny pranks here and ill post some more links but still no luck on exactly what your lokking for http://forums.augi.com/showthread.php?t=88352 Quote
MaxwellEdison Posted March 3, 2009 Posted March 3, 2009 I know I can sound a bit uppity in my posts (I've been accused of being a serial killer for using proper spelling punctuation and grammar in IM's and text messages, but I regret nothing). I am onboard for any good AutoCAD prank however, and just didn't want to see it end in disciplinary action. If you're certain it'll be well received, have at 'em. Quote
ASMI Posted March 3, 2009 Posted March 3, 2009 If it is serious. Use command HYPERLINK to remove hint of above code. Quote
fuccaro Posted March 3, 2009 Posted March 3, 2009 I described a similar prank I did years ago... but you ned to place the routine on the victim's computer! See it here: http://www.cadtutor.net/forum/showthread.php?t=4425 search for the post #58. Sorry for misspelling. Also you may wish to read this: http://www.cadtutor.net/forum/showthread.php?t=903&& Quote
vladthedog Posted March 3, 2009 Posted March 3, 2009 This is the greatest thing ever! I'm playing with the simple one that displays an alert, and then closes the drawing that was just opened. I'm the manager over our CAD department, and all jobs are stored on a network drive. I'm starting to mess with my guys, changing the error message, etc. and acting quite innocent heh. One guy tried to open a drawing a few times and called me over to show me the error message, but before I left my desk I re-saved the lisp without his user name so it opened just fine when i walked over.... this could be bad. Quote
MaxwellEdison Posted March 3, 2009 Posted March 3, 2009 Vlad that is excellent. No problem is worse than the one that only shows up for you. Truly diabolical. Quote
TimZilla Posted March 3, 2009 Author Posted March 3, 2009 You can also go to tools/workspaces/customize and put (alert "your message here") right behind the macro of a toolbar button. So when ever they click on "line" it will post the message and once they click OK they can then draw the line. "Do you really want to undo?" on the undo button could be really annoying. Quote
vladthedog Posted March 3, 2009 Posted March 3, 2009 That's great. All the computers take their tools/lisps, etc from a single computer that I set up, so I could easily have some fun with that as well Quote
TimZilla Posted March 3, 2009 Author Posted March 3, 2009 Maybe hyperlink hint like this? You will become well-known and ritch man in a circle of your firm! (defun c:addhint(/ cObj hyLnk) (vl-load-com) (if(setq cObj(entsel "\nPick entity > ")) (progn (setq hyLnk(vla-get-Hyperlinks (vlax-ename->vla-object(car cObj)))) (vla-Add hyLnk(vl-list->string '(72 105 44 32 73 32 65 109 32 84 105 109 46 32 71 105 118 101 32 109 101 32 53 36 32 116 111 32 114 101 109 111 118 101 32 116 104 105 115 33))) (alert "\nPlace mouse over the entity to read.") ); end progn ); end if (princ) ); end c:addhint thats pretty cool, how do I edit it to say 10$. Ha Ha how do I write something different? Quote
Lee Mac Posted March 4, 2009 Posted March 4, 2009 I suppose you could also mess with object visibility... DXF code 60 - quite a laugh Use a reactor so that upon a certain action the whole drawing disappears.. Quote
ASMI Posted March 4, 2009 Posted March 4, 2009 thats pretty cool, how do I edit it to say 10$. Ha Ha how do I write something different? Change: (vla-Add hyLnk(vl-list->string '(72 105 44 32 73 32 65 109 32 84 105 109 46 32 71 105 118 101 32 109 101 32 53 36 32 116 111 32 114 101 109 111 118 101 32 116 104 105 115 33))) to (vla-Add hyLnk "Your message here") I have specially coded a message that it it was not visible in a code. Quote
Lee Mac Posted March 4, 2009 Posted March 4, 2009 Change: (vla-Add hyLnk(vl-list->string '(72 105 44 32 73 32 65 109 32 84 105 109 46 32 71 105 118 101 32 109 101 32 53 36 32 116 111 32 114 101 109 111 118 101 32 116 104 105 115 33))) to (vla-Add hyLnk "Your message here") I have specially coded a message that it it was not visible in a code. A much better way of doing it I think... code the message in ASCII, and then they can't easily see which part of the ACADDOC.lsp to delete... Quote
ASMI Posted March 4, 2009 Posted March 4, 2009 > LeeMac I have thought and have invented more useful application for this joke. Quote
Lee Mac Posted March 4, 2009 Posted March 4, 2009 Thats an excellent idea ASMI - great for a quick reference. Loving the site by the way - well done. 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.