Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Is there a way to start a program on the Windows PC?

  1. #1
    Junior Member
    Join Date
    Apr 2015
    Posts
    3

    Is there a way to start a program on the Windows PC?

    Hi Folks,

    Is there a way to start a application on the pc the teensy 3.1 is connected to?

    At the moment, I just send some keystrokes to the PC. These Shortcuts (CTRL ALT....) launch an application that does what I want to accomplish. But as soon as there is a Browser opened in Fullscreenmode (F11), these Keystrokes won't get passed to the system. So my application doesn't start. That's why I'd like to start the application directly from the teensy.

    Any ideas? : )

    Thanks!
    Michael

  2. #2
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    I recall reading about this need in this forum within the last few months. Try a search.

  3. #3
    Junior Member
    Join Date
    Apr 2015
    Posts
    3
    Thanks!
    I'm sorry, I didn't find anything. Can you give me hint what keywords to look for?

  4. #4
    Senior Member
    Join Date
    Jun 2013
    Location
    So. Calif
    Posts
    2,828
    Sorry -I don't recall specifics. The search tool on this forum software is a challenge.

  5. #5
    Junior Member
    Join Date
    Apr 2015
    Posts
    3
    Thanks,

    I don't know if it's the best way, but I managed to do it by sending a string to the pc (Serial.write("xyz")) and writing a Service on the Windows-System that listens to this Port and launches a program depending on the string it received.

    Maybe this helps someone in the future...

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    9,777
    My Windows code skills are rusty to say the least - can you post your solution, that sounds like it could come in handy.

  7. #7
    You could have the PC start a program (Python) when Windows starts(Scheduled Tasks). And then this program runs in the background and talks to the Teensy.

    I use Python on Windows. Pyserial to talk to Teensy over USBSerial. And look for a string that commands the program to do something. Python can open other programs (subprocess.Popen()).

    TLB

Posting Permissions

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