Jump to content

Bir Programla Birlikte Aç Yapınca Onn Içrğni Oktma


hakanight
 Share

Recommended Posts

Merhaba,

Mesela uzantısı txt olan bir dosyamız var.

O dosyayı benim yaptığım program ile birlikte aç yapınca o txt dosyasını okumasını istiyorum.

Mesela hakan.txt diye bir dosyamız var.

Ona sağ tıklayıp birlikte aç yaptık.

Ve benim yaptığım programı seçtik.

Benim yaptığım program o hakan.txt ile açıldığını nerden okuyacak?

Yani onun içeriğini nasıl okuyacak.

{Lütfen Fileread demeyin. Fileread ile okutulduğunu biliyorum fakat o birlikte açılan dosyanın dosyanın adını,konumunu nerden bulucam?}

Link to comment
Share on other sites

AutoIt kodları:

If $cmdline[0] = 0 Then ; parametre ile açılmadıysa yap
	Exit
EndIf
 
$read = FileRead($cmdline[1]) ; parametredeki dosyayı oku

MsgBox(0, "Abc Programı", $read)

 

Reg Kayıtları

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.txt\shell]

[HKEY_CLASSES_ROOT\.txt\shell\runas]
@="Abc ile aç"

[HKEY_CLASSES_ROOT\.txt\shell\runas\command]
@="\"C:\\abc.exe\" \"%1\""
Edited by reyiz
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...