Hi everybody!
I would like to create a script that moves the mouse cursor randomly within 100x100 pixel, in every 2 seconds, and if i press any key on keyboard, then i get back my mouse control.
Hi everybody!
I would like to create a script that moves the mouse cursor randomly within 100x100 pixel, in every 2 seconds, and if i press any key on keyboard, then i get back my mouse control.
Why? What does this have to do with Blender?
well you can do it by using an external library called pyautogui and a model operator
Nothing. Sounds like theyâre writing a practical joke app.
Or they have some productivity spyware watching them,âŚ
Donât judge, this is an open minded community
So without installing pyautogu i canât do it, right?
Cheers!
Iâm not judging, Iâm asking what this has to do with Blender. You posted on a Blender forum in the Blender Python API support section
I would look into autohotkey for this. Thereâs probably dozens of existing scripts to accomplish this task.
And be aware that if youâre using this to try and circumvent employee productivity monitoring software, it wonât work and youâll get in significantly more trouble for trying to cheat the system. Most companies consider that grounds for immediate termination. Just FYI
It should be pretty straightforward with a modal operator, but the 100*100 pixel wide part would complicate it a bit. Where would you want it to happen ?
Also, Iâm actually not sure the cursor moving would trigger as a âmouse moveâ event by your operating system in case you want this script to circumvent an aforementioned third party software
I tried, and yeah itâs not kicking in the os if it goes to sleep.
Anyhow cheers for the replies!
Get a USB mouse, take the motor out of an electric toothbrush, and tape it on. Done
Or get an Arduino. You can program those to be a usb input, including making mouse movements.
I was going to say that, but you can get an electric toothbrush at the dollar store, and every dollar counts when youâre about to get fired
Can you control the tooth brush with the Blender API though?
Probably not a dollar store one, but they have some pretty fancy ones out there, Iâm sure the $100+ ones have a Linux distro running some kind of Python
Jokes aside, let me give an approximation of the email youâre getting to get in a few days unless you take a step back and decide not to ruin your life, @nyalka_nyalka
âItâs come to our attention that after posting on a public Internet forum using an email address and IP address known to be yours, looking for ways to circumvent our productivity monitoring software, weâve found a script called âsuckonthisboss.pyâ running on your work computer. Our network monitoring software has found that youâre watching Netflix on your personal phone while using this script to pretend to work. Installing unauthorized software, planned deceit, and time theft constitute a breach of your employment contract. You are terminated immediately. You will not be eligible for unemployment benefits, as your conduct is considered gross misconduct under unemployment law, and we will inform any future employers of your conduct.
We will be launching a thorough investigation into all your activities at this company, and if we find any evidence that youâve harmed the company or company property, we will pursue the fullest remedies permissible by law against you.â
Donât do this to yourself. Best case scenario, you never get a job in your field again. Worst case, you go to jail.
Well⌠we are really open minded⌠(even if this might have nothing to do with blenderâŚ)
âŚthere some âweirdâ reasons to âuseâ something like thisâŚ
Most companies employ strict session idle times that will disconnect you when youâre away from your computer, resulting in you having to reconnect all over again.
âŚthen this is the most bat-guano like idea of the company⌠because reconnecting costs time â money⌠so the employee spends âcompany timeâ to reconnect !?
( Also those are the âuser solutionsâ the IT-department really hates⌠because this makes them also more work⌠we think we are under cyber attack because of the unusal âuser activityâ we noticed the last days⌠)
But/And also then⌠installing âsomethingâ on company computersâŚ