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 use Python to develop a game running script to successfully call the Desert plug-in

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article will explain in detail how to use Python to develop game running scripts to successfully call the Desert plug-in. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

First, build a python development environment

(note: to use the Desert plug-in, you must use a 32-bit python interpreter.)

We need the integrated development environment pycharm, download and install python interpreter and configure environment variables.

Download pypiwin32 library files using Pip

Open Settings

Enter pip

Search for pip, then click to install the latest pip library and upgrade pip (or use the command line python-m pip install-U pip)

Search for pypiwin32, then click to install the pypiwin32 library file; if the pip version is not up to date, the installation will fail here

Download desert plug-in 3.1 download desert plug-in 3.2 register the desert plug-in to the system .dat file

If you do not register here, the code in step 4 will report an error, which will prompt an error such as can't find Ver () method total, extract the downloaded desert file, and then open the cmd command line window as an administrator. Remember, be sure to run the command line window as an administrator (otherwise you will report an error)! In the command line window, we go to the folder where dm.dll is located and type

Regsvr32 dm.dll

Prompt to register successfully

4. Successfully call Desert API

Create a new DameTest.py file

Import win32com.clientdm = win32com.client.Dispatch ('dm.dmsoft') # call the desert plug-in to get the desert object print (dm.ver ()) # output version number

If we can successfully output the version number of the Desert plug-in, it means that our initial goal of calling Desert has been achieved.

Common mistakes

1. The specified module cannot be found

A higher version of the Windows system may report an error when getting desert objects, indicating that the corresponding module of the desert plug-in cannot be found.

This requires us to manually copy the dm.dll file to the C:\ Windows\ SysWOW64 directory

2. Inexplicably, the Desert plug-in will stop running.

This may be because the dm.dll version library used is a paid version, and the desert plug-in used in this series is

The last free version of [dm.dll]: version 3.1233, and you'll have to pay for it.

This is the end of this article on "how to use Python to develop game running scripts to successfully call the Desert plug-in". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

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