Shop OBEX P1 Docs P2 Docs Learn Events
shutdown windows with a stamp? — Parallax Forums

shutdown windows with a stamp?

ArchiverArchiver Posts: 46,084
edited 2001-06-08 00:49 in General Discussion
Does anyone know how I can shutdown windows with a Basic Stamp 2? I'd like
to send something to the serial port and have win issue a shutdown, but I'm
not a vb programmer. Does anyone know where I can find a prog. to do this?

Perhaps I could use APC Powerchute and trick it somehow into shutting
down???

Any info is sincerely appreciated...

Thanks,
Chris


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-06-06 21:35
    I think you have the easiest solution here. APC, Belkin, Tripplite all
    have software that will do this. You will need to check wiring diagrams,
    but the simple solution will be to use the software in the "stupid" mode,
    this is for the older/cheaper UPS, that don't have microcontrollers. They
    just closed the DTR, or CTS, or similar control lines.

    joshua

    --On Wednesday, June 6, 2001 3:46 PM -0400 Christopher Bergeron
    <christopher_bergeron@y...> wrote:

    > Perhaps I could use APC Powerchute and trick it somehow into shutting
    > down???
  • ArchiverArchiver Posts: 46,084
    edited 2001-06-07 05:01
    [font=arial,helvetica]In a message dated 6/6/2001 4:37:09 PM Eastern Daylight Time,
    anhalt+stamp@andrew.cmu.edu writes:


    I think you have the easiest solution here. ·APC, Belkin, Tripplite all
    have software that will do this. ·You will need to check wiring diagrams,
    but the simple solution will be to use the software in the "stupid" mode,
    this is for the older/cheaper UPS, that don't have microcontrollers. ·They
    just closed the DTR, or CTS, or similar control lines.

    joshua

    --On Wednesday, June 6, 2001 3:46 PM -0400 Christopher Bergeron
    <christopher_bergeron@yahoo.com> wrote:

    > Perhaps I could use APC Powerchute and trick it somehow into shutting
    > down???




    A good way to do this would be to make your own VB application, in which the
    Stamp sends the software a variable to shutdown, then have your VB app call
    the shutdown .dll....
    ex, in a module under declarations put these two lines:
    Public Const EWX_SHUTDOWN = 1

    Declare Function exitwindowsex Lib "user32" Alias "ExitWindowsEx" (ByVal
    uFlags As Long, ByVal dwReserved As Long) As Long

    then to execute the command in your code, it would look like this:
    exitwindowsex EWX_SHUTDOWN, 0
    hope this helps
    Lou
    [/font]
  • ArchiverArchiver Posts: 46,084
    edited 2001-06-07 09:48
    Maybe Shutdown Now! can be of help: http://www.dworld.de/winsoft.htm

    Hans Luyten
    Webmaster http://www.weethet.nl



    Original Message
    From: Christopher Bergeron [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=HMZSfqt1P6ENwp35YbzbbFo2zn1cNdFMxEZNektiVBpI5Q_fudzDkpUsCpw453fJ4ka7Mzq0_0-9kC1VUtnQot2ouJQm]christopher_bergeron@y...[/url
    Sent: woensdag 6 juni 2001 21:47
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] shutdown windows with a stamp?


    Does anyone know how I can shutdown windows with a Basic Stamp 2? I'd like
    to send something to the serial port and have win issue a shutdown, but I'm
    not a vb programmer. Does anyone know where I can find a prog. to do this?

    Perhaps I could use APC Powerchute and trick it somehow into shutting
    down???

    Any info is sincerely appreciated...

    Thanks,
    Chris


    _________________________________________________________
    Do You Yahoo!?
    Get your free @yahoo.com address at http://mail.yahoo.com


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed with. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2001-06-08 00:49
    [font=arial,helvetica]If you don't care about windows being shut down "properly" (I don't) guess
    you could use a relay or two to do that, but if you don't want to mess with
    power cables take advise of someone who is better at VB programming than me.
    I suppose I am not of much help but I just felt like writing something.

    [/font]
Sign In or Register to comment.