There comes the next question:
Sketchup runs also on the MAC.
So it is possible to load the newLISP modul under ruby?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
require 'Win32API'
true
newLISP = Win32API.new("newlisp.dll", "newlispEvalStr", ['P'], 'V')
Error: #<RuntimeError: (eval):131:in `initialize': LoadLibrary: newlisp.dll
>
(eval):131
findWindow = Win32API.new("user32.dll", "FindWindow", ['P','P'], 'N')
window_id = findWindow.call(0, sketchup_title)
sendMessage = Win32API.new("user32.dll", "SendMessage", ['N','N','N','P'], 'N')
sendMessage.call(window_id, 0x0010, 0, "")
(define-macro (tk , _result)
(set '_result (append (apply string (map eval (args))) ";##EOT##"))
(net-send SYS:tk-sock '_result)
;; on Unix's we could just use 'read-line', but doesn't work on sockets in win32
(while (starts-with (net-read-line SYS:tk-sock '_result) "VOID-TK:"))
(if (starts-with _result "ERR-TK:") (reset) _result))
Quote
> setq
setq <408002>
> net-read-line
nil
Note that read-key will not work from the newLISP-GS front-end or any other application running newLISP over a TCP/IP port connection.Quote
Note that read-key will not work from the newLISP-GS front-end or any other application running newLISP over a TCP/IP port connection.Quote
Also the use of this command (like all other console-input-commands) in the DLL-version makes no sense.
Quote
#define LC_ALL 0
#define LC_COLLATE 1
#define LC_CTYPE 2
#define LC_MONETARY 3
#define LC_NUMERIC 4
#define LC_TIME 5
> (set 'aList '((a 1 2 3)(b 4 5 6)(c 7 8 9)))
((a 1 2 3) (b 4 5 6) (c 7 8 9))
> (replace-assoc 'b aList '(q "I am the replacement"))
((a 1 2 3) (q "I am the replacement") (c 7 8 9))
> aList
((a 1 2 3) (q "I am the replacement") (c 7 8 9))
newLISP v.9.2.0 on Win32.
> (set 'aList '(((a 1 2 3)(b 4 5 6)(c 7 8 9))))
(((a 1 2 3) (b 4 5 6) (c 7 8 9)))
> (replace-assoc 'b (aList 0) '(q "I am the replacement"))
((a 1 2 3) (q "I am the replacement") (c 7 8 9))
> aList
(((a 1 2 3) (b 4 5 6) (c 7 8 9)))
>
nlIEstarter "C:Programmenewlispnewlisp_manual.html#setq" "C:Programmenewlispmanual_frame.html"
"C:hpwtoolsnlIEstarter.EXE" "C:Programmenewlispnewlisp_manual.html#%sel%" "C:Programmenewlispmanual_frame.html"
Quote
(set 'currentAppHeight 834)
(set 'currentAppWidth 1152)
(set 'currentAppX 0)
(set 'currentAppY 0)
Quote
(set 'currentAppHeight 786)
(set 'currentAppWidth 1144)
(set 'currentAppX 4)
(set 'currentAppY 44)
Quote
MySplashRun.exe
Quote
Start=Pathname/newLISP.exe MyNewLISP.lsp
Splash=Pathname/MySplashBitmap.png
TimeToShow=5
(define (radio-button id action text selected)
(if text
(net-send out (string "radio-button " id " " action " " (base64-enc text) " " selected "n"))
(net-send out (string "radio-button " id " " action "n")))
)
(define (check-box id action text selected)
(if text
(net-send out (string "check-box " id " " action " " (base64-enc text) " " selected "n"))
(net-send out (string "check-box " id " " action "n")))
)
(define (radio-button id action text selected)
(if text
(net-send out (string "radio-button " id " " action " " (base64-enc text) " " selected "n"))
(net-send out (string "radio-button " id " " action " nil " selected "n")))
)
(define (check-box id action text selected)
(if text
(net-send out (string "check-box " id " " action " " (base64-enc text) " " selected "n"))
(net-send out (string "check-box " id " " action " nil " selected "n")))
)
(define (action-handler)
(if (= "MAIN:TheToggleButton" (args 0))
(if (true? (args 1))
(gs:disable 'TheButton 'TheImageButton 'TheRadioButton 'TheCheckBox 'TheMessage)
(gs:enable 'TheButton 'TheImageButton 'TheRadioButton 'TheCheckBox 'TheMessage)
))
(if (= "MAIN:TheImageButton" (args 0))
(gs:color-dialog 'TheFrame 'action-handler "Choose a color" 1 1 1))
(if (= "MAIN:TheMessage" (args 0))
(gs:confirm-dialog 'TheFrame 'action-handler
"A Message" "Enjoy GUI server"
"yes-no"
;(amb "error" "informaton" "warning" "question" "plain")
))
(let (s "")
(doargs (item)
(write-buffer s (string item " ")))
(if (or
(= "MAIN:TheComboBox" (args 0))
(= "MAIN:TheListBox" (args 0)))
(write-buffer s (string (base64-dec (args 2)) " "))
)
(write-buffer s "n")
(gs:append-text 'MonitorArea s)
)
)