CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2003
    Location
    Houston
    Posts
    8

    Move around Programs like done in Explorer

    Howdy. I am trying to automate a way to open up a bunch of files that are in a Program.

    These files are saved as text, but when opened in this Program, are pictures. These pictures are what we want to print, but they are only pictures when opened in this Program.

    Is there any way to use VB to open up this program, navigate through it to these files, and open these files. The structure is like:

    Inside Program Window
    Project
    - Controller
    - Module
    - Area
    -Picture1
    -Picture2

    Kind of off the wall, but I appreciate yalls help.
    Thanks,
    Bobby

  2. #2
    Join Date
    Sep 2003
    Posts
    46

    Re: Move around Programs like done in Explorer

    Originally posted by big33dawg
    Is there any way to use VB to open up this program, navigate through it to these files, and open these files.
    Hi,
    You can use shell and sendkeys commands but it may/will not help you all times.
    Regards,
    Thoppae.

  3. #3
    Join Date
    Dec 2001
    Posts
    6,332
    Well, firstly, I'm not quite sure what you are looking to do. Are you trying to extract the images, or cause the program to print them, or what? If you just want the images, a simple way would be to just take a screen shot. If the text files are base 64 encoded, you could probably decode them easily.

    Perhaps you should post one of the text files.
    Please remember to rate the posts and threads that you find useful.
    How can something be both new and improved at the same time?

  4. #4
    Join Date
    Nov 2003
    Location
    Houston
    Posts
    8
    I was trying to get the program to open the file to print the image to a pdf file, but the screenshot idea might be much better. I think the text file is going to be a little hard to decode, for me at least, but I will go get an example and post it. I don't know how I would draw it, but all it will be is a bunch of rectangles connected by lines. The tricky part will be the placement of the text on the connection spots of the lines. I will hopefully get it up here this morning.

    I was able to use shell to open the program, but cannot get the sendkeys to simulate going down or over or open a group of folders, etc. The only thing I was able to do was close it.

    Thank yall for the help.
    Bobby

  5. #5
    Join Date
    Oct 2003
    Location
    .NET2.0 / VS2005 Developer
    Posts
    7,104
    i'm dimly aware that you can right click a file, choose print, and windows opens the relevant app, prints to the default printeer with default settings, then closes... can you do this with your pdf?
    "it's a fax from your dog, Mr Dansworth. It looks like your cat" - Gary Larson...DW1: Data Walkthroughs 1.1...DW2: Data Walkthroughs 2.0...DDS: The DataSet Designer Surface...ANO: ADO.NET2 Orientation...DAN: Deeper ADO.NET...DNU...PQ

  6. #6
    Join Date
    Nov 2003
    Location
    Houston
    Posts
    8
    Here is a sample file. I tried to clean it up as best I could without deleting the syntax. I don't know how good an idea it will be to recreate these, because there are 1300 of these files, although this one is a worst case sample.

    I looked into using printscreen but I don't think I can use sendkeys to do that, and I don't know any other way.

    I have been able to get into the program, navigate to the file. Then I open the File Menu and go down to Print. From here I am able to open up the normal Printer Menu. I am trying to then select to print to the pdf through Distiller, I hope. But what is the syntax for telling the Message Box the name of the File you want to print?

    Once I get that I think I will be done. Again there are 1300 of these and I don't know how long this will take or if it will crash the computer. I am open to any suggestions if there is a better way. The whole purpose of this is to be able to call a file up, copy it into a report, paste its table below it, search for the next pdf, paste it into the report, paste the table, etc.

    Thank yall again for the help.
    Bobby
    Attached Files Attached Files

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

Featured