Jump to content

Ams'de Dosya Kopyalama


ugur4721
 Share

Recommended Posts

sIni = INIFile.GetValue("AutoPlay\\Docs\\ini.ini", "copy", "COPY1");
sAdres = Dialog.FileBrowse(true, "Simge Seçin", _DesktopFolder, "exe uzantılı dosyalar (.exe)|*.exe|", sIni, "dat", false, true);

StatusDlg.Show(MB_ICONEXCLAMATION, false)
File.Copy(sAdres[1], "C:\\", true, true, false, true, nil);
StatusDlg.Hide ()
 

şu yukarıdaki kod dizisinde hedef C:\\ 
ben hedefi Autoplay\\Docs olarak değiştirmek istiyorum bir türlü beceremedim, fikri olan varmı?

Link to comment
Share on other sites

Dark_Angel, 28.08.2017 - 02:24 yazdı:

"C:\\" yerine


_SourceFolder .. "\\AutoPlay\\Docs"

yazman yeterli, ayrıca sIni , sAdres gibi geçici değişkenleri local olarak tanımla ve "dat"'da sAdresten sil

peki kopyalanan dosyanın ismini iniye yazmam gekekiyor sAdres[1] yi ini ye yazdırınca tam yolu iniye yazıyor bana sadece kopyalanan dosyanın ismi lazım 

2. si ise: 1  dialogEx te on closed bölümüne şu aşağıdaki kodu yazacağım bu kod ile Chekbox ın ismini güncellemiş olacağım ama o chekbox diğer bir dialogEx sayfasında. Ben bir sayfadan diğer bir dialogEx sayfasına nasıl bu şekilde müdahale edebilirim

sAD = INIFile.GetValue("AutoPlay\\Docs\\AIO.ini", "1", "AD")
sVERSIYON = INIFile.GetValue("AutoPlay\\Docs\\AIO.ini", "1", "VERSIYON")
CheckBox.SetProperties("CheckBox1", {Text=sAD .. " " .. sVERSIYON});

 

Link to comment
Share on other sites

dosya yolunundan ismi almak için

local dosya_ismi = String.SplitPath(sAdres[1]).Filename;

AMS de bir dialogex ten diğerine müdahele edemezsin  multiwindow desteği olmadığı için sadece değişkenler arası işlemler yapabilirsin globale tanımlamalar yaparak

  • Like 1
Link to comment
Share on other sites

şu şekilde bir şey deneyebilirsin , globale bir değişken koy örneğin:

set_ch_prop = 0;

ilgili dialogex on close kısmına

set_ch_prop = 1;
sAD = INIFile.GetValue("AutoPlay\\Docs\\AIO.ini", "1", "AD");
sVERSIYON = INIFile.GetValue("AutoPlay\\Docs\\AIO.ini", "1", "VERSIYON");

checkboxun olduğu dialogex on show kısmına

if set_ch_prop ~= 0 then
    CheckBox.SetProperties("CheckBox1", {Text=sAD .. " " .. sVERSIYON});
end

bu şekilde olması lazım

Edited by Dark_Angel
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...