No.36440のスクリプトは間違いがあるので無視してください。
// 開始
#ifndef _mp3infp_
#define global _mp3infp_
#uselib "mp3infp.dll"
#func global mp3infp_GetVer "mp3infp_GetVer"
#func global mp3infp_ViewPropEx "mp3infp_ViewPropEx" sptr,sptr,sptr,sptr,sptr,sptr
#func global mp3infp_ViewProp "mp3infp_ViewProp" sptr,sptr,sptr
#func global mp3infp_Load "mp3infp_Load" sptr,sptr
#func global mp3infp_GetType "mp3infp_GetType"
#func global mp3infp_GetValue "mp3infp_GetValue" sptr,sptr
#func global mp3infp_mp3_GetTagType "mp3infp_mp3_GetTagType"
#func global mp3infp_SetConf "mp3infp_SetConf" sptr,sptr
#func global mp3infp_SetValue "mp3infp_SetValue" sptr,sptr
#func global mp3infp_Save "mp3infp_Save" sptr
#func global mp3infp_mp3_MakeId3v1 "mp3infp_mp3_MakeId3v1" sptr
#func global mp3infp_mp3_DelId3v1 "mp3infp_mp3_DelId3v1" sptr
#func global mp3infp_mp3_MakeId3v2 "mp3infp_mp3_MakeId3v2" sptr
#func global mp3infp_mp3_DelId3v2 "mp3infp_mp3_DelId3v2" sptr
#func global mp3infp_mp3_MakeRMP "mp3infp_mp3_MakeRMP" sptr
#func global mp3infp_mp3_DelRMP "mp3infp_mp3_DelRMP" sptr
#func global mp3infp_mp3_MakeApeTag "mp3infp_mp3_MakeApeTag" sptr
#func global mp3infp_mp3_DelApeTag "mp3infp_mp3_DelApeTag" sptr
#const global MP3INFP_FILE_UNKNOWN 0x00
#const global MP3INFP_FILE_MP3 0x01
#const global MP3INFP_FILE_WAV 0x02
#const global MP3INFP_FILE_AVI 0x03
#const global MP3INFP_FILE_VQF 0x04
#const global MP3INFP_FILE_WMA 0x05
#const global MP3INFP_FILE_OGG 0x07
#const global MP3INFP_FILE_APE 0x08
#const global MP3INFP_FILE_MP4 0x09
#const global MP3INFP_HAS_MP3_ID3V1 0x00000001
#const global MP3INFP_HAS_MP3_ID3V2 0x00000002
#const global MP3INFP_HAS_MP3_RIFFSIF 0x00000004
#const global MP3INFP_HAS_MP3_ID3V1_0 0x00000008
#const global MP3INFP_HAS_MP3_ID3V1_1 0x00000010
#const global MP3INFP_HAS_MP3_ID3V2_2 0x00000020
#const global MP3INFP_HAS_MP3_ID3V2_3 0x00000040
#const global MP3INFP_HAS_MP3_ID3V2_4 0x00000080
#const global MP3INFP_HAS_MP3_APEV1 0x00000100
#const global MP3INFP_HAS_MP3_APEV2 0x00000200
#endif
// 終了
// サンプル開始
/* 参考 http://cult-drang.com/program/lib/use_mp3infp.pas */
dialog "mp3",16,"MPEG Layer-3"
if stat = 0 : end
fname = refstr
// ファイルのロード
mp3infp_Load hwnd , fname
// タグ種類の決定
type = ""
mp3infp_mp3_GetTagType
repeat 1
if stat&2 : type = "v2" : break
if stat&1 : type = "v1" : break
if stat&4 : type = "rmp" : break
loop
// 各種タグ情報の読み込み
/* 変数初期化(全部文字列型で) */
sdim tag_format : sdim tag_time : sdim tag_title : sdim tag_artist
sdim tag_album : sdim tag_comment : sdim tag_createday
sdim tag_genre : sdim tag_copyright : sdim tag_software
sdim tag_create : sdim tag_orgart : sdim tag_url : sdim tag_enc
sdim tag_src : sdim tag_eng : sdim tag_track
/* 共通 */
; フォーマット
mp3infp_GetValue "AFMT" , varptr(p)
dupptr tmp,p,128,2 : tag_format = tmp
; 演奏時間
mp3infp_GetValue "TIME" , varptr(p)
dupptr tmp,p,128,2 : tag_time = tmp
/* ID3v1/v2/RiffSIF */
if type = "v1" | type = "v2" | type = "rmp"{
; タイトル
mp3infp_GetValue "INAM_"+type , varptr(p)
dupptr tmp,p,128,2 : tag_title = tmp
; アーティスト
mp3infp_GetValue "IART_"+type , varptr(p)
dupptr tmp,p,128,2 : tag_artist = tmp
; アルバム
mp3infp_GetValue "IPRD_"+type , varptr(p)
dupptr tmp,p,128,2 : tag_album = tmp
; コメント
mp3infp_GetValue "ICMT_"+type , varptr(p)
dupptr tmp,p,128,2 : tag_comment = tmp
; 作成日
mp3infp_GetValue "ICRD_"+type , varptr(p)
dupptr tmp,p,128,2 : tag_createday = tmp
; ジャンル
mp3infp_GetValue "IGNR_"+type , varptr(p)
dupptr tmp,p,128,2 : tag_genre = tmp
}
/* ID3v2/RiffSIF */
if type = "v2" | type = "rmp" {
; 著作権
mp3infp_GetValue "ICOP_"+type , varptr(p)
dupptr tmp,p,128,2 : tag_copyright = tmp
; ソフトウェア/エンコーダ
mp3infp_GetValue "ISFT_"+type , varptr(p)
dupptr tmp,p,128,2 : tag_software = tmp
}
/* ID3v2 */
if type = "v2" {
; 作曲
mp3infp_GetValue "COMP_v2" , varptr(p)
dupptr tmp,p,128,2 : tag_create = tmp
; Orig.アーティスト
mp3infp_GetValue "OART_v2" , varptr(p)
dupptr tmp,p,128,2 : tag_orgart = tmp
; URL
mp3infp_GetValue "URL_v2" , varptr(p)
dupptr tmp,p,128,2 : tag_url = tmp
; エンコードした人
mp3infp_GetValue "ENC2_v2" , varptr(p)
dupptr tmp,p,128,2 : tag_enc = tmp
}
/* RIFFSIF */
if type = "rmp" {
; ソース
mp3infp_GetValue "ISRC_rmp" , varptr(p)
dupptr tmp,p,128,2 : tag_src = tmp
; エンジニア
mp3infp_GetValue "IENG_rmp" , varptr(p)
dupptr tmp,p,128,2 : tag_eng = tmp
}
/* ID3v1/v2 */
if type = "v1" | type = "v2" {
; トラック
mp3infp_GetValue "TRACK_"+type , varptr(p)
dupptr tmp,p,128,2 : tag_track = tmp
}
// 表示する
if type = "" {
mes "タグ情報がありません"
}else{
mes "タグ の バージョン = "+type
}
if tag_format!="" : mes "フォーマット\t: "+tag_format
if tag_time!="" : mes "演奏時間\t: "+tag_time
if tag_title!="" : mes "タイトル\t: "+tag_title
if tag_artist!="" : mes "アーティスト\t: "+tag_artist
if tag_album!="" : mes "アルバム\t: "+tag_album
if tag_comment!="" : mes "コメント\t: "+tag_comment
if tag_createday!="": mes "作成日\t\t: "+tag_createday
if tag_genre!="" : mes "ジャンル\t: "+tag_genre
if tag_copyright!="": mes "著作権\t\t: "+tag_copyright
if tag_software !="": mes "ソフトウェア\t: "+tag_software
if tag_orgart!="" : mes "Org.アーティスト: "+tag_orgart
if tag_url!="" : mes "URL\t\t: "+tag_url
if tag_enc!="" : mes "エンコーダ\t: "+tag_enc
if tag_src!="" : mes "ソース\t\t: "+tag_src
if tag_eng!="" : mes "エンジニア\t: "+tag_eng
if tag_track!="" : mes "トラック\t: "+tag_track
// サンプル終了