本文整理汇总了Python中Mouse.rightClickAtP方法的典型用法代码示例。如果您正苦于以下问题:Python Mouse.rightClickAtP方法的具体用法?Python Mouse.rightClickAtP怎么用?Python Mouse.rightClickAtP使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mouse
的用法示例。
在下文中一共展示了Mouse.rightClickAtP方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _launch
# 需要导入模块: import Mouse [as 别名]
# 或者: from Mouse import rightClickAtP [as 别名]
def _launch(group):
result = None
while not result:
mouse.moveToP(panel.center(panel.Drones))
mouse.wheel(100)
mouse.moveToP(panel.center(panel.Full))
result = findAtDrones('bay')
if group == None:
mouse.rightClickAtP(result)
else:
if not findAtDrones(group):
mouse.leftClickAtP(result)
result = findAtDrones(group)
while not result:
time.sleep(0.5)
result = findAtDrones(group)
mouse.rightClickAtP(result)
result = findAtDrones('launch_drones')
while not result:
time.sleep(0.5)
result = findAtDrones('launch_drones')
mouse.leftClickAtP(result)
print 'wait until drones launching..'
mouse.moveToP(panel.center(panel.Full))
# time.sleep(5)
while not findAtDrones('idle') and not findAtDrones('fighting') and not findAtDrones('returning'):
mouse.moveToP(panel.center(panel.Drones))
mouse.wheel(-100)
mouse.moveToP(panel.center(panel.Full))
if not findAtDrones('idle') and not findAtDrones('fighting') and not findAtDrones('returning'):
result = findAtDrones('local_space')
if result:
mouse.leftClickAtP(result)
mouse.wheel(-100)
mouse.leftClickAt(result[0], result[1] + 20)
return True
示例2: activateShip
# 需要导入模块: import Mouse [as 别名]
# 或者: from Mouse import rightClickAtP [as 别名]
def activateShip(ship):
print '--> activate ship "' + ship + '"'
key.pressEx(sc.ShipHangar)
time.sleep(3)
result = None
while not result:
time.sleep(0.5)
result = findAtInventory(ship)
mouse.rightClickAtP(result)
mouse.moveTo(result[0] + 200, result[1])
result = findAtInventory('make_active')
if result:
mouse.leftClickAtP(result)
key.pressEx(sc.ShipHangar)
time.sleep(2)
print '<-- activate ship "' + ship + '"\n'
return True