GUI media launch bar

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
zcooler
Posts: 455
Joined: 11 Jan 2014, 04:59

GUI media launch bar

28 Sep 2014, 10:09

Hi!

I don't know if AHK GUI is flexible enough to do a media launch bar. Just began studying GUI and it seems not.
I was imagine having a simple bar just wide enough to fit 4 buttons. Each button when pressed shows a dropdownlist containing mediafiles which is in a folder. First stumble was how to show folder contents inside a dropdownlist and how to make it dynamically adjust dropdownlists width and height depending on how many files there are in the folder and depending on the width of the filenames. Also if dropdownlist are higher than vertical screen resolution (height) make it scrollable. The goal was also to have a sorting function where it is possible to sort the files in ascending/descending and in alphabetical order. Hmm...this was harder than expected!

Perhaps anyone has pointers for me?

Regards
zcooler
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: GUI media launch bar

29 Sep 2014, 16:01

Sounds do-able. I created something similar, but in a listview.
To change the choice or add/remove entries from the list after the control has been created, use GuiControl.
For dynamic width, you could parse the folder and grab the longest name, then set the width based off that. Afaik, if you specify a row-count for the ddl, it will automatically implement a scroll-bar if the contents exceed the given rows. Ddl has a built-in sort function.

Reference: http://ahkscript.org/docs/commands/GuiC ... opDownList
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
zcooler
Posts: 455
Joined: 11 Jan 2014, 04:59

Re: GUI media launch bar

30 Sep 2014, 08:15

Hi Masonjar13!

Oh, so this thing I wanna do is actually possible with GUI and DDL! Thank you very much for the information. That definitely encourage me to invest the needed time to figure it out. I'll see it as a long-time-to-learn project.

Regards
zcooler
zcooler
Posts: 455
Joined: 11 Jan 2014, 04:59

Re: GUI media launch bar

08 Nov 2014, 09:42

Hi guys!

Ok, I have now made something that resembles a Media Launch bar gui. Its pretty awful looking, but havent got to the part how to make it nicer yet. Im now struggeling on two and a half problems, which i simply cannot find anything written about in my searches. I am starting to suspect they might be hard to solve as long as using DropDownLists (maybe I should go the html way instead). Anyway the mediafiles can now be launched from all dropdownlists by either click or drag n drop. Getting Dropdownlist much wider compared to the actual DDL button turned out to be solvable (thanks "just me"). The list now displays the full filename width. Haven got it to autoadjust the DDL width after longest filename yet, but it should be possible somehow. The nicest thing is i can sort the files in any order i want and that is great (the only reason for abandoning Windows taskbar toolbars) :D Its also nice to combine the launch bar with tools such as Copy/Move Files.
The remaining problems im trying to find solutions for are:

(1)
AHK are lacking DropDownButtons and when using the closest equivalence "dropdownlists" i wanna have a static title for the DDL. Only way was to use two pipes signs to get a title. That title also shows up in the actual list according to DDL specifications. Is there a way to prevent it to showing up there? Also the file clicked/launched to not replace DDL title and show up in DDL control (always keep title static like a button).

(2)
Next I can display sub-folders in the DropDownList folder im looping (New Movies) by including folders and recursing. The result is not very pleasing to the eyes though (i get a view of all files). The folder name does not show up and it can be hard to know which movie it is, cuz often the full movie titles are in the foldername and the filename are often a shortname. Windows taskbar toolbars do show sub-folders as yellow maps which can in next turn be recursed into by mouse hovering over foldername and ">" and that sub-folder pops up a new DDL displaying the file contents just for this sub-folder. Is that possible with AHK gui?

(2 1/2)
When drag n drop files from DDL onto for example the VLC player Windows usually displays a little tooltip displaying a small, what can be described as a dragndrop, icon just beside the mousepointer. With my DDL there is nothing displayed when doing the dragndrop, but most importantly drag n drop works.
Does anyone know how to display that icon?

EDIT: Oh, I have two more questions! Is it possible to make the files in the DDL editable (right click menu delete, copy and paste) and manual drag n drop sorting? That is just for editboxes yes?

Here is the script:
Spoiler

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: macromint, peter_ahk, Spawnova and 263 guests