Author Topic: (command "BROWSER" "http://www.theswamp.org")  (Read 1491 times)

0 Members and 1 Guest are viewing this topic.

Q1241274614

  • Mosquito
  • Posts: 12
(command "BROWSER" "http://www.theswamp.org")
« on: July 23, 2015, 11:14:43 PM »
Code: [Select]
(defun c:tt ()
(if (= (menucmd "M=$(edtime,$(getvar,date),DDDD)") "Friday")(progn
    (command "BROWSER" "http://www.theswamp.org")
    (vla-put-visible  (vlax-get-or-create-object "AutoCAD.application") 1))  ;Possible error
    (entmakex (list (cons 0 "TEXT")  (cons 10 (getpoint))(cons 1 "Friday")(cons 40 50)))
  )
  (princ)
  )
After opening the page and return cad drawing failure. Do not continuous,
« Last Edit: July 24, 2015, 08:48:37 PM by mianbaoche »
Beware of dog!Because The dog will bite 。

roy_043

  • Water Moccasin
  • Posts: 1720
  • BricsCAD 18
Re: (command "BROWSER" "http://www.theswamp.org")
« Reply #1 on: July 24, 2015, 12:48:02 PM »
I am no sure what you want to do. But perhaps this helps:
Code - Auto/Visual Lisp: [Select]
  1. (defun c:tt ()
  2.   (if (= (menucmd "M=$(edtime,$(getvar,date),DDDD)") "Friday")
  3.     (progn
  4.       (command "BROWSER" "http://www.theswamp.org")
  5.       (vla-put-visible  (vlax-get-acad-object) :vlax-true)
  6.     )
  7.     (entmakex
  8.       (list
  9.         (cons 0 "TEXT")
  10.         (cons 10 (getpoint "\nPoint: "))
  11.         (cons 1 "TODAY IS NOT FRIDAY")
  12.         (cons 40 50.0)
  13.       )
  14.     )
  15.   )
  16.   (princ)
  17. )

Note that switching the visibility property of the application to true does not make a lot of sense. Maybe you actually want to handle a Windows focus issue?

I have to ask again: Please use code tags in your posts: http://www.theswamp.org/index.php?topic=48309.0.

Q1241274614

  • Mosquito
  • Posts: 12
Re: (command "BROWSER" "http://www.theswamp.org")
« Reply #2 on: July 24, 2015, 08:59:40 PM »
thank roy!

 (command "BROWSER" "http://www.theswamp.org")Is finished and will not return to cad,Executive behind
 (entmakex
      (list
        (cons 0 "TEXT")
        (cons 10 (getpoint "\nPoint: "))
        (cons 1 "TODAY IS NOT FRIDAY")
        (cons 40 50.0)
      )
    )
  )

Requiring continuous execution
Maybe you actually want to handle a Windows focus issue? =>This I will not


« Last Edit: July 24, 2015, 09:02:42 PM by mianbaoche »
Beware of dog!Because The dog will bite 。

JAY

  • Newt
  • Posts: 105
Re: (command "BROWSER" "http://www.theswamp.org")
« Reply #3 on: July 24, 2015, 09:44:15 PM »
Quote
Roy said:
I have to ask again: Please use code tags in your posts: http://www.theswamp.org/index.php?topic=48309.0.

Hello mianbaoche

Did you understand?

you want return to cad ? Return  what?

Your Name translate to English should be minibus ? LoL

You can ask question use chinese at here: http://bbs.mjtd.com/forum-3-1.html
« Last Edit: July 24, 2015, 11:37:17 PM by ANJALI »

Lee Mac

  • Seagull
  • Posts: 12265
  • London, England
Re: (command "BROWSER" "http://www.theswamp.org")
« Reply #4 on: July 25, 2015, 07:42:25 AM »
Perhaps something like this?

Code - Auto/Visual Lisp: [Select]
  1. (defun c:tt ( / ins )
  2.     (if (= 4 (rem (fix (getvar 'date)) 7))
  3.         (progn
  4.             (command "_.browser" "http://www.theswamp.org" "_.delay" 2000)
  5.             (LM:appactivate (getvar 'product))
  6.         )
  7.         (if (setq ins (getpoint "\nPoint for text: "))
  8.             (entmake
  9.                 (list
  10.                    '(00 . "TEXT")
  11.                     (cons 10 (trans ins 1 0))
  12.                    '(01 . "TODAY IS NOT FRIDAY")
  13.                    '(40 . 50.0)
  14.                 )
  15.             )
  16.         )
  17.     )
  18.     (princ)
  19. )
  20.  
  21. ;; App Activate  -  Lee Mac
  22. ;; A wrapper for the appactivate method of the WSH
  23. ;; str - [str] Application title or Process ID
  24.  
  25. (defun LM:appactivate ( str / rtn wsh )
  26.     (if (setq wsh (vlax-create-object "wscript.shell"))
  27.         (progn
  28.             (setq rtn (vl-catch-all-apply 'vlax-invoke-method (list wsh 'appactivate str)))
  29.             (vlax-release-object wsh)
  30.             (if (vl-catch-all-error-p rtn)
  31.                 (prompt (vl-catch-all-error-message rtn))
  32.                 rtn
  33.             )
  34.         )
  35.     )
  36. )
  37.  

Q1241274614

  • Mosquito
  • Posts: 12
Re: (command "BROWSER" "http://www.theswamp.org")
« Reply #5 on: July 25, 2015, 08:46:32 AM »
thank Lee Mac!
Beware of dog!Because The dog will bite 。