coordinate_finder_v1.py

Created by philippelestro

Created on September 23, 2023

1.35 KB

English below

Script très simple d’utilisation permettant de trouver n’importe quelle coordonée de l’écran avec un pixel qui se déplace. Les controles d’affichent au début du programme. Le script ne marche pas dans l’émulateur

Super easy to use script that helps finding any coordinate on the screen with a moving pixel. Controls show up when you start the program. The script doesn’t work in the emulator


print("input 0 to skip")
x = 0
y = 0
x = input("x = ")
y = input("y = ")
x = int(x)
y = int(y)
num = 1
from math import *
from kandinsky import *
from ion import *
from time import *
print("""
arrows : move pixel

exe : print coordinates (x, y) in console
(with counter)

0 : quit

shift : update screen/start

when pixel reach the side of the
screen, it tp to the other side""")
def update():
  fill_rect(0,0,320,222,color(255,255,255))
  draw_string("x = {}".format(x),235,15)
  draw_string("y = {}".format(y),235,35)
  draw_string("Num = {}".format(num),235,55)
#  set_pixel(x,y,color(255,0,0))
  fill_rect(x-1,y-1,2,2,color(0,0,0))
def delay(time=0.01):
  sleep(time)
while True:
  if keydown(KEY_LEFT):
    x -= 1
    delay()
    update()
  if keydown(KEY_RIGHT):
    x += 1
    delay()
    update()
  if keydown(KEY_UP):
    y -= 1
    delay()
    update()
  if keydown(KEY_DOWN):
    y += 1
    delay()
    update()
  if keydown(KEY_EXE):
    print("Number {} :".format(num))
    num += 1
    print("{}, {}".format(x, y))
    update()
    delay(0.5)
  if keydown(KEY_ZERO):
    fill_rect(0,0,320,222,color(255,255,255))
    draw_string("press ok",120,100)
    break
  if keydown(KEY_SHIFT):
    update()
  if x < 0:
    x = 320
    update()
  if x > 320:
    x = 0
    update()
  if y < 0:
    y = 222
    update()
  if y > 222:
    y = 0
    update()

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.