2025年2月27日 星期四

VEX 用60邊形模擬圓

 




VR Sample

 


pyautogui sample 1A

 import pyautogui

import datetime,time


def clickpng(filename,waitsec):

    time.sleep(waitsec)

    x,y,w,h = pyautogui.locateOnScreen(filename)

    (x1,y1)=pyautogui.center((x,y,w,h))

    pyautogui.click(x1,y1)


clickpng('b3.png',1)

clickpng('b1.png',1)

clickpng('b2.png',1)

clickpng('b6.png',3)

clickpng('b7.png',3)

clickpng('b8.png',1)

clickpng('b9.png',1)


td = datetime.datetime.now()

strtd = f'{td.year}-{td.month}-{td.day}ex1'

pyautogui.typewrite(strtd)


clickpng('b10.png',3)






pyautogui sample

 Created on Thu Feb 27 09:04:56 2025


@author: jack

"""

import pyautogui

import datetime,time


x,y,w,h = pyautogui.locateOnScreen('b3.png')

p=(x1,y1)=pyautogui.center((x,y,w,h))

pyautogui.click(x1,y1)




x,y,w,h = pyautogui.locateOnScreen('b1.png')

p=(x1,y1)=pyautogui.center((x,y,w,h))

pyautogui.click(x1,y1)


x,y,w,h = pyautogui.locateOnScreen('b2.png')

p=(x1,y1)=pyautogui.center((x,y,w,h))

pyautogui.click(x1,y1)


time.sleep(3)


x,y,w,h = pyautogui.locateOnScreen('b6.png')

p=(x1,y1)=pyautogui.center((x,y,w,h))

pyautogui.click(x1,y1)


time.sleep(3)

x,y,w,h = pyautogui.locateOnScreen('b7.png')

p=(x1,y1)=pyautogui.center((x,y,w,h))

pyautogui.click(x1,y1)


time.sleep(3)

x,y,w,h = pyautogui.locateOnScreen('b8.png')

p=(x1,y1)=pyautogui.center((x,y,w,h))

pyautogui.click(x1,y1)



time.sleep(3)

x,y,w,h = pyautogui.locateOnScreen('b9.png')

p=(x1,y1)=pyautogui.center((x,y,w,h))

pyautogui.click(x1,y1)


td = datetime.datetime.now()

strtd = str(td.year)+ '-' + str(td.month) + '-' + str(td.day) + 'ex1'


pyautogui.typewrite(strtd)


time.sleep(3)

x,y,w,h = pyautogui.locateOnScreen('b10.png')

p=(x1,y1)=pyautogui.center((x,y,w,h))

pyautogui.click(x1,y1)

2025年2月18日 星期二

https://instructions.online/?id=4063-v5_clawbot

 https://instructions.online/?id=4063-v5_clawbot

2025年2月11日 星期二

柏林邏輯推理

 '''

country,挪威,瑞典,丹麥,德國,英國,

like,狗,鳥,貓,馬,魚

house,藍,紅,綠,白,黃

drink,茶,咖啡,啤酒,牛奶,水

smoke,Prince,Pall_Mall,Dunhill,Blue_Master,Blend

'''

countries = '挪威,瑞典,丹麥,德國,英國'.split(',')

likes = '狗,鳥,貓,馬,魚'.split(',')

houses = '藍,紅,綠,白,黃'.split(',')

drinks = '茶,咖啡,啤酒,牛奶,水'.split(',')

smokes = 'Prince,Pall_Mall,Dunhill,Blue_Master,Blend'.split(',')

c = 1

for country in countries:

  for like in likes:

    for house in houses:

      for drink in drinks:

        for smoke in smokes:

          if country == '英國' and house != '紅':continue

          if country != '英國' and house == '紅':continue

          if country != '瑞典' and like == '狗':continue

          if country == '瑞典' and like != '狗':continue

          print(c,country,like,house,drink,smoke)

          c = c + 1