MP3 player Hotkey
-
- Posts: 5
- Joined: 03 Mar 2019, 11:21
MP3 player Hotkey
Hi guys, great work with AHK. But i need to make it more useful for me and i am not good about scripts.
I created script with hotkeys to play chants in mp3 player when playing football video game (FIFA).
I created shortcut (SHIFT+F3 play/stop song and SHIFT+F1 next song). I open mp3 player insert chants then in game without minimizing screen i can switch between chants with hotkeys.
But is somehow possible, to create hotkey to play one special song at the moment and then switch back to playlist? I want to have goal song so when i score goal i want to use hotkey to play song after goal and after replays, i want to switch to chants playlist. All that without minimizing screen.
Thanx!
I created script with hotkeys to play chants in mp3 player when playing football video game (FIFA).
I created shortcut (SHIFT+F3 play/stop song and SHIFT+F1 next song). I open mp3 player insert chants then in game without minimizing screen i can switch between chants with hotkeys.
But is somehow possible, to create hotkey to play one special song at the moment and then switch back to playlist? I want to have goal song so when i score goal i want to use hotkey to play song after goal and after replays, i want to switch to chants playlist. All that without minimizing screen.
Thanx!
Re: MP3 player Hotkey
Hi and welcome,
You could try it SoundPlay.
In your script, it could look like this:
If you have problems with {Media_Play_Pause}, you can work with Media_Stop and {Media_Play_Pause}
Cheers!
You could try it SoundPlay.
In your script, it could look like this:
Code: Select all
F8:: ; Change key to whatever you want
Send {Media_Play_Pause} ; Pause current song
SoundPlay, C:\Windows\Media\tada.wav ; Change to the path of your special goal song
Sleep, 5000 ; This value (milliseconds) should be at least as long as your goal song
Send {Media_Play_Pause} ; Continue other song
return
Cheers!
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
-
- Posts: 5
- Joined: 03 Mar 2019, 11:21
Re: MP3 player Hotkey
Works great thank you!
What shoud i add to lines if i want to stop goal song immediately? I tried like this
but with media_stop script only stop current playlist and goal song is go into background. I can limit mp3 files to less seconds, but is possible somehow to stop that soundplay with shortcut?+F8:: ; Change key to whatever you want
Send {Media_Play_Pause} ;
SoundPlay, D:\FIFA 16 MODS & ADDONS\FIFA\Chants\Entrances and hymnes\Panathinaikos.mp3 ;
Sleep, 5000 ; This value (milliseconds)
Send {Media_Stop} ;
return
Re: MP3 player Hotkey
You could use SoundPlay again but choose a file which doesn't exist.
By this way, AHK will stop the goal song and then try to play the other file.
However, I'm not really sure if it's a good solution,
because there is still the sleep time...
Another way could be to use reload.
So those could be the scripts you can try out:
Cheers!
By this way, AHK will stop the goal song and then try to play the other file.
However, I'm not really sure if it's a good solution,
because there is still the sleep time...
Another way could be to use reload.
So those could be the scripts you can try out:
Code: Select all
F9::
SoundPlay, fake.wav ; Play non existent file to interrupt current Sound Play
return
F10::
Send {Media_Play_Pause} ; Resume real song
reload ; Reload whole AHK script
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
-
- Posts: 5
- Joined: 03 Mar 2019, 11:21
Re: MP3 player Hotkey
Thanx mate, works like a charm!
With those scripts i can make everything i want to.
With those scripts i can make everything i want to.
-
- Posts: 5
- Joined: 03 Mar 2019, 11:21
Re: MP3 player Hotkey
Hey i have another question.
I have script so i can change music while play games in my mp3 player (like SHIFT+F1 = next). Is possible to assing shortcut on my joypad/controller to work like that as script? For example start+ some button play next song
How script should look?
This is my current one for keyboard
I have script so i can change music while play games in my mp3 player (like SHIFT+F1 = next). Is possible to assing shortcut on my joypad/controller to work like that as script? For example start+ some button play next song
How script should look?
This is my current one for keyboard
+F1:: ;the + means shift
Send {Media_Next}
return
;play/pause
+F3::
Send {Media_Play_Pause}
return
+F5::
Send {Media_Stop}
return
-
- Posts: 5
- Joined: 03 Mar 2019, 11:21
Re: MP3 player Hotkey
Anyone have solution how to assign hotkey for xbox one controller on pc to change song in mp3 player?
Re: MP3 player Hotkey
How do I make this audio file play with a volume of 5% (I mean only the file, not the system sound)
what is the command?
what is the command?