A simple script won't work in Winamp

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
anaxio
Posts: 77
Joined: 02 Mar 2018, 15:03

A simple script won't work in Winamp

Post by anaxio » 05 Jul 2022, 09:06

The script is

Code: Select all

Home:: Send +{Enter}
Shift+Enter is the internal Winamp's shortcut to enqueue a selection. I works perfectly when pressing the actual buttons, but when using the script it apparently just sends Enter. I checked it on two different Winamp installations, on Win 8 and 10. I also tried

Code: Select all

Home::{Shift DOWN}{Enter}{Shift UP}
, no way. Any ideas why and how to get around it?

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: A simple script won't work in Winamp

Post by mikeyww » 05 Jul 2022, 09:13

Worked here.

Code: Select all

#IfWinActive ahk_exe winamp.exe
Home::Send +{Enter}
#IfWinActive
Ensure that other scripts & hotkey or keyboard managers & utilities are not running. Check for keyboard shortcut conflicts in this program & others that are running.

anaxio
Posts: 77
Joined: 02 Mar 2018, 15:03

Re: A simple script won't work in Winamp

Post by anaxio » 05 Jul 2022, 09:25

Really at a loss. Used your script (just in case). Shut down all other AHK scripts and Wimamp's hotkeys. Still it sends just Enter. Can't think of anything else.
I have standard 5.666 Winamp.

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: A simple script won't work in Winamp

Post by mikeyww » 05 Jul 2022, 09:29

Examine the :arrow: KeyHistory to see what is being sent. Ensure that your script has no additional code in it.

How do you know that Enter is being sent?

anaxio
Posts: 77
Joined: 02 Mar 2018, 15:03

Re: A simple script won't work in Winamp

Post by anaxio » 05 Jul 2022, 09:34

Oh, you probably tried it on the bottom window in the library, where the songs are. It works there all right (but I hardly ever tried to use it there, that's why I failed to be more specific). Where it doesn't work in in the upper windows (artist, album).

anaxio
Posts: 77
Joined: 02 Mar 2018, 15:03

Re: A simple script won't work in Winamp

Post by anaxio » 05 Jul 2022, 09:43

Key History (double-clicking on the icon) shows

Code: Select all

008: Send,+{Enter}
008: Return (1.59)
I know it's Enter because it just replaces the songs in the playlist, just like pressing Enter does.

gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: A simple script won't work in Winamp

Post by gregster » 05 Jul 2022, 09:50

You showed ListLines, not KeyHistory.
(You can press Ctrl and k when looking at ListLines to show KeyHistory, or use the menu: 'View' > 'Key History and script info')

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: A simple script won't work in Winamp

Post by mikeyww » 05 Jul 2022, 09:54

When I pressed the manual sequence in the top window, nothing happened anyway.

anaxio
Posts: 77
Joined: 02 Mar 2018, 15:03

Re: A simple script won't work in Winamp

Post by anaxio » 05 Jul 2022, 09:56

Sorry :oops:

Code: Select all

24  147	h	d	7.78	Home           	Media Library
A0  02A	i	d	0.00	LShift         	
0D  01C	i	d	0.00	Enter          	
0D  01C	i	u	0.00	Enter          	
A0  02A	i	u	0.00	LShift         	
24  147	s	u	0.16	Home           	

anaxio
Posts: 77
Joined: 02 Mar 2018, 15:03

Re: A simple script won't work in Winamp

Post by anaxio » 05 Jul 2022, 09:58

mikeyww wrote:
05 Jul 2022, 09:54
When I pressed the manual sequence in the top window, nothing happened anyway.
You mean you selected an artist (album) then held down Shift and pressed Enter and it didn't enqueue as it should?

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: A simple script won't work in Winamp

Post by mikeyww » 05 Jul 2022, 09:59

From the KeyHistory, it looks like the script does what it is told to do. I'm using default layout. The only pane at the top is the currently playing song.

image220705-1101-001.png
WinAmp
image220705-1101-001.png (239.24 KiB) Viewed 1167 times
Last edited by mikeyww on 05 Jul 2022, 10:14, edited 1 time in total.

anaxio
Posts: 77
Joined: 02 Mar 2018, 15:03

Re: A simple script won't work in Winamp

Post by anaxio » 05 Jul 2022, 10:14

I see. Right-click in the left pane, Add Smart View – Advanced Mode and in Filters select Two, choose from the dropdown lists whatever you like, finally type in some Name at the bottom. This way you'll have two more windows at the top.

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: A simple script won't work in Winamp

Post by mikeyww » 05 Jul 2022, 10:20

Worked here.

You tried script by itself, with no other code? Saved & reloaded? Script is running? No other hotkeys for the same key, set in this or any other running program?

As noted, KeyHistory shows that the right sequence is being sent.

anaxio
Posts: 77
Joined: 02 Mar 2018, 15:03

Re: A simple script won't work in Winamp

Post by anaxio » 05 Jul 2022, 10:43

That's right. The script is in a separate file, that's the only code in this file, all other scripts terminated, all Winamp hotkeys disabled. I have several AHK scripts for Winamp, all work fine, except this one (but the don't involve the Shift button). It looks like Wimamp prevents simulating the Shift button. Can this be the case? But then only in the upper windows of the library. Weird.

User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: A simple script won't work in Winamp

Post by mikeyww » 05 Jul 2022, 11:21

It could be, though seems unlikely. I do not have a solution. Can try SendInput, I suppose. Others may have ideas.

anaxio
Posts: 77
Joined: 02 Mar 2018, 15:03

Re: A simple script won't work in Winamp

Post by anaxio » 05 Jul 2022, 14:49

SendInput doesn't work either. I appreciate your help, maybe someone else who is an expert in Winamp will come up with an explanation.

User avatar
A Keymaker
Posts: 455
Joined: 31 May 2022, 13:46
Location: Donjon du Château de Mérovingien

Re: A simple script won't work in Winamp

Post by A Keymaker » 13 Jul 2022, 15:01

anaxio wrote:
05 Jul 2022, 10:43
[...]
I have several AHK scripts for Winamp, all work fine, except this one (but the don't involve the Shift button).
I could say that I have the same issue with Winamp - but my issue of AutoHotkey vs. Winamp apparently comes down to my mouse [Logitech Mouse MX Anywhere 2 Business Travel / Logitech Mouse MX Anywhere 2 For Amazon] not being able to push through held down state of the Middle Mouse Button, while other mouse buttons and keys work A-OK when utilized in that script of mine [viewtopic.php?f=76&t=104945&p=472536#p472366]


anaxio wrote:
05 Jul 2022, 10:43
It looks like Wimamp prevents simulating the Shift button. Can this be the case? But then only in the upper windows of the library. Weird.
However maybe this will shed some light on your problem:

#1]
I use a gamepad [Logitech F710] as a remote control for Winamp. In the manufacturer's software dedicated for it I have bind almost all of its buttons with Global Hotkeys of Winamp. And in Winamp they have a form of Ctrl + Shift + Alt + 1, Ctrl + Shift + Alt + 2 and so on up to Ctrl + Shift + Alt + 8. And as you can see they have Shift in them. And they do have been working for years now, first on Windows 7 with some older Winamp version and now on Windows 10 with 5.8 Build 3660. And although Logitech's software is not AutoHotkey - but nevertheless it still has to emulate pressing of 4 keys keys and my Winamp has no problems with reading them all. So that would strike down Winamp as culprit, right?

But then again: Logitech's software does not specify what exact part of Winamp it is suppose to affect, just the "overall" software window that happens to be operating when the EXE file from a given path embedded in gamepad's profile was executed. And my Winamp I use either in form of a Ticketbar [i.e. that minimized very thin toolbar mode] or in normal window [i.e. without being expanded to include Playlist visible]

#2]
Have you tried using virtual keyboards to test the theory of Winamp not being able to digest simulated [emulated?] Shifts?

#3]
In my notes to future me, based on info gathered from Winamp's forum, I see that in case of problems with version 5.8 on Windows 11 what might help is simply installing 5.7 [which I do not have]. But you have not specified which version of Windows you are using

#4]
Have you asked around about this issue on Winamp's forum?



I hope this info helps you in any way


[And on a side note: it is peculiar that one device from Logitech give me zero problems with Winamp - while other, which works in a much simpler way, does]
Last edited by A Keymaker on 16 Jul 2022, 09:38, edited 1 time in total.

anaxio
Posts: 77
Joined: 02 Mar 2018, 15:03

Re: A simple script won't work in Winamp

Post by anaxio » 15 Jul 2022, 08:02

Hi, Keymaker, thanks for your reply. I did mention I have 5.666 and I'd rather not install any other version just because of this single issue. I managed to get around it by having the script click on the Enqueue button at the bottom of the library, works well.

Post Reply

Return to “Ask for Help (v1)”