Xetera / ghost-cursor

🖱️ Generate human-like mouse movements with puppeteer or on any 2D plane
MIT License
1.03k stars 120 forks source link

How to stop random moves #113

Closed AndriusCTR closed 4 months ago

AndriusCTR commented 8 months ago

If I launch it with random moves enabled, and I need to stop those moves, perform manual movement, and continue random moves, how would I go about that?

let cursor = createCursor(page, await getRandomPagePoint(page), true);

// stop random moves, do other stuff

// continue random moves

TheGP commented 7 months ago

It automatically toggles it, while moving the cursor to something. But when u want to pause you can call it manually like: cursor.toggleRandomMove(false);

AndriusCTR commented 7 months ago

I mean what I wrote. I want to manually stop 'random moves process' and then manually restart it 20 lines later, etc.

TheGP commented 7 months ago

I mean what I wrote too, did u read it?

AndriusCTR commented 5 months ago

I mean what I wrote too, did u read it?

Doesn't work for me. It does not stop anything. Random moves continue to move

FreemanDan commented 5 months ago

Doesn't work for me. It does not stop anything. Random moves continue to move

same

TheGP commented 4 months ago

Do it after every move or click.

bvandercar-vt commented 4 months ago

Do it after every move or click.

This is the answer.

If this PR gets merged, should only have to set it where it needs to change: https://github.com/Xetera/ghost-cursor/pull/132

AndriusCTR commented 4 months ago

Do it after every move or click.

What does that mean? I should repeatedly write cursor.toggleRandomMove(false) all over the code?

If I toggle it OFF then it should stay OFF until I toggle it on or script ends. Who came up with this nonsense logic?

bvandercar-vt commented 4 months ago

I should repeatedly write cursor.toggleRandomMove(false) all over the code?

With the way it's currently written, yes you have to. After every move or click. This PR https://github.com/Xetera/ghost-cursor/pull/132 should fix this so you only have to set cursor.toggleRandomMove once, or as-needed.

The repo owner has been great about merging PRs so keep an eye on this one.

Who came up with this nonsense logic?

Rude and unnecessary

AndriusCTR commented 4 months ago

Who came up with this nonsense logic?

Rude and unnecessary

Necessary until they start thinking what they do and what they write.

Niek commented 4 months ago

Fixed in #132

TheGP commented 4 months ago

@AndriusCTR It is necessary for you to shut up and remove your GitHub account. P.S. This guy is complaining not only in this repo, instead of helping. I already banned him from mine.

TheGP commented 4 months ago

@bvandercar-vt much obliged, sir!