Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to access Advanced Class with API

How to access Advanced Class with API

Scheduled Pinned Locked Moved C#
questioncsharpjsonhelptutorial
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 10603967
    wrote on last edited by
    #1

    Hi, I am able to use API DllImport("user32.dll") for FindWindow, GetCursorPosition then use sendkys to enter some number\text into an other GUI application ... through its Title & Class (ie: Windows Calculator! However if I don't use API Mouse to move in other sections ... I can't not go directly them (with Autoit I can use with Title & Advanced Class = Advanced (Class): [CLASS:Button; INSTANCE:72] ) My question is there any way I can do that with Vsual C# and How? Thanks to any help

    D 1 Reply Last reply
    0
    • U User 10603967

      Hi, I am able to use API DllImport("user32.dll") for FindWindow, GetCursorPosition then use sendkys to enter some number\text into an other GUI application ... through its Title & Class (ie: Windows Calculator! However if I don't use API Mouse to move in other sections ... I can't not go directly them (with Autoit I can use with Title & Advanced Class = Advanced (Class): [CLASS:Button; INSTANCE:72] ) My question is there any way I can do that with Vsual C# and How? Thanks to any help

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Well, it AutoIt, there is code behind the scenes that is parsing and interpreting that "Advanced (Class): [CLASS:Button, INSTANCE:72])" stuff. There is NOTHING in the Windows API that has any idea what that string means or what to do with it. You're asking about how to write the code that AutoIt has inside that does just that. For that, you would have to ask the people who wrote AutoIt. Good luck with that!

      A guide to posting questions on CodeProject

      How to debug small programs
      Dave Kreskowiak

      U 2 Replies Last reply
      0
      • D Dave Kreskowiak

        Well, it AutoIt, there is code behind the scenes that is parsing and interpreting that "Advanced (Class): [CLASS:Button, INSTANCE:72])" stuff. There is NOTHING in the Windows API that has any idea what that string means or what to do with it. You're asking about how to write the code that AutoIt has inside that does just that. For that, you would have to ask the people who wrote AutoIt. Good luck with that!

        A guide to posting questions on CodeProject

        How to debug small programs
        Dave Kreskowiak

        U Offline
        U Offline
        User 10603967
        wrote on last edited by
        #3

        Might be the wau I asking is not right, I do work well with Autoit ... but I have to work with Visual C# now! I am not expert in Cisual C#, that why I would like to know there is a similiar way to access direct an instance of a GUI or not? I thought Visual C# a well-known SW should have a better way than a free Autoit environment (it can't even build a DLL or a distribution application) If there isn't a way, then I will have to use then I will use mouse method to move to the area I want to access ... but this ia the bad way, well if the people move the GUI or change the screen resolution ... the mouse will move to wrong position :sigh: I hope that you aren't upset because of a people who just wants to know there is any thing available :^)

        1 Reply Last reply
        0
        • D Dave Kreskowiak

          Well, it AutoIt, there is code behind the scenes that is parsing and interpreting that "Advanced (Class): [CLASS:Button, INSTANCE:72])" stuff. There is NOTHING in the Windows API that has any idea what that string means or what to do with it. You're asking about how to write the code that AutoIt has inside that does just that. For that, you would have to ask the people who wrote AutoIt. Good luck with that!

          A guide to posting questions on CodeProject

          How to debug small programs
          Dave Kreskowiak

          U Offline
          U Offline
          User 10603967
          wrote on last edited by
          #4

          Might be the way I asking wasn't right, I do work well with Autoit ... but I have to work with Visual C# now! I am not expert in Visual C#, that was why I would like to know there is a similiar way to access direct an instance of a GUI or not? I thought Visual C# a well-known SW should have a better way than a free Autoit (it can't even build a DLL or a distribution application) If there isn't a way, then I will have to use mouse method to move to the area I want to access ... but this ia the bad way, because if the people move the GUI to other position or change the screen resolution ... the mouse will move to wrong location :(( I hope that you aren't upset because of a people who just wants to know there is any thing available :doh:

          D 1 Reply Last reply
          0
          • U User 10603967

            Might be the way I asking wasn't right, I do work well with Autoit ... but I have to work with Visual C# now! I am not expert in Visual C#, that was why I would like to know there is a similiar way to access direct an instance of a GUI or not? I thought Visual C# a well-known SW should have a better way than a free Autoit (it can't even build a DLL or a distribution application) If there isn't a way, then I will have to use mouse method to move to the area I want to access ... but this ia the bad way, because if the people move the GUI to other position or change the screen resolution ... the mouse will move to wrong location :(( I hope that you aren't upset because of a people who just wants to know there is any thing available :doh:

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            Member 10636998 wrote:

            I would like to know there is a similiar way to access direct an instance of a GUI or not

            No, there isn't. The only way you've got is the one you're already using, FindWindow, ...

            A guide to posting questions on CodeProject

            How to debug small programs
            Dave Kreskowiak

            U 1 Reply Last reply
            0
            • D Dave Kreskowiak

              Member 10636998 wrote:

              I would like to know there is a similiar way to access direct an instance of a GUI or not

              No, there isn't. The only way you've got is the one you're already using, FindWindow, ...

              A guide to posting questions on CodeProject

              How to debug small programs
              Dave Kreskowiak

              U Offline
              U Offline
              User 10603967
              wrote on last edited by
              #6

              Hi Dave, In this case I don't have to search for it any more! Thanks for the confirmation.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups