#๐ roblox doesn't detect mouse movement onto buttons
8 messages ยท Page 1 of 1 (latest)
@surreal mortar
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
import pyautogui, time, win32gui, pywinauto, pydirectinput, win32api, win32con, autoit
class Buyer:
def __init__(self):
self.mainFunction()
def keepRobloxActive(self):
# brings ROBLOX to the foreground
try:
pywinauto.application.Application().connect(best_match='Roblox').top_window().set_focus()
time.sleep(1)
except:
input("Unable to detect ROBLOX, are you sure it's open?")
def locateSeedButton(self):
# finds the seeds button coordinates to know where to click
try:
seedButton = pyautogui.locateOnScreen('images/seeds.png', confidence=0.8)
x, y = seedButton.left, seedButton.top
pyautogui.moveTo((x+10,y+10), duration=5)
time.sleep(0.1)
pyautogui.leftClick()
except:
input('Unable to detect the seed button, resolution might be incorrect')
def mainFunction(self):
self.keepRobloxActive()
self.locateSeedButton()
Buyer()
What Roblox game is this for?
!rule tos
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.