Jump to content

Recommended Posts

Posted

I wrote this DCL program as a practical joke.. the first mesage is harmless, and so is the next one.. (so it seems..)

the user will surely click on the preferred answer but it'll only ask the user to go back to the previous page.. and be forced

to select the other box. but then.. he will be faced with multiple ok buttons.. but only one is the real thing.

the fun part is its not always on the same spot.

you can increase the number of "ok" button as many as you want.. i only limited it to 10 and the others are decoy

create your slides as irritating to your buddies as possible....

 

try it.. :)

maybe someone here can find a practical use for this..

 

(defun c:funwiddcl ()
  (setq ct (getvar "cdate")
             ld (Substr (rtos ct 2 17) 17 1))
  (setq my_slides (list "msg1" "msg2" "msg3" "msg4") ayos nil dehns nil)
  (cret_ds_dialog)
(setq Dcl_sm (load_dialog fnam))
  (new_dialog "Forever" Dcl_sm)
 (set_tile "Title" " Pop Quiz")
 (start_image "Title")
 (setq X# (- (dimx_tile "msg1") 2))
 (setq Y# (- (dimy_tile "msg1") 2))(end_image)
 (start_image "msg1")(slide_image 1 1 X# Y# "msg1")
 (end_image)
(action_tile "accept" "(done_dialog 1)")
(start_dialog)
(unload_dialog Dcl_sm)
 (chooseme)
  (vl-file-delete fnam) 
(princ)
)
(defun chooseme ()
  (setq Dcl_sm (load_dialog fnam))
  (new_dialog "chooseme" Dcl_sm)
  (set_tile "Title2" " Next Question")(start_image "Title2")
  (setq X# (- (dimx_tile "msg2") 2))
  (setq Y# (- (dimy_tile "msg2") 2))(end_image)
 (start_image "msg2")(slide_image 1 1 X# Y# "msg2")
 (end_image)
 
  (action_tile "tanggap" "(setq ayos 'T)(done_dialog 1)")
  (action_tile "dehins" "(setq dehns 'T)(done_dialog 1)")
(start_dialog)
  (unload_dialog Dcl_sm)
  (if ayos
   (thatsright))
(if dehns
   (wrngans))
 )
(defun thatsright ()
   (setq Dcl_sm (load_dialog fnam))
  (new_dialog "Thats_right2" Dcl_sm)
  (set_tile "Title5" "Order Now")(start_image "Title5")
  (setq X# (- (dimx_tile "msg5") 2))
  (setq Y# (- (dimy_tile "msg5") 2))(end_image)
 (start_image "msg5")(slide_image 1 1 X# Y# "msg5")
 (end_image)
(action_tile (strcat "Panggap" ld) "(done_dialog 1)")
(action_tile "Decoy" "(thatsright)(done_dialog 1)")
(start_dialog)
  (unload_dialog Dcl_sm)(setq ayos nil dehns nil)
   )
  
(defun wrngans ()
  (setq Dcl_sm (load_dialog fnam))
  (new_dialog "Malerd" Dcl_sm)
  (set_tile "Title3" "Be True to yourself")(start_image "Title3")
  (setq X# (- (dimx_tile "msg3") 2))
  (setq Y# (- (dimy_tile "msg3") 2))(end_image)
 (start_image "msg3")(slide_image 1 1 X# Y# "msg3")
 (end_image)
  (action_tile "accept" "(done_dialog 1)")
(start_dialog)
  (unload_dialog Dcl_sm)
  (chooseme)
 )
(defun cret_ds_dialog ()
(setq fnam (vl-filename-mktemp "tmp.DCL"))
(setq fn (open fnam "a"))
(write-line
 "Forever : dialog {
 key = \"Title\";
 label = \"\";
 spacer;
 : image_button {
   key = \"msg1\";
   width = 40;
   height = 10;
   color= -2;
}
ok_only;

}
chooseme : dialog {
 key = \"Title2\";
 label = \"\";
 spacer;
 : image_button {
   key = \"msg2\";
   width = 80;
   height = 20;
   aspect_ratio = 1;
   aspect_ratio = 1;
   color = -2;
 }
 : text {
   key = \"Text1\";
   label = \"Ikaw ba ito?\";
   width = 23.42;
   fixed_width = true;
   alignment = centered;
 }
 : row {
 : button {
label = \"The Answer\";
key = \"tanggap\"; width = 10;
is_default = true; 
 }
 : button {
label = \"preferred answer\";
key = \"dehins\"; width = 10;
is_default = true; 
 }
} 
}
Thats_right : dialog {
 key = \"Title4\";
 label = \"\";
 spacer;
 : image_button {
   key = \"msg4\";
   width = 40;
   height = 10;
   aspect_ratio = 1;
   aspect_ratio = 1;
   color = -2;
 }
 ok_only; 
}
Malerd : dialog {
 key = \"Title3\";
 label = \"\";
 spacer;
 : image_button {
   key = \"msg3\";
   width = 40;
   height = 10;
   aspect_ratio = 1;
   aspect_ratio = 1;
   color = -2;
 }
 : text {
 
   label = \"Dont Lie to me!!\";
   width = 23.42;
   fixed_width = true;
   alignment = centered;
 }
 ok_only; 
}
" fn)
 (write-line 
"Thats_right2 : dialog {
 key = \"Title5\";
 label = \"\";
 spacer;
   : column { 
 : row {
 : button {
label = \"OK\";
key = \"Panggap9\"; width = 10;

 }
: button {
label = \"OK\";
key = \"Panggap20\"; width = 10;

 }
: button {
label = \"OK\";
key = \"Panggap1\"; width = 10;

 }
: button {
label = \"OK\";
key = \"Panggap3\"; width = 10;

 }
    
}
: row {
 : button {
label = \"OK\";
key = \"Panggap13\"; width = 10;

 }
: button {
label = \"OK\";
key = \"Panggap2\"; width = 10;

 }
: button {
label = \"OK\";
key = \"Panggap0\"; width = 10;

 }
: button {
label = \"OK\";
key = \"Panggap19\"; width = 10;

 }
}     
}
 : image_button {
   key = \"msg5\";
   width = 220;
   height = 45;
   aspect_ratio = 1;
   aspect_ratio = 1;
   color = -2;
 }
 : column { 
 : row {
 : button {
label = \"OK\";
key = \"Panggap76\"; width = 10;

 }
: button {
label = \"OK\";
key = \"Panggap7\"; width = 10;

 }
: button {
label = \"OK\";
key = \"Panggap5\"; width = 10;

 }
: button {
label = \"OK\";
key = \"Panggap122\"; width = 10;

 }
 }
: row {
 : button {
label = \"OK\";
key = \"Panggap8\"; width = 10;

 }
: button {
label = \"OK\";
key = \"Panggap6\"; width = 10;

 }
: button {
label = \"OK\";
key = \"Panggap4\"; width = 10;

 }
: button {
label = \"OK\";
key = \"Panggap55\"; width = 10;
  }
}     
     }
: button {
label = \"Select OK to make this go away, but which one?\";
key = \"Decoy\";
is_default = true;
  } 
  }" fn)
(close fn)
 )



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