ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Create ini from content folder : shortcuts, folders, any first level file.

(1/13) > >>

Contro:
I would a AHK script for scan a target folder .

This is the target folder :
Create ini from content folder : shortcuts, folders, any first level file.

Then create or add lines to an ini file of this type :
Launcher.ini



This launcher ini is an incomplete example, but the method is always the same

By example :
1. If an url is found in the target folder create the entry in the launcher.ini as
Title7=title of the url in the shortcut
Path7=https://www.donationcoder.com/forum/index.php?action=post;board=71.0
2. If an executable is found in the target folder :
Title19=Ducto_V2_1_3.exe - Acceso directo
Path19=C:\DUCTO\Ducto_V2_1_3.exe
3. If a path to al folder is found
Title25=Don Quijote de la Mancha - Acceso directo
Path25=P:\Escritorio\Don Quijote de la Mancha

4. If a folder is found
Title30=Software Integration
Path30=P:\Escritorio\Folder Ini Generator\Software Integration

and so on to totally scan the folder.
It's not necessary scan the subfolders.

Can you do a coding snack ?

Best Regards
 :-* :P

Contro:
I don't see the ini file inserted.

so I try directly with a spoiler


--- ---[General]
numRows=25
numCols=9
[Titles]
Title1=Anti sistema y mentiras
Title2=Operación Retorno
Title3=COVID Control y seguimiento
Title4=Procedimientos Proyecto
Title5=Procedimientos Informáticos
Title6=Procedimientos Comunes
Title7=
Title8=
Title9=
Title10=
Title11=
Title31=PANTALLAZOS MES
Title12=
Title13=
Title14=
Title32=IMÁGENES MES
Title40=
Title30=
Title21=
Title22=
Title23=
Title24=
Title20=
Title33=CRONO MES
Title39=MENÚ GENERAL
Title38=MENÚ BUSCAR
Title37=MENÚ ATAJOS
Title25=
Title26=HW.tdl
Title27=Ocio.tdl
Title28=Rutinas.tdl
Title29=
Title19=
Title18=
Title15=
Title34=
Title35=practicar.tdl
Title36=Posicionar.tdl
Title16=LENGUAJES.TDL
Title17=
Title41=
Title42=
Title49=carpeta MAPAS MENTALES y dos en Y:
Title48=carpeta MENUS WORD y mm en M:
Title47=MENUS WORD 2
Title46=Organización Cuidados
Title43=Crear.tdl
Title44=NOProcrastinar
Title50=Actos Secundarios
Title45=45
Title125=Cerrar los menús
Title76=DEUDAS y Su seguimiento
[Paths]
Path1=Y:\PORTABLES\Personaliza pc\menu MENTIRAS\menuak.ahk
Path2=Y:\PORTABLES\Personaliza pc\menu RETORNO\menuak.ahk
Path3=Y:\PORTABLES\Personaliza pc\Menu COVID\menuak.ahk
Path4=Y:\INFORMATICA AYUDAS y FORMACION\Excel Ayuda\Control General\Gabinete\Procedimiento Proyectos.xls
Path5=Y:\INFORMATICA AYUDAS y FORMACION\Excel Ayuda\Control General\informatica\procedimientos informáticos.xls
Path6=Y:\INFORMATICA AYUDAS y FORMACION\Excel Ayuda\Control General\conta\procedimientos comunes.xls
Path7=
Path8=
Path9=
Path10=
Path11=
Path31=Y:\PORTABLES\Personaliza pc\Menu Actos Iniciales\send win+5.ahk
Path12=
Path13=
Path14=
Path32=Y:\GABINETE\PROYECTOS\MODELOS\CONTROL\AA\My Exes\AbrirMultimediaDirecto.exe
Path40=
Path30=
Path21=
Path22=
Path23=
Path24=
Path20=
Path33=Y:\GABINETE\PROYECTOS\MODELOS\CONTROL\AA\My Exes\AbrirActividadesDirecto.exe
Path39=Y:\PORTABLES\Personaliza pc\menuakAtajos\005.MenuBTylanzadera\menuak.ahk
Path38=Y:\PORTABLES\Personaliza pc\MenuakBUSCAR\menuak.ahk
Path37=Y:\PORTABLES\Personaliza pc\menuakAtajos\menuak.ahk
Path25=
Path26=Y:\GABINETE\PROYECTOS\MODELOS\CONTROL\TaskLists\HW.tdl
Path27=Y:\GABINETE\PROYECTOS\MODELOS\CONTROL\TaskLists\OCIO.tdl
Path28=Y:\GABINETE\PROYECTOS\MODELOS\CONTROL\TaskLists\Rutinas.tdl
Path29=
Path19=
Path18=
Path15=
Path34=
Path35=Y:\GABINETE\PROYECTOS\MODELOS\CONTROL\TaskLists\practicar.tdl
Path36=Y:\GABINETE\PROYECTOS\MODELOS\CONTROL\TaskLists\Posicionar.tdl
Path16=Y:\GABINETE\PROYECTOS\MODELOS\CONTROL\TaskLists\LENGUAJES.tdl
Path17=
Path41=
Path42=
Path49=M:\Documents and Settings\JOSE\Escritorio\Utilidades Varias\mm
Path48=M:\Documents and Settings\JOSE\Escritorio\Utilidades Varias\mm
Path47=M:\Documents and Settings\JOSE\Escritorio\Utilidades Varias\mm2
Path46=M:\Documents and Settings\JOSE\Escritorio\Utilidades Varias\mm\Organizacion Cuidados
Path43=Y:\GABINETE\PROYECTOS\MODELOS\CONTROL\TaskLists\Crear.tdl
Path44=M:\Documents and Settings\JOSE\Escritorio\Utilidades Varias\mm\Organizacion psico\NOProcrastinar.mm
Path50=Y:\PORTABLES\Personaliza pc\Menu Actos Secundarios\menuak.ahk
Path45=ERROR
Path125=O:\Mis documentos en O\SCRIPTING\cerrarmenus\Cerrarahk.ahk
Path76=ERROR

publicdomain:
I would a AHK script for scan a target folder .
-Contro (January 02, 2022, 09:35 AM)
--- End quote ---

Hello dear Contro! If you are OK with a traditional program instead of an AHK script, I have no problem in taking your request  :)

Cheers & happy 2022!

Contro:
Of course.
I will finally use the ini file with a ahk script, but the method of obtaining the ini is entirely optional with any other method.
I think the best way for the ini file is create in the same target directory to be scanned.
This is really no problem because if the paths are complete I can move that ini file anywhere.

Best Regards
 :-* :P

Note : I see your answer yesterday and was thinking about improving any detail, but I don't really knows. Because even in the case I need rescan the folder I can do by deleting the ini file and do again.
 :-[ :-*

Contro:
I am trying this with no interaction at all.
:


Spoilerini := StrReplace(A_ScriptFullPath, ".ahk", ".ini"), path := {}
IniRead, titles, %ini%, Titles
IniRead, paths, %ini%, Paths
For each, line in StrSplit(titles, "`n")
 If ((part := StrSplit(line, "=")).2 > ""
  && RegExMatch(paths, "m`a)" StrReplace(part.1, "Title", "Path") "=\K.+", commandLine)
  && path[part.2] := commandLine)
   Menu, menu, Add, % part.2, Go

F3::Menu, menu, Show ; F3 = Show the menu

Go:
Run, % path[A_ThisMenuItem]
Return

 :-* :P

Navigation

[0] Message Index

[#] Next page

Go to full version