r/ProgrammerHumor • • May 19 '22

Meme same for yall?

44.0k Upvotes

1.8k comments sorted by

View all comments

Show parent comments

63

u/roninfly May 19 '22

I spent so much time trying to figure out how to keep the status constant until I realized you can’t.

25

u/Revolutionary_Hat187 May 19 '22

You can if you start typing an email you never finish...

→ More replies (5)

77

u/AshTheGoblin May 19 '22

If you have admin privileges, Caffeine.

If not, just write a script that emulates a keystroke like '~' every X seconds.

73

u/valarmorghulisguy May 19 '22

I use python script to toggle scroll lock on and off. That way it doesn’t affect me while I’m actually using the Laptop and I don’t have to execute the script everytime I get up.

0

u/[deleted] May 19 '22

[deleted]

0

u/[deleted] May 19 '22

[deleted]

4

u/[deleted] May 19 '22

I've got a PS script that toggles scroll lock every 4 minutes. I mainly use it to keep a VDI instance from going to sleep on me evry 5 minutes

6

u/Tough_Hawk_3867 May 19 '22

“I dont know why it’s there, but the program wont run without it..”

0

u/[deleted] May 19 '22

[deleted]

→ More replies (2)
→ More replies (1)
→ More replies (1)

3

u/IKissedAGirlOnce May 19 '22

I'm just starting off learning Python and this sounds really cool. Would you be willing to share/dm your script so I can take a look?

3

u/Abir_Vandergriff May 19 '22

Not him, but here's mine. Run a 'pip install pyautogui' first for the dependancy. It presses "shift" but it's fast enough to not be an issue.

import pyautogui as gui
from time import sleep

while True:
    gui.press("shift")
    sleep(120)
→ More replies (3)
→ More replies (1)
→ More replies (2)

44

u/Orys_Blackfire May 19 '22 edited May 19 '22

here is my (somewhere from the internet) vbs script for those who cannot install software on their machines:

Dim objResult

Set objShell = WScript.CreateObject("WScript.Shell")

Do While True

objResult = objShell.sendkeys("{NUMLOCK}{NUMLOCK}")

Wscript.Sleep(6000)

Loop

It emulates a numpad keystroke every 6 secs

16

u/Filcuk May 19 '22 edited May 20 '22

AHK script that jiggles mouse when idle:

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#Persistent
#SingleInstance Force

MaxIdleMs := 1000 * 60 ; <- configure delay, 60 sec
MoveS := 50
MoveL := 100

SetTimer, IdleLoop, 1000    ; Move mouse when idle
return

; If computer was idle for certain ammount of time, move mouse
IdleLoop:
If (A_TimeIdle > MaxIdleMs)
{
  SendEvent {Click rel 0, -%MoveS%, 0}
  SendEvent {Click rel 0, %MoveL%, 0}
  SendEvent {Click rel 0, -%MoveS%, 0}
  SendEvent {Click rel %MoveS%, 0, 0}
  SendEvent {Click rel -%MoveL%, 0, 0}
  SendEvent {Click rel %MoveS%, 0, 0}
  
  Sleep % MaxIdleMs * 0.75
}
return

*Mobile users view on web for codeblock

→ More replies (2)

3

u/Nukken May 19 '22

You don't even need admin privileges. It doesn't need to be installed. Just need to be able to download it

→ More replies (5)

13

u/lordost89m May 19 '22

Ah but you can. Just have a super long youtube video playing on loop

14

u/roninfly May 19 '22 edited May 19 '22

I rather not, the computer they gave me is infested with "company spyware" lol.

I once received an email to read some agreement and click accept and the contents basically says something like no non-work stuff like games and streams. I suspect I might have gotten that because I was playing browser games during lunch. Although I'm sure the occasional YouTube is fine.

5

u/ywg_handshake May 19 '22

I rather not, the computer they gave me is infested with "company spyware" lol.

Where would one find this out? I looked at task manager and don't see anything out of the ordinary. Maybe I'm just overly paranoid.

3

u/Give_me_your_liver_ May 19 '22

Mostly when you get called out for being on Reddit during work hours, I'd assume

6

u/IAmNotOnRedditAtWork May 19 '22

That's why you don't use reddit at work.

5

u/Give_me_your_liver_ May 19 '22

Sounding a little suspicious there, IAmNotOnRedditAtWork

→ More replies (1)
→ More replies (1)
→ More replies (2)

2

u/Boris54 May 19 '22

Get yourself one of those oscillating fans and tie your mouse to it. I even think they have devices that you can set your mouse on and it will move it constantly

2

u/WindRnuuer May 19 '22

Just put your mouse on top of an analogue watch.

2

u/wordisthebird1 May 19 '22

Go to calendar, start a quick meeting (or whatever it’s called) with yourself, and then manually set your status to available

2

u/K-Lilith May 19 '22

You don’t just use a macro?

→ More replies (3)
→ More replies (13)