Jump to content

Uzantıya Göre İşlem


korasoglu
 Share

Recommended Posts

Arkadaşlar Dialog.FileBrowse ile seçilen dosyanın uzantısı ne ise ona göre işlem nasıl yaptırabilirim. Yani Txt ise Merhaba Fdf ise Selam gibi yeterli.

 

Arkadaşlar saçma mı olur bilmiyorum ama web nesnesi Iexlorer Plugininin alternatifi varmı firefoxun açtığını ie açmıyorda.

Edited by korasoglu
Link to comment
Share on other sites

tDosya = Dialog.FileBrowse(true, "Dosya Seçin", _DesktopFolder, "Tüm Dosyalar (*.*)|*.*|", "", "", false, true) -- dosya seç
if tDosya[1] ~= "CANCEL" then -- eğer iptale basılmamışsa
tSplit = String.SplitPath(tDosya[1]) -- dosyayı sürücü, klasor, dosyaadı ve uzantı olarak ayır
	if tSplit.Extension == ".txt" then -- eğer uzantı txt ise
	Dialog.Message("", "Bu bir Metin Belgesidir.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1)
	elseif tSplit.Extension == ".exe" then -- eğer dosya exe ise
	Dialog.Message("", "Bu bir Uygulama dosyasıdır..", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1)
	elseif tSplit.Extension == ".pdf" then -- eğer dosya pdf ise
	Dialog.Message("", "Bu bir PDF dosyasıdır..", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1)
	else -- eğer yukarıdaki seçeneklerden hiçbiri değilse
	Dialog.Message("", "Bu dosya uzantısı bilinmiyor.", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1)
	end
end	

 

Web nesnesi sorunlu bir nesne. IExplorer kullanmanızı öneririm.

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...