Results 1 to 3 of 3

Thread: send string to com port using outlook 2003 rules

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2007
    Posts
    9

    send string to com port using outlook 2003 rules

    I am working on a text message garage door opener. yes i know a little over the top. I bought a usb 8 channel relay. to turn on the relay you send a string "1" to turn on channel one and "2" to turn on channel two and so on. What i'm trying to do is use the rules wizard to run a script when it recieves a text message with a password in the body to run the script and open the door. so what i need is it to send "1" then at least a one second pause then another "1" to turn off the relay like a momentaty switch.

    And ideas on where to start?

    Thanks for any help
    Countryboyz

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: send string to com port using outlook 2003 rules

    is the device a usb to serial adaptor?

    you can shell to dos, copy textfile to com1:
    i assume, you can point a rule to a vba procedure

    i hope you do not text while you are driving!!!
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2007
    Posts
    9

    Re: send string to com port using outlook 2003 rules

    Just wanted to say thanks for the input. I figured out a way for it to work! i created a app in VB 2008 and compiled it to an .exe in the rules wizard for outlook 2003 i have it set to run the .exe when it receives an email sent from only my phone with a password in the body. it opens the garage door and then you send another to close it. i might try to add somthing for it to send me a pic form a webcam to verify door position. now i have to figure out what to use the other seven relays for lol! any input would be great!!!

    Public Class Form1


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    SerialPort1.Open()
    SerialPort1.Write("1")
    Threading.Thread.CurrentThread.Sleep(1000)
    SerialPort1.Write("1")
    Me.Close()
    End Sub
    End Class

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width