I'm using arduino buttons to play videos on the pc Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ocneves
Posts: 3
Joined: 04 Apr 2017, 13:37

I'm using arduino buttons to play videos on the pc

04 Apr 2017, 14:08

I need help.

I'm using arduino buttons to play videos on the pc.
When I press a button on the Arduino it sends a letter to the serial port, this letter plays video through autohotkey.
I need to press a button to play a video, but even if I press another button nothing should happen until the first video follows the end.




Below the code used.

I'm waiting.
Thank you


a::

Run, C:\Program Files\MPC-HC\mpc-hc64.exe "C:\VIDEOS\youtuber1.mp4"
Sleep 5000
Process, close, mpc-hc64.exe ; Kill vlc and make sure it stays dead
Return

b::

Run, C:\Program Files\MPC-HC\mpc-hc64.exe "C:\VIDEOS\youtuber2.mp4"
Sleep, 8000
Process, close, mpc-hc64.exe ; Kill vlc and make sure it stays dead
Sleep, 100
Return

c::

Run, C:\Program Files\MPC-HC\mpc-hc64.exe "C:\VIDEOS\youtuber 3.mp4"
Sleep, 9000
Process, close, mpc-hc64.exe ; Kill vlc and make sure it stays dead
Sleep 1000
Return
Ovg
Posts: 23
Joined: 19 Feb 2017, 01:13

Re: I'm using arduino buttons to play videos on the pc  Topic is solved

04 Apr 2017, 14:58

Code: Select all

a::
Process, Exist, mpc-hc64.exe 
If !ErrorLevel
{  
  Run, C:\Program Files\MPC-HC\mpc-hc64.exe "C:\VIDEOS\youtuber1.mp4"
  ........
  ........
}
return
the same for b:: and c::
It's impossible to lead us astray for we don't care even to choose the way.
ocneves
Posts: 3
Joined: 04 Apr 2017, 13:37

Re: I'm using arduino buttons to play videos on the pc

04 Apr 2017, 15:34

Hi Ovg,
I'll try. As soon as I finish I send the result.
Thank you
ocneves
Posts: 3
Joined: 04 Apr 2017, 13:37

Re: I'm using arduino buttons to play videos on the pc

04 Apr 2017, 16:51

Hi OVG,

Perfect!!!!
It went very well.
Solved my problem.
Thank you so much.
Ovg
Posts: 23
Joined: 19 Feb 2017, 01:13

Re: I'm using arduino buttons to play videos on the pc

05 Apr 2017, 09:50

Hi ocneves!
Thanks for reply!

How do you read com port with AHK?
Can you write here source code?

WBR, Ovg
It's impossible to lead us astray for we don't care even to choose the way.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: popdeg and 243 guests