Jump to content

Seçmeli Program


 Share

Recommended Posts

merhaba arkadaşlar AMS ile kur hazırlıyorum biraz yardıma ihtiyacım var kintaro'nun hazırladığı ProBox

sa benzer bi kur hazırlamam gerekiyor yani onunki kadar olmasada kur açıldıktan sonra içine program atma 

seçmeli kura benzer işlevler yapacak bir projeye ihtiyacım var teşekkürler.

Link to comment
Share on other sites

@murat3246683  kardeşim çok saol ama projeyi açıtığımda "TREELIST" diye bi eksiklikten sözediyor bunu

nasıl gidereceğim

 

pre_1399973605__ibrahim_afin.jpg

Edited by systembilisim
Link to comment
Share on other sites

arkadaşlar program normal açılıyor ama program ekle diyorum ekleyeceğim programı seçiyorum ekleme bittikten sonra bu hatayı alıyorum

 

 

pre_1399981921__d.jpg


burda yanlı birşeylermi var anlamadım 

 

[spoiler]nSec = TreeList.GetSelected("Plugin1")
if nSec ~= -1 then

tblMenu = {};


tblMenu[1] ={};
tblMenu[1].Text = "Programı Sil";
tblMenu[1].ID = 100;
tblMenu[1].IconID = 11;
tblMenu[1].Checked = false;
tblMenu[1].Enabled = true;

tblMenu[2] ={};
tblMenu[2].Text = "Yeniden Adlandır";
tblMenu[2].ID = 101;
tblMenu[2].IconID = 1;
tblMenu[2].Checked = false;
tblMenu[2].Enabled = true;





ptMouse = System.GetMousePosition(false, nil);

nRes = Application.ShowPopupMenu(ptMouse.X, ptMouse.Y, tblMenu, TPM_RIGHTALIGN, TPM_TOPALIGN, true, false);

if(nRes == 100)then
---- Program Sil
nSec = TreeList.GetSelected("Plugin1");
nText = TreeList.GetCellText("Plugin1", nSec, 1);
result = Dialog.Message(""..nText.." Siliniyor", ""..nText.." Adlı Programı Silmek İstediğinizden Eminmisiniz?.", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);
if result == 6 then
File.Delete(_SourceFolder.."\\AutoPlay\\Docs\\Programlar\\"..nText..".exe", false, false, false, nil);
elseif result == 7 then
end
Program.Listele();
end

if(nRes == 101)then

nSec = TreeList.GetSelected("Plugin1");
nText = TreeList.GetCellText("Plugin1", nSec, 1);
result = Dialog.Input("Yeniden Adandır", "Program Adı:", ""..nText.."", MB_ICONQUESTION);
if result == "CANCEL" then
else
File.Rename(_SourceFolder.."\\AutoPlay\\Docs\\Programlar\\"..nText..".exe" , _SourceFolder.."\\AutoPlay\\Docs\\Programlar\\"..result..".exe", "");
end
Program.Listele();
end


else

tblMenu = {}
tblMenu[1] = {}
tblMenu[1].Text = "Programı Ekle";
tblMenu[1].ID = 102;
tblMenu[1].IconID = 11;
tblMenu[1].Checked = false;
tblMenu[1].Enabled = true;

tblMenu[2] = {}
tblMenu[2].Text = "Yenile";
tblMenu[2].ID = 103;
tblMenu[2].IconID = 1;
tblMenu[2].Checked = false;
tblMenu[2].Enabled = true;

ptMouse = System.GetMousePosition(false, nil);

nRes = Application.ShowPopupMenu(ptMouse.X, ptMouse.Y, tblMenu, TPM_RIGHTALIGN, TPM_TOPALIGN, true, false);


if (nRes == 102) then

Sec = Dialog.FileBrowse(true, "Program Seçiniz..", _DesktopFolder, "Katılımsız Programlar|*.exe|", "", "dat", true, false);
if Sec[1] ~= "CANCEL" then
cnt = Table.Count(Sec);
for i,v in pairs (Sec) do
Split = String.SplitPath(v);
function FileProgress(Source, Destination, Copied, Total, FileCopied, FileTotal)
Progress.SetCurrentPos("Progress1", (Copied / Total) * 100);
isim = String.SplitPath(Destination).Filename..String.SplitPath(Destination).Extension
kopya = String.GetFormattedSize(Copied, FMTSIZE_MB, true)
toplam = String.GetFormattedSize(Total, FMTSIZE_MB, true)
yuzde = Math.Floor((Copied / Total) * 100);
Progress.SetText("Progress1", "["..i.."/"..cnt.."]".."%"..yuzde.." "..isim.." Kopyalanıyor ["..kopya.."/"..toplam.."]");
Progress.SetCurrentPos("Progress1", ((Copied/Total) * 100));
return true
end

Progress.SetProperties("Progress1", {TooltipText = "Kopyalanan Program : "..Split.Filename } );
File.Copy(v, _SourceFolder.."\\AutoPlay\\Docs\\Programlar\\"..Split.Filename..".exe", true, true, false, true, FileProgress);
Progress.SetText("Progress1", "");
Progress.SetCurrentPos("Progress1", 0);
Progress.SetProperties("Progress1", {TooltipText = ""});
end
end
Program.TreeList();
Program.Listele();
Program.Say()
end


if (nRes == 103) then
Program.TreeList();
Program.Listele();
Program.Say()
end

end[/spoiler]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...