Results 1 to 6 of 6

Thread: Read file content from notepad. Not from file. From notepad.

  1. #1

    Thread Starter
    Addicted Member Kamienios's Avatar
    Join Date
    Dec 2009
    Location
    Warsaw, Poland
    Posts
    159

    Read file content from notepad. Not from file. From notepad.

    Hi,

    I need to read txt file content. Problem is that all txt files are automatically encrypted with corporate software, and it`s content can`t be read with streamreader from file. Content is beeing decrypted by corporate soft and shown when opened with notepad.


    Is there a way to read data from notepad?

    Many thanks

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,479

    Re: Read file content from notepad. Not from file. From notepad.

    you can do that with several API functions.
    the call to FindWindow takes the window caption as the 2nd parameter, in this case it's "Untitled - Notepad":
    Code:
    <Code snippet removed by Moderator>

  3. #3
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,479

    Re: Read file content from notepad. Not from file. From notepad.

    but i'm sure now you've described the problem incorrectly as notepad doesn't support encrypting + decrypting files...

  4. #4

    Thread Starter
    Addicted Member Kamienios's Avatar
    Join Date
    Dec 2009
    Location
    Warsaw, Poland
    Posts
    159

    Re: Read file content from notepad. Not from file. From notepad.

    Hi,
    I wrote that corporate soft is decrypting the files when they are opened with notepad. If I open them with streamreader they are decrypted.
    Why the code snipped has been removed?

  5. #5
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,479

    Re: Read file content from notepad. Not from file. From notepad.

    well I know how to do it ...even if no one else does

  6. #6
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Read file content from notepad. Not from file. From notepad.

    Yes there is a way you can get the content out of a window. However to me that sounds like your trying to bypass a security measure set in place by your company. Having discussions on how to bypass software security is something that we don't allow in this forum and that is clearly stated in our AUP. Because of that reason I've edited .paul.'s reply above and I'm going to close this thread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width