Announcement

Collapse
No announcement yet.

How do I accept text files through command line and such?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I accept text files through command line and such?

    I'm making my own text editor because it looked like a fun project. I may release it here later as an example.
    But for now, how do I open text files in it?

    This will be a good chance for me to learn how that process works from the start What part of the registry do we edit, but also how do we process the file location (all that I need or even want) as it's being launched?

    Thanks for your time.

  • #2
    Originally posted by Internetwiz View Post
    I'm making my own text editor because it looked like a fun project. I may release it here later as an example.
    But for now, how do I open text files in it?

    This will be a good chance for me to learn how that process works from the start What part of the registry do we edit, but also how do we process the file location (all that I need or even want) as it's being launched?

    Thanks for your time.
    icon = Place the icon for the extension

    Registry.SetValue(HKEY_CLASSES_ROOT,".yourextensio n","","name of your program",REG_SZ);
    Registry.SetValue(HKEY_CLASSES_ROOT," name of your program","InfoTip","This File Crated By SinaDehghani",REG_SZ);
    Registry.SetValue(HKEY_CLASSES_ROOT,"name of your program", "NeverShowExt","",REG_SZ);
    Registry.SetValue(HKEY_CLASSES_ROOT, "name of your program", "IsShortCut", "", REG_SZ);

    exe_path = Place the exe file for the extension open with this

    Registry.SetValue(HKEY_CLASSES_ROOT,"name of your program\\ DefaultIcon", "",icon..",0", REG_SZ);
    Registry.SetValue(HKEY_CLASSES_ROOT,"name of your program\\ shell\\open\\command", "",'"'..exe_path..'"'.." "..'"%1"',REG_SZ);

    This code snippet creates a custom extension, which opens with your program!

    To understand where the file is opened, it is enough to use:

    _CommandLineArgs

    Good Luck!


    Comment


    • #3
      example

      PHP Code:
      myNOTEPAD.zip 
      Attached Files

      Comment


      • #4
        Thanks a ton guys!

        Comment

        Working...
        X