Help With Simple Video Playback Script

Get help with using AutoHotkey and its commands and hotkeys
controllerkid
Posts: 1
Joined: 04 Apr 2019, 09:52

Help With Simple Video Playback Script

04 Apr 2019, 11:31

Hello! I am just beginning to work with AHK to assist with the making of a cosplay.

I have a script that allows me to play a video at the press of a key. It is as follows.

Code: Select all

j::
fx=C:\Users\Jayden\Desktop\tvhead\sadmachine.mp4
filename1=WindowsMediaPlayer_Viewer

WA=%A_screenwidth%
HA=%A_screenheight%
axw  :=(WA*99 )/100
axh  :=(HA*97 )/100
guw  :=(WA*100)/100
guh  :=(HA*99 )/100

Gui,2:default
Gui,2: -Caption +ToolWindow +AlwaysOnTop +LastFound
Gui,2: Color, gray
Gui,2:Font,  S10 CDefault , FixedSys
Gui 2: Add, ActiveX, w%axw% h%axh% vWmp, WMPLayer.OCX
Wmp.Url :=fx
Gui,2: Show,x-240 y-100 w1920 h1080,%filename1%
return

esc::
2Guiclose:
exitapp

The help I need lies in control. I would like to:

1. Be able to add the ability to play multiple videos from this program. For instance, pressing K would close the current video and open another.
2. Close the video without closing the entire program.

I thought about possibly making all the videos one long file and creating a piece of code to skip to specific times, but I don't know where to start in that regard.

Any help would be greatly appreciated. Thank you so much!

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], dingbat, dipstick5000, neogna2 and 198 guests