Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to write the blocking up key to prevent the game from running the script

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the relevant knowledge of "how to write a script to block the up key to prohibit the game from running". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Enhanced version, first judge whether the game is running, if it is the first time the game is run, then block the UP key after 20 minutes

In order not to affect the normal work, and at the same time cause the false appearance that the game keys are damaged.

Then the up key is intercepted as soon as the game is detected to be running, otherwise it is not intercepted, and the detection interval is 1 second.

The code is as follows:

Sleep (1200000)

HotKeySet ("{UP}", "AntiGame")

Func AntiGame ()

EndFunc

Sleep (3600000)

The code is as follows:

; enhanced version, first determine whether the game is running, if it is the first time the game is run, then block the UP key after 20 minutes

In order not to affect the normal work, and at the same time cause the false appearance that the game keys are damaged

The up key is then intercepted as soon as the game is detected to be running, otherwise it is not intercepted, and the detection interval is 1 second.

Func AntiGame ()

EndFunc

While Not ProcessExists ("supertuxkart.exe")

Sleep (1000)

WEnd

Sleep (20,60,1000)

HotKeySet ("{UP}", "AntiGame")

While 1

If ProcessExists ("supertuxkart.exe") Then

HotKeySet ("{UP}", "AntiGame")

Else

HotKeySet ("{UP}", "")

EndIf

Sleep (1000)

WEnd

This is the end of the content of "how to write a script to block up keys to prevent games from running". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report