Ask Experts Questions for FREE Help !
Ask
    Seveley's Avatar
    Seveley Posts: 6, Reputation: 1
    New Member
     
    #1

    Apr 22, 2009, 03:44 AM
    Reading in another process
    Hi,

    I am currently working on a scripting engine and I remembered that when I was young a program exist that could read the object inside any program and modify its content. For example I was able to enable or disable a button in the other application.

    I would need this particular hability so my scripting engine can read the application status prior to take an automated action.

    So if anyone know anything about pooling information from objects in a given process, I'll be glad to hear about it.

    Thank you all in advance

    Seveley

    P.S. program is in VB .net 2008
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #2

    Apr 22, 2009, 09:17 AM

    Are you wanting to read the state of a button inside another program and act on that? Are you the one writing the program with the button in it?
    Seveley's Avatar
    Seveley Posts: 6, Reputation: 1
    New Member
     
    #3

    Apr 22, 2009, 09:27 AM
    Quote Originally Posted by Perito View Post
    Are you wanting to read the state of a button inside another program and act on that? Are you the one writing the program with the button in it?
    Yes actually the goal is to probe in a windows to read the information inside the other application to take decision before acting on the probed application to fully automate some process. It would be a interpreter that execute a script that tell what to probe and take decision on that info and then act on object on the other app.
    Seveley's Avatar
    Seveley Posts: 6, Reputation: 1
    New Member
     
    #4

    Apr 22, 2009, 09:29 AM

    Sorry forgot to say I'm not the one who wrote the application I want to control.
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #5

    Apr 22, 2009, 11:24 AM

    Windows tries very hard to isolate one program from another -- it's very different from what happened in Windows 3.1 or earlier. If your program somehow owns the program you want to access, then you can probably accomplish your goal. However, unless that program has already exposed some API to let you see what's going on inside it, I doubt you will be able to do that.
    Seveley's Avatar
    Seveley Posts: 6, Reputation: 1
    New Member
     
    #6

    Apr 22, 2009, 05:02 PM

    OK I get what you mean...

    If I do the assumption that lunching the target program from my application creates ownership relation between my application and the target process, am I wrong ?
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #7

    Apr 22, 2009, 07:41 PM

    Sometimes there is some kind of ownership relation that is generated. I fooled with it once, but it's been a long time and I don't quite remember all of the ins and outs. When you call "CreateProcess" (from the Windows API) to launch the program, you can probably set it up to give you privileges. Then, you might be able to get into the program -- depending on what type it is. If it were a .NET program, you could use reflection to get into it.
    Seveley's Avatar
    Seveley Posts: 6, Reputation: 1
    New Member
     
    #8

    Apr 23, 2009, 04:29 AM

    I read about Reflection it sounds interesting but for portability I don't want to be limited to .NET program. So is there a way to read generic hwnd structure and properties that don't depend on the technology used to create the application ?

    Also read about CreateProcess and some forum argue that the System.Diagnostics.Process is equivalent. I already used this class but never saw any privilege parameter. So I'm continuing to look for CreateProcess syntax to get privilege.
    Perito's Avatar
    Perito Posts: 3,139, Reputation: 150
    Ultra Member
     
    #9

    Apr 23, 2009, 05:23 AM

    I'm still not sure that CreateProcess will do what you want, but it's where I would start looking. There are some security structures in there, and maybe it will let you have access to the program, though I still don't know how you'll get the information you need.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Reading into it too much? [ 8 Answers ]

I actually had a decent conversation with my ex the other day about our dog. She called me honey twice during the conversation. Is this habit or am I reading into it too much?

Am I reading too much into this? [ 4 Answers ]

First of all thanks for any opinions I get on this. I have been married for 3 years and have known him for over 4. During our dating period he cheated on me, (2 times) I caught him, and was ready to leave, he convinced me to give him another chance he loved me and wanted to change. I must say...

I need a reading [ 6 Answers ]

Does anyone do psychic readings that's able to help me ? Thanku

Am I reading it too much? [ 4 Answers ]

Jason is my friend's friend and I am interested in him. We went out last week in a group and jason asked if I knew that my friend (david) likes me and stuff. I told Jason that David and I are just friends and Jason called me later that week and we talked for a short while but never called me...


View more questions Search