You are here

Menu Question: App Name Retrieval System

7 posts / 0 new
Last post
digitxp
digitxp's picture
Offline
Last seen: 12 years 7 months ago
Joined: 2007-11-03 18:33
Menu Question: App Name Retrieval System

Yes, I still want to make an app uninstaller manager for the Platform and since xopher (maggotb0y) has a system of plugins implemented, I could write it in NSIS or AHK and it'll integrate into the future platform. But I would still have to know how the menu gets all the apps stuff. I managed to open up the source (after realizing that I should open the .pas file instead of the .dcu). Of course, I had no real experience in GUI structuring and had no idea how to find the section/method that finds all the names of the menu items. Obviously it has to use a For loop and a folder wildcard, but I have no idea how. Does anyone know the section of code or method it gets?
While I'm at it, I'll make a list of stuff I have to do since I don't have room on my drive for PNotes:

      The actual uninstaller
    1. Find the app names
    2. Find out wether it's a PAF app
    3. Button to delete
    4. Button for help.html
    5. Set to autostart
    6. Darn my dad's pulling me off :(...
Simeon
Simeon's picture
Offline
Last seen: 9 years 6 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
no but

I wanted to do something else where I would need something similar so I you find something lemme know.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

digitxp
digitxp's picture
Offline
Last seen: 12 years 7 months ago
Joined: 2007-11-03 18:33
Hm...

here's something of interest.

Insert original signature here with Greasemonkey Script.

TaffinFoxcroft
TaffinFoxcroft's picture
Offline
Last seen: 10 years 4 months ago
Developer
Joined: 2006-12-14 17:24
since i've been trying to

since i've been trying to figure this out for MenuLauncher for ages, the closest i've come is:

dir /b /s *Portable.exe > list.txt

which lists all the launchers into list.txt, but thas as far as i got...

But there’s no sense crying over every mistake,
You just keep on trying till you run out of cake.

digitxp
digitxp's picture
Offline
Last seen: 12 years 7 months ago
Joined: 2007-11-03 18:33
No, I don't think so

It's ANY executable in the subdirectory, so it would have to find the names of all the folders (easy), find all the executables within all those folders (medium), and then get the description, check if it's not blank, and if it is, it uses the filename.

Insert original signature here with Greasemonkey Script.

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 8 years 10 months ago
Joined: 2007-04-15 21:08
PortableApps\*\*.exe

It looks through each subdirectory of the PortableApps directory (but NOT recursively) and adds all executables (*.exe) to the menu, with the name contained in the version info, or if that's missing, the filename (without the .exe extension).

I can't provide you with NSIS or AHK code at the moment, but when I get home I can probably provide both if you're interested, or work with you if you'd like - email me at me@[my homepage]. Guess what one of the things I had on my list of "useful apps I'd like to PortableApp-ize/make"...
AHK code would go something like:

PortableAppsList_ArrayLength := 0
Loop, \PortableApps\*
    CheckDirectory("%A_LoopFileDirectoryThingo%")

CheckDirectory(dir)
{
    global
    Loop, %dir%\*.exe {
        ; TODO: check if it's PortableAppsMenu/Backup, continue
        if %A_LoopFileName% = PortableAppsMenu
          or %A_LoopFileName% = PortableAppsMenu
            Continue

        PortableAppsList_ArrayLength := PortableAppsList_ArrayLength + 1
        PortableAppsList_%A_Index% := %A_LoopFileNameFull%
    }
    Return
}

(CheckDirectory is a separate function because of the nested loop variable issues)

I can't think of the NSIS code that atm, and I reckon AHK is going to be better.

You'd add in stuff for IniRead-ing App\AppInfo\appinfo.ini etc. to make it useful. My code there is a 5-minute slap-together with a really awful keyboard... you wouldn't believe how many mistakes it's made me make, and how slow it is to type with it...

PS: it also hides the PortableApps Menu/Backup executables from the main list... I wonder why..! Blum

PPS: I hope that you want help with it! I'd like to help.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

digitxp
digitxp's picture
Offline
Last seen: 12 years 7 months ago
Joined: 2007-11-03 18:33
Thanks!

(I'm not exactly a master of AHK/AU3 yet, right now I'm learning PHP).
So basically, it's an array that loops through all folders looking for *.exe
I really need to learn more about looping.

Insert original signature here with Greasemonkey Script.

Log in or register to post comments