Join Nostr
2026-03-10 06:29:40 UTC
in reply to

atopoeia-o on Nostr: nprofile1q…z9qjf On the Macintosh I used to do things like this... a menace w/ a ...

On the Macintosh I used to do things like this... a menace w/ a web browser!

sleep $(( ( RANDOM % 5 ) + 8 ))
./click -x 600 -y 560
echo $i
sleep $(( ( RANDOM % 3 ) + 3 ))

for...

// gcc -o click click.m -framework ApplicationServices -framework Foundation

int main(int argc, char *argv[]) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSUserDefaults *args = [NSUserDefaults standardUserDefaults];

int x = [args integerForKey:@"x"];
int y = [args integerForKey:@"y"];

CGPoint pt;
pt.x = x;
pt.y = y;

CGPostMouseEvent( pt, 1, 1, 1 );
CGPostMouseEvent( pt, 1, 1, 0 );

[pool release];
return 0;
}

A horrible hack but very fast to put together for repetitive web tasks.