Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The process ID is not available #644

Open
1 of 3 tasks
qq1792569310 opened this issue Mar 1, 2024 · 0 comments
Open
1 of 3 tasks

The process ID is not available #644

qq1792569310 opened this issue Mar 1, 2024 · 0 comments

Comments

@qq1792569310
Copy link

qq1792569310 commented Mar 1, 2024

  • Robotgo version (or commit ref): "v1.00.0.1189, MT. Baker!"
  • Go version: 1.21.5
  • Gcc version: 11.2.0
  • Operating system and bit: windows11 64
  • Resolution:
  • Can you reproduce the bug at Examples:
    • Yes (provide example code)
    • No
    • Not relevant
  • Provide example code:
//get the current process ID
pid := robotgo.GetPid()
//get the title of the current window
title := robotgo.GetTitle()   // succeed
//Pass in the process ID to get the window title
title2:=robotgo.GetTitle(pid)   // fail
//Press A once
robotgo.KeyTap("a")   // succeed
//Pass in the process ID and press A once
robotgo.KeyTap("a", pid)   // fail

Description

In the above code, functions that do not pass in the process ID can be executed normally, for example, 'title' can get the correct title, and the key A can also be triggered normally.
However, when the process ID is passed, the obtained 'title' is an empty string, and the key 'A' will not be triggered normally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant