Mac에서는 "iTunes Music Library.xml"파일에서 특정 노래의 "영구 ID"를 추출한 다음 AppleScript를 사용하여 해당 노래를 재생할 수 있습니다 like :HEX iTunes 영구 ID를 높거나 낮은 32 비트 형식으로 변환
tell application "iTunes"
set thePersistentId to "F040658A7687B12D"
set theSong to (some track of playlist "Music" whose persistent ID is thePersistentId)
play theSong with once
end tell
PC에서 필자는 같은 방식으로 XML 파일에서 "Persistent ID"를 추출 할 수 있습니다. iTunes COM 인터페이스에 대한 문서에서는 "ItemByPersistentId"함수는 "highID"(64 비트 영구 ID의 상위 32 비트)와 "lowID"(64 비트 영구 ID의 하위 32 비트)라는 두 개의 매개 변수를 가지고 있다고 말합니다. . 그러나 16 진수 기반 값을 ItemByPersistentId 함수가 원하는 높은 32 비트 값과 낮은 32 비트 값으로 변환하는 방법을 알 수는 없습니다.
var thePersistentId = "F040658A7687B12D";
var iTunes = WScript.CreateObject("iTunes.Application");
var n = parseInt(thePersistentId);
var high = (do something with n?);
var low = (do something else with n?);
iTunes.LibraryPlaylist.tracks.ItemByPersistentId(high,low).play();
코드를 시험하고 테스트 할 수있는 특정 예제 ID가 있습니까? – Hemlock
예제 iTunes의 영구 ID : F040658A7687B12D, 9CA9C40E86124232, 1489F2F36DA31F95 (모두 16 자입니다.) – cloudbrain