"more" Grid Header

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

"more" Grid Header

Post by AUGE_OHR »

hi,

when using DIRECTORY() we have up to 10 Column (directry.ch) which can be filled by OS Data
but Windows Explorer can show "more" Column when right-click on Header
more_header.png
more_header.png (67.12 KiB) Viewed 1299 times
so how can i get "these" Column into my Grid :?:
need "Keyword" to search or "ask" ChatGPT
have fun
Jimmy
User avatar
serge_girard
Posts: 3420
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: "more" Grid Header

Post by serge_girard »

Hi Jimmy,

Is this what you mean?

Code: Select all

#include "hmg.ch"
#include "Common.ch"
#include "fileio.ch"
#include "error.ch"
#include "Directry.ch"
#include "Dbstruct.ch"



FUNCTION MAIN()
/*****************/
LOCAL aFiles		 
LOCAL nFilCount	 

SET DATE FRENCH
SET CENT ON

SET PRINTER TO C:\TEST\TEST.TXT  
SET PRINTER ON 
SET CONSOLE OFF

? DATE()

cPath	      := 'P:\CDS\KING CRIMSON\beat\'
cEXT        := '*.WAV'
aFiles		:= DIRECTORY( cPath, '' )      
nFilCount	:= LEN( aFiles )                           

? 'nFilCount', nFilCount

aMusic_Headers		:= {}
AADD(aMusic_Headers,	{001, 'Grootte  '} )
AADD(aMusic_Headers,	{016, 'Genre    '} )
AADD(aMusic_Headers,	{027, 'Time     '} )
AADD(aMusic_Headers,	{015, 'Year     '} )
AADD(aMusic_Headers,	{009, 'Type     '} )
AADD(aMusic_Headers,	{011, 'Kind     '} )
AADD(aMusic_Headers,	{013, 'Contr_art'} )
AADD(aMusic_Headers,	{220, 'Composers'} )

aPhoto_Headers		:= {}
AADD(aPhoto_Headers,	{   1,'Grootte'                    })
AADD(aPhoto_Headers,	{   3,'Gewijzigd op'               })
AADD(aPhoto_Headers,	{   4,'Aanmaakdatum'               })
AADD(aPhoto_Headers,	{   5,'Laatst geopend op'          })
AADD(aPhoto_Headers,	{   6,'Kenmerken'                  })
AADD(aPhoto_Headers,	{   7,'Offline status'             })
AADD(aPhoto_Headers,	{   8,'Offline beschikbaar'        })
AADD(aPhoto_Headers,	{   9,'Waargenomen type'           })
AADD(aPhoto_Headers,	{  10,'Eigenaar'                   })
AADD(aPhoto_Headers,	{  11,'Soort'                      })
AADD(aPhoto_Headers,	{  12,'Genomen op'                 })
AADD(aPhoto_Headers,	{  19,'Waardering'                 })
AADD(aPhoto_Headers,	{  30,'Cameramodel'                })
AADD(aPhoto_Headers,	{  31,'Afmetingen'                 })
AADD(aPhoto_Headers,	{  32,'Camerafabrikant'            })
AADD(aPhoto_Headers,	{  53,'Computer'                   })
AADD(aPhoto_Headers,	{ 160,'Bitdiepte'                  })
AADD(aPhoto_Headers,	{ 161,'Horizontale resolutie'      })
AADD(aPhoto_Headers,	{ 162,'Breedte'                    })
AADD(aPhoto_Headers,	{ 163,'Verticale resolutie'        })
AADD(aPhoto_Headers,	{ 164,'Hoogte'                     })
AADD(aPhoto_Headers,	{ 182,'Type'                       })
AADD(aPhoto_Headers,	{ 188,'Koppelingsstatus'           })
AADD(aPhoto_Headers,	{ 230,'EXIF-versie'                })
AADD(aPhoto_Headers,	{ 232,'Belichtingsafwijking'       })
AADD(aPhoto_Headers,	{ 233,'Belichtingsprogramma'       })
AADD(aPhoto_Headers,	{ 234,'Belichtingstijd'            })
AADD(aPhoto_Headers,	{ 235,'F-stop'                     })
AADD(aPhoto_Headers,	{ 236,'Flitsmodus'                 })
AADD(aPhoto_Headers,	{ 237,'Brandpuntsafstand'          })
AADD(aPhoto_Headers,	{ 239,'ISO-snelheid'               })
AADD(aPhoto_Headers,	{ 242,'Lichtbron'                  })
AADD(aPhoto_Headers,	{ 243,'Max. lensopening'           })
AADD(aPhoto_Headers,	{ 244,'Meetmodus'                  })
AADD(aPhoto_Headers,	{ 245,'Afdrukstand'                })
AADD(aPhoto_Headers,	{ 247,'Programmamodus'             })
AADD(aPhoto_Headers,	{ 248,'Intensiteit'                })
AADD(aPhoto_Headers,	{ 250,'Witbalans'                  })
AADD(aPhoto_Headers,	{ 269,'Status van delen'           })


aMusic_FileInfo	:= {}
AADD(aMusic_FileInfo,	  1 )
AADD(aMusic_FileInfo,   016 )
AADD(aMusic_FileInfo,	027 )
AADD(aMusic_FileInfo,	015 )
AADD(aMusic_FileInfo,	009 )
AADD(aMusic_FileInfo,	011 )
AADD(aMusic_FileInfo,	013 )
AADD(aMusic_FileInfo,	220 )

aPhoto_FileInfo	:= {}
AADD(aPhoto_FileInfo,	 1 )
AADD(aPhoto_FileInfo,    3 )
AADD(aPhoto_FileInfo,    4 )
AADD(aPhoto_FileInfo,    5 )
AADD(aPhoto_FileInfo,    6 )
AADD(aPhoto_FileInfo,    7 )
AADD(aPhoto_FileInfo,    8 )
AADD(aPhoto_FileInfo,    9 )
AADD(aPhoto_FileInfo,   10 )
AADD(aPhoto_FileInfo,   11 )
AADD(aPhoto_FileInfo,   12 )
AADD(aPhoto_FileInfo,   19 )
AADD(aPhoto_FileInfo,   30 )
AADD(aPhoto_FileInfo,   31 )
AADD(aPhoto_FileInfo,   32 )
AADD(aPhoto_FileInfo,   53 )
AADD(aPhoto_FileInfo,  160 )
AADD(aPhoto_FileInfo,  161 )
AADD(aPhoto_FileInfo,  162 )
AADD(aPhoto_FileInfo,  163 )
AADD(aPhoto_FileInfo,  164 )
AADD(aPhoto_FileInfo,  182 )
AADD(aPhoto_FileInfo,  188 )
AADD(aPhoto_FileInfo,  230 )
AADD(aPhoto_FileInfo,  232 )
AADD(aPhoto_FileInfo,  233 )
AADD(aPhoto_FileInfo,  234 )
AADD(aPhoto_FileInfo,  235 )
AADD(aPhoto_FileInfo,  236 )
AADD(aPhoto_FileInfo,  237 )
AADD(aPhoto_FileInfo,  239 )
AADD(aPhoto_FileInfo,  242 )
AADD(aPhoto_FileInfo,  243 )
AADD(aPhoto_FileInfo,  244 )
AADD(aPhoto_FileInfo,  245 )
AADD(aPhoto_FileInfo,  247 )
AADD(aPhoto_FileInfo,  248 )
AADD(aPhoto_FileInfo,  250 )
AADD(aPhoto_FileInfo,  269 )


FOR XX := 1 TO nFilCount
   ? xx, cPath, aFiles [ XX, F_NAME ]
   IF '.WAV' $ upper(aFiles [ XX, F_NAME ]) .OR. '.WMA' $ upper(aFiles [ XX, F_NAME ]).OR. '.MP3' $ upper(aFiles [ XX, F_NAME ]) // ETC....
      ? 'H-HDR', FileInfo(cPath, aFiles [XX, F_NAME ] , 021, 'H') // TITLE
      ? 'F-HDR', FileInfo(cPath, aFiles [XX, F_NAME ] , 021, 'F') // TITLE

      FOR YY = 1 TO LEN(aMusic_FileInfo) -1   
         cTITLE2	:= FileInfo(cPath, aFiles [ XX, F_NAME ], aMusic_FileInfo [ YY ], 'F')
         cTITLE2	:= STRTRAN(cTITLE2,'?','')
         ? cTITLE2
      NEXT YY
   ENDIF
   

   IF '.JPG' $ upper(aFiles [ XX, F_NAME ]) .OR. '.JPEG' $ upper(aFiles [ XX, F_NAME ]).OR. '.PNG' $ upper(aFiles [ XX, F_NAME ]) // ETC....
      ? 'H-HDR', FileInfo(cPath, aFiles [XX, F_NAME ] , 021, 'H') // TITLE
      ? 'F-HDR', FileInfo(cPath, aFiles [XX, F_NAME ] , 021, 'F') // TITLE
      FOR YY = 1 TO LEN(aPhoto_FileInfo) -1   
         cTITLE2	:= FileInfo(cPath, aFiles [ XX, F_NAME ], aPhoto_FileInfo [ YY ], 'F')
         cTITLE2	:= STRTRAN(cTITLE2,'?','')
         ? cTITLE2
      NEXT YY
   ENDIF
   ? '*************************'
   ? ''
NEXT
QUIT


 



FUNCTION FileInfo(cPath, cFilename, nItem, cHDR)
/**********************************************/
Public objShell   := CreateObject("Shell.Application")

objFolder			:= objShell:Namespace(cPath)
objFolderItem		:= objFolder:ParseName(cFilename)
cFileInfo 			:= objFolder:GetDetailsOf(objFolderItem, nItem)
cHeaderInfo			:= objFolder:GetDetailsOf(objFolder:Items, nItem)

IF cHDR == 'H'
	RETURN cHeaderInfo
ELSE
	RETURN cFileInfo
ENDIF


Serge
There's nothing you can do that can't be done...
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: "more" Grid Header

Post by AUGE_OHR »

hi
Serge,

YES, it seem to be what i´m looking for

Question :
"where" do you got "Name" in your Array :?:

Code: Select all

   aMusic_Headers
   aPhoto_Headers
it seems "Name" must match Language to get Result ( else empty)
have fun
Jimmy
User avatar
serge_girard
Posts: 3420
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: "more" Grid Header

Post by serge_girard »

Hi Jimmy,

"Name" is just a translation for the headers. You can fill it in how you wish.

Serge
There's nothing you can do that can't be done...
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: "more" Grid Header

Post by AUGE_OHR »

hi Serge
serge_girard wrote: Mon Dec 19, 2022 5:42 pm "Name" is just a translation for the headers. You can fill it in how you wish.
aha :idea:
understand thx
have fun
Jimmy
Post Reply