Ma`lumotlar : 1092
Xabarlar soni: 591
Bugun: 16.11.2026
Soat: 21:44
AutoPlay Media Studio da pdf faylni ochish
Muallif: Mengliyev Sh.
Qo`shilgan sana: 2016-02-29
AutoPlay Media Studio da pdf faylni ochish
AutoPlay katalogi yonidan PDFs katalogini Category1 Category2 va CategoryN hosil qiling va uning ichiga document1.pdf, docume nt2.pdf va documentN.pdf ihtiyoriy katalog ichiga istalgan pdf kengaytmali faylni hosil qiling ko`rsatilgan nom bilan.
Dastur tuzilishi bizda Tree1 va PDF1 obektni olamiz va Page1 ga sichqonchaning o`ng tugmasini bosib Porperties bo`limini tanlang va Script ga quyidagi kodni joylashtiring.
sFirstPDFToLoad = "";
function AddToTree(sFullPath)
if (sFirstPDFToLoad == '') then
sFirstPDFToLoad = sFullPath;
end
tPathParts = String.SplitPath(sFullPath);
nRootLength = String.Length(sPDFRootFolder);
sFullFolderPath = tPathParts.Drive .. tPathParts.Folder;
nFullFolderPathLength = String.Length(sFullFolderPath);
sFullFolderPath = String.Mid(sFullFolderPath, 1, nFullFolderPathLength - 1);
if(String.Compare(sPDFRootFolder, sFullFolderPath) == 0) then
tNodeData = {};
tNodeData['Text']=tPathParts.Filename;
tNodeData['Data']=sFullPath;
tNodeData['ImageIndex']="0";
Tree.InsertNode("Tree1", Tree.GetChildCount("Tree1", "0") + 1, tNodeData);
else
sSearchString = tPathParts.Folder;
sSearchString = String.TrimRight(sSearchString, '\\');
nPosLastSlash = String.ReverseFind(sSearchString, '\\');
sSearchString = String.Mid(sSearchString, nPosLastSlash + 1, -1);
sFoundNodeIndex = Tree.FindNodeByText("Tree1", "0", sSearchString);
if sFoundNodeIndex == "" then
tNodeData = {};
tNodeData['Text']=sSearchString;
tNodeData['Data']="";
tNodeData['ImageIndex']="1";
sParentIndex = Tree.GetChildCount("Tree1", "0") + 1;
Tree.InsertNode("Tree1", sParentIndex, tNodeData);
else
sParentIndex = sFoundNodeIndex;
end
tNodeData = {};
tNodeData['Text']=tPathParts.Filename;
tNodeData['Data']=sFullPath;
tNodeData['ImageIndex']="0";
Tree.InsertNode("Tree1", sParentIndex .. "." .. (Tree.GetChildCount("Tree1", sParentIndex) + 1), tNodeData);
end
return true;
end
File.Find(sPDFRootFolder, "*.pdf", true, false, nil, AddToTree);
PDF.LoadFile("PDF1", sFirstPDFToLoad);
Tree1 obektga sichqoncha bilan ikkimarta bosib script ga quyidagi kodni joylashting.
if e_NodeIndex then
tNodeData = Tree.GetNode("Tree1", e_NodeIndex);
if tNodeData then
if (tNodeData['Data'] ~= '') then
PDF.LoadFile("PDF1", tNodeData['Data']);
end
end
end
3734 marta o`qildi.