Jump to content

ControlSend on Hidden Window (with no control ID)


Recommended Posts

I am trying to automate SAP without GUI scripting enabled by doing everything through MouseClicks. It's not the cleanest solution but it works pretty well so far. I noticed that ControlClick actually has the option to put control coordinates in the parameters. I tried it and this works great since it allows me to run SAP hidden while I run my script. Unfortunately I am only able to click on objects but not send text. Is it possible to do a ControlSend on the object I used ControlClick on? The biggest problem is that there is no control ID on the object since SAP groups everything into one window with weird class IDs (which I cannot find out since I do not have GUI scripting enabled). I've been searching for a solution for a while now and any help would be appreciated!

 

Thanks!

Link to comment
Share on other sites

Hi Deye,

At first I made a silly mistake and literally put in "[AdvancedMode]" into my code... I was super confused why it wasn't working.

Interestingly, your code (and my original code) works but only when the window is active somewhere on the screen. I guess SAP is one of those programs that only listens to keystrokes when onscreen. I run two monitors so it's not a deal breaker but now I know my problem!

Thank you for all your help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...