// Stylus Target @cid "YGst"; @name "StylusTest"; @dbname "StylusTest"; main() { int x, y, ps = 0; graph_on(); textalign(02); hookmenu(1); rect(0, 0, 0, 160, 160, 0); do { event(1); line(0, x, 0, x, 160); line(0, 0, y, 160, y); frame(0, x - 4, y - 4, x + 5, y + 5, 3); x = penx(); y = peny(); if(pstate()) { line(1, x, 0, x, 160); line(1, 0, y, 160, y); frame(1, x - 4, y - 4, x + 5, y + 5, 3); } text(160, 0, " " + x + ", " + y); } while(1); }