Execution method of macro instruction, compiling method of macro instruction, upper computer, touch screen equipment and storage medium
By writing and cross-compiling macros in Windows host computers, dynamic library files can be generated that can run on embedded operating systems, solving the problems of high thresholds and limited functions of cross-platform macros, and achieving efficient and intelligent cross-platform execution.
Patent Information
- Application Number
- CN202411855107.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-05-06
AI Technical Summary
In the prior art, cross-platform execution of macro instructions has problems such as restricted code function expansion and high usage threshold.
Cross-platform execution of macros is achieved by writing macros in Windows host computers and using the cross-compilation toolchain to compile them into target dynamic library files that can run on the embedded operating system.
It lowers the threshold for users' programming language, realizes cross-platform execution of macros, improves the intelligence and efficiency of touch screens, is suitable for complex application scenarios, and ensures the stable execution of programs.
Smart Images

Figure CN119938144A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and in particular, relates to a macro instruction execution method, a macro instruction compilation method, a host computer, a touch screen device and a storage medium. Background Art
[0002] Macro instructions generally refer to a method of creating code snippets or value replacement rules through preprocessor instructions in a programming language, allowing programmers to define an identifier in the code and then use the identifier to reference a specific piece of code or value in subsequent code, thereby simplifying the code and improving the readability and maintainability of the code.
[0003] Functional expansion and automation based on macro instructions can be applied to various languages and environments, such as C language, Python, Excel, touch screen, custom plug-ins, etc., to enhance the functionality and flexibility of the software.
[0004] For touch screen devices in the prior art, macro instructions allow users to automatically execute complex operations or processes by writing a series of instructions, mainly operating on register values, and can complete logical operations, string processing, control interaction, modify control control conditions, etc., optimize user experience, improve efficiency, and implement custom functions, making the touch screen more intelligent and efficient, and suitable for various complex application scenarios. Generally, the touch screen is an embedded Linux device, and the macro instructions are written and compiled in the Windows host computer. If you want the macro instructions to run in the Linux touch screen, you have to consider the cross-platform issue.
[0005] There are currently two conventional ways to execute macro instructions across platforms: one is limited to the method functions defined by the manufacturer, which in turn limits the expansion of code functions; the other requires users to be familiar with a specific cross-platform scripting language, which has a high threshold for use. Summary of the invention
[0006] The embodiments of the present application provide a macro instruction execution method, a macro instruction compilation method, a host computer, a touch screen device and a storage medium, which can solve the technical problems mentioned in the above background technology.
[0007] In a first aspect, an embodiment of the present application provides a method for executing a macro instruction, the method being applied to a touch screen device, comprising the following steps:
[0008] Determine a target dynamic library file transmitted by the host computer, wherein the target dynamic library file is a dynamic library compiled by the host computer into macro instructions that can be run on an embedded operating system, and the macro instructions are written by the host computer through the Windows operating system;
[0009] The target dynamic library file is called to execute the macro instruction.
[0010] In one example, calling the target dynamic library file to execute the macro instruction includes: performing integrity check on the target dynamic library file to obtain a check result;
[0011] Create a child thread for executing macro instructions;
[0012] Determine a target macro file that meets a preset condition from the verification result;
[0013] Each target macro file that meets the preset condition is traversed, and the macro instruction corresponding to the target macro file is executed through the sub-thread.
[0014] In one example, the target macro file includes at least a global macro file, a screen macro file, and a window macro file;
[0015] The executing the macro instruction corresponding to the target macro file through the sub-thread includes:
[0016] Executing macro instructions corresponding to the global macro file, the screen macro file, and the window macro file in sequence according to a preset order through the sub-thread;
[0017] When the execution of the macro instruction corresponding to the window macro file is completed, the process returns to the step of traversing each target macro file that meets the preset condition.
[0018] In a second aspect, an embodiment of the present application further provides a macro instruction compilation method, which is applied to a host computer and includes the following steps:
[0019] Write macro instructions in the host computer software running on the Windows operating system;
[0020] Using a cross-compilation tool chain, compile the macro instructions into a target dynamic library file that can be run on an embedded operating system;
[0021] The target dynamic library file is sent to the touch screen device, so that the touch screen device calls the target dynamic library file to execute the macro instruction.
[0022] In one example, the host computer writes macro instructions through the Windows operating system, including:
[0023] The host computer responds to the user's editing instruction for the source file, wherein the editing instruction is generated based on the C language;
[0024] A macro instruction related to the C language is written based on the editing instruction.
[0025] In one example, the editing instruction includes at least one of a code adding instruction, a code deleting instruction, a code copying instruction, a function editing instruction, and an algorithm program inserting instruction to the source file.
[0026] In one example, the stage in which the host computer writes macro instructions through the Windows operating system also includes:
[0027] The source code related to the macro instruction is sent to the syntax detection file, so that the syntax detection file executes the syntax check command to perform syntax check on the source code, until the step of using the cross-compilation tool chain to compile the macro instruction into a target dynamic library file that can run on the embedded operating system is executed if the syntax check passes.
[0028] In a third aspect, an embodiment of the present application further provides a host computer, comprising a memory, a processor, and a macro instruction compiler stored in the memory and executable on the processor, wherein when the macro instruction compiler is executed by the processor, the steps of the macro instruction compilation method described in the second aspect above are implemented.
[0029] In a fourth aspect, an embodiment of the present application further provides a touch screen device, comprising a memory, a processor, and a macro instruction execution program stored in the memory and executable on the processor, wherein when the macro instruction execution program is executed by the processor, the steps of the macro instruction execution method described in the first aspect above are implemented.
[0030] In a fifth aspect, an embodiment of the present application further provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0031] The beneficial effects of the present application are as follows: the host computer of the present application can provide users with a platform for writing macro instructions through the Windows operating system, which reduces the programming language threshold of users, and then uses a cross-compilation tool chain to compile the macro instructions into a target dynamic library file that can run on an embedded operating system; the touch screen device downloads the target dynamic library file and calls the target dynamic library file to execute the macro instructions. The present application uses a cross-compilation method to enable the macro instructions written in the host computer of the Windows platform to compile and generate a dynamic library that can run on an embedded operating system, thereby realizing the function of executing macro instructions across platforms, so that it can execute complex operations or processes customized by users more intelligently and efficiently. Since the dynamic library is equivalent to an external call, if there is a problem with the target dynamic library file, it will only cause the macro instruction execution to fail, and will not affect other functions of the touch screen device. Compared with the prior art, the solution provided by the present application can ensure the stable execution of the touch screen program on the basis of reducing the programming language threshold of the development user, and it is also convenient for users to expand the software functions by themselves. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0033] Figure 1 This is a flow chart of a macro instruction compilation method and execution method provided by an embodiment of the present application;
[0034] Figure 2 It is a schematic diagram of a syntax checking process involved in the compilation process of a macro instruction provided by an embodiment of the present application;
[0035] Figure 3 It is a schematic diagram of the process of program introducing link library;
[0036] Figure 4 This is a flowchart of an embodiment of the macro instruction execution process provided by the present application;
[0037] Figure 5 It is a structural diagram of a host computer / touch screen device provided in an embodiment of the present application;
[0038] Figure 6 It is a flowchart of a program related to compiling macro instructions by a host computer in an embodiment of the present application;
[0039] Figure 7 It is a flowchart of the relevant procedures for the touch screen device to execute macro instructions according to the embodiment of the present application. DETAILED DESCRIPTION
[0040] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0041] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0042] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0043] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0044] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0045] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0046] Functional expansion and automation based on macro instructions can be applied to various languages and environments, such as C language, Python, Excel, touch screen, custom plug-ins, etc., to enhance the functionality and flexibility of the software.
[0047] The inventor of this application has found that for touch screen devices in the prior art, macro instructions allow users to automatically execute complex operations or processes by writing a series of instructions, mainly operating on register values, and can complete logical operations, string processing, control interaction, modify control control conditions, etc., optimize user experience, improve efficiency, and implement custom functions, so that the touch screen can be more intelligent and efficient, and suitable for various complex application scenarios. Generally, the touch screen is an embedded Linux device, and the macro instructions are written and compiled in the Windows host computer. If you want the macro instructions to run in the Linux touch screen, you have to consider the cross-platform problem. In actual development, there are currently two conventional cross-platform ways to execute macro instructions:
[0048] Conventional solution 1: The touch screen manufacturer customizes the method function for the user to call when writing macro instructions. The host computer transmits the macro instruction source code to the touch screen. The touch screen parses the macro instruction source code when running the project to execute the corresponding method function. Conventional solution 1 uses the touch screen manufacturer's customized method function to write macro instructions. Users can directly call it to meet their needs. It is convenient to use, but if the user's desired function does not have a corresponding method function, they are helpless. Users only have the right to use and cannot customize the method function, which is not convenient for function expansion. In addition, if the source code is directly transmitted, if the touch screen parses incorrectly, it is very likely to cause project operation errors, resulting in unexpected consequences.
[0049] Conventional Solution 2: Use a cross-platform scripting language to write macro instructions. There are built-in function scripts and user scripts in the touch screen manufacturer. Users can directly call the built-in function scripts in the script to meet their needs. The host computer can directly execute the script after downloading it to the touch screen. The above conventional solution 2 uses a cross-platform scripting language to write macro instructions. Compared with conventional solution 1, although it lacks the data parsing process, it requires users to be familiar with this specific scripting language, which increases the user's usage threshold.
[0050] In order to solve the above problems, the embodiments of the present application provide a macro instruction compilation method and execution method, wherein the macro instruction execution method of the embodiments of the present application is mainly applied to touch screen devices; because the touch screen needs to customize different configuration projects according to the needs of different users in actual application scenarios, in order to make the use of the touch screen more intelligent and efficient, macro instructions are usually written to implement complex applications. Therefore, the macro instruction compilation method provided by the present invention is compiled by the host computer on the Windows platform using a cross-compilation tool chain to generate a target dynamic library file that can run on an embedded operating system. The host computer downloads the target dynamic library file that can run on the embedded operating system to the touch screen, and the touch screen can implement functions by calling the target dynamic library file. Specifically, the technical solution of the embodiments of the present application needs to be implemented by the cooperation between the host computer and the touch screen, such as Figure 1 As shown, the technical solution of this embodiment includes the following steps:
[0051] Step S10: The host computer writes macro instructions through the Windows operating system;
[0052] Specifically, the host computer provides a C language editing platform for the user. The user only needs to master the basic C language syntax to input the editing instructions of the source file to the C language editing platform through the human-computer interaction device of the host computer. The host computer responds to the user's editing instructions of the source file and writes macro instructions related to the C language based on the editing instructions. The editing instructions include at least one of the code adding instructions, code deleting instructions, code copying instructions, function editing instructions, and algorithm program inserting instructions for the source file.
[0053] The other functional parts of the touch screen are packaged into function methods by the touch screen manufacturer for direct use by users, such as adding, deleting, and copying source code. Users can also write their own function and even insert their own algorithm program. After writing, you can perform a syntax check. The checking process is as follows: Figure 2 As shown, it includes sending the source code related to the macro instruction into the syntax detection file, so that the syntax detection file executes the syntax check command to perform syntax check on the source code, until the subsequent step S20 is executed if the syntax check passes. Specifically, the syntax check command used by the C language editing platform is a command that can perform pre-compilation, compilation and assembly processes on the source code and output syntax error information, including but not limited to the gcc-c command. For example, the syntax check command used in the embodiment of the present application is gcc-c, and the syntax-checked file is a C source file. After running the gcc-c command, the pre-compilation, compilation and assembly processes will be activated, and syntax error information can be output.
[0054] Step S20: The host computer uses a cross-compilation tool chain to compile the macro instructions into a target dynamic library file that can be run on the embedded operating system;
[0055] It is understandable that a link library refers to existing, mature, and reusable code that has been written. In reality, every program relies on many basic underlying libraries. In essence, a library is a binary form of executable code that can be loaded into memory and executed by the operating system. There are two types of libraries, static libraries and dynamic libraries. Figure 3 The process of introducing a link library into a program is shown. The embodiment of the present application uses a dynamic library, because the linking of a static library is completed at compile time, which is not convenient for program updates and occupies more resources, while the linking of a dynamic library occurs when the program is running, which occupies less resources and is convenient for updates.
[0056] In a specific implementation, the cross-compilation tool chain of the embodiment of the present application selects ARM-Linux, which can compile C language programs into dynamic libraries, so users who write macro instructions only need to master basic C syntax. Through the cross-compilation tool chain, macro instructions can be compiled into target dynamic library files that can be executed in Linux, and dynamic library files that can be supported by the host computer platform can be compiled and generated, which is convenient for the host computer simulation call. Among them, the specific compilation process can be: copy the source code related to the macro instruction to the macro instruction function file, and compile the source code related to the macro instruction through the macro instruction function file, for example, uniformly use the Make instruction during compilation, which will read the content of the Makefile file, and the Makefile file specifies the compiler, target file, etc.
[0057] It should be noted that in the process of using a cross-compilation tool chain to compile the macro instructions into a target dynamic library file that can run on an embedded operating system, the source files and header files linked during compilation can be specified, which means that touch screen manufacturers can write the implementation of custom function functions in the source file to facilitate functional expansion.
[0058] Step S30: After the host computer has completed compiling the macro instruction, it sends the target dynamic library file to the touch screen device;
[0059] The host computer of the embodiment of the present application transmits the macro instructions to the touch screen. Since all the macro instructions can be compiled into a dynamic library file, it is more convenient for the touch screen to download the macro instructions.
[0060] Step S40: the touch screen device calls the target dynamic library file to execute the macro instruction.
[0061] Specifically, after the touch screen device downloads the target dynamic library, it will perform integrity check on the target dynamic library file to obtain a check result; since the dynamic library is equivalent to an external call, if there is a problem with the target dynamic library file, it will only cause the macro instruction execution to fail, and will not affect other functions of the touch screen device. Create a sub-thread for executing macro instructions; determine the target macro file that meets the preset conditions from the check result; traverse each target macro file that meets the preset conditions, and execute the macro instruction corresponding to the target macro file through the sub-thread.
[0062] In a specific implementation, the target macro file includes at least a global macro file, a screen macro file, and a window macro file; the sub-thread executes the macro instructions corresponding to the global macro file, the screen macro file, and the window macro file that meet the preset conditions in a preset order; when the macro instructions corresponding to the window macro file are executed, the step of traversing each target macro file that meets the preset conditions is returned and polling is restarted.
[0063] In the embodiment of the present application, for the host computer side, the C language program can be compiled into a dynamic library file, so for users who write macro instructions, they only need to master the basic C syntax, which reduces the user's programming threshold; and for the touch screen side, since the dynamic library is downloaded to the touch screen, even if the data is wrong, it only causes the macro instruction to fail to run, and will not affect other functions of the touch screen. In the process of compiling the macro instruction into a target dynamic library file that can be run on the embedded operating system, the source file and header file linked during compilation can be specified, so that the touch screen manufacturer can write the implementation of the custom function function in the source file, which is convenient for function expansion; when writing macro instructions, the user can directly call it according to the function name, and the user can also write his own function function and keep it in the host computer for later use. The cross-platform compatibility of the touch screen is improved, so that the touch screen can more easily connect and interact with different operating systems or devices.
[0064] The present application also provides a computer device, such as Figure 5 As shown, the computer device may include a host computer and a touch screen device, and the computer device includes: at least one processor 101, a memory 102, and a computer program stored in the memory 102 and executable on the at least one processor 101;
[0065] When the host computer processor 101 executes the computer program, the following steps are implemented:
[0066] Step A1: Write macro instructions in the host computer software running on the Windows operating system;
[0067] Step A2: using a cross-compilation tool chain, compiling the macro instructions into a target dynamic library file that can be run on an embedded operating system;
[0068] Step A3: Sending the target dynamic library file to the touch screen device, so that the touch screen device calls the target dynamic library file to execute the macro instruction.
[0069] Accordingly, when the touch screen device runs the processor 101 to execute the computer program, the following steps are implemented:
[0070] Step B1: determining a target dynamic library file transmitted by a host computer, wherein the target dynamic library file is a dynamic library compiled by the host computer into macro instructions that can be run on an embedded operating system, and the macro instructions are written by the host computer through a Windows operating system;
[0071] Step B2: calling the target dynamic library file to execute the macro instruction.
[0072] The host computer of the present application runs on the Windows operating system, and can provide users with a method for writing macro instructions, which reduces the programming language threshold of users, and then uses a cross-compilation tool chain to compile the macro instructions into a target dynamic library file that can run on an embedded operating system; download the target dynamic library file to the touch screen device, and the touch screen device calls the target dynamic library file to execute the macro instructions. Through cross-compilation, the macro instructions written in the host computer of the Windows platform can be compiled to generate a dynamic library that can run on an embedded operating system, thereby realizing the function of executing macro instructions across platforms, so that it can execute complex operations or processes customized by users more intelligently and efficiently. Since the dynamic library is equivalent to an external call, if there is a problem with the target dynamic library file, it will only cause the macro instruction execution to fail, and will not affect other functions of the touch screen device. Compared with the prior art, the solution provided by the present application can ensure the stable execution of the touch screen program on the basis of reducing the programming language threshold of the development user, and it is also convenient for users to expand the software functions by themselves.
[0073] It should be understood that in the embodiment of the present application, the processor 101 can be all the software and hardware control logic execution units of the host computer or the touch screen device. The processor 101 can specifically be an MCU (microcontroller unit, MCU). The processor 101 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0074] The memory 102 may include a read-only memory and a random access memory, and provide instructions and data to the processor 101. The memory 102 may also include a non-volatile random access memory. The memory 102 may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct memory bus random access memory (DR RAM).
[0075] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0076] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0077] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0078] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0079] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0080] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0081] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0082] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for executing a macro instruction, characterized in that: The method is applied to a touch screen device and comprises the following steps: Determine a target dynamic library file transmitted by the host computer, wherein the target dynamic library file is a dynamic library compiled by the host computer into macro instructions that can be run on an embedded operating system, and the macro instructions are written by the host computer through the Windows operating system; The target dynamic library file is called to execute the macro instruction.
2. The method according to claim 1, characterized in that The calling of the target dynamic library file to execute the macro instruction includes: Perform integrity check on the target dynamic library file and obtain the check result; Create a child thread for executing macro instructions; Determine a target macro file that meets a preset condition from the verification result; Each target macro file that meets the preset condition is traversed, and the macro instruction corresponding to the target macro file is executed through the sub-thread.
3. The method according to claim 2, characterized in that The target macro file at least includes a global macro file, a screen macro file, and a window macro file; The executing the macro instruction corresponding to the target macro file through the sub-thread includes: Executing macro instructions corresponding to the global macro file, the screen macro file, and the window macro file in sequence according to a preset order through the sub-thread; When the execution of the macro instruction corresponding to the window macro file is completed, the process returns to the step of traversing each target macro file that meets the preset condition.
4. A macro instruction compiling method, characterized in that: The method is applied to a host computer and comprises the following steps: Write macro instructions in the host computer software running on the Windows operating system; Using a cross-compilation tool chain, compile the macro instructions into a target dynamic library file that can be run on an embedded operating system; The target dynamic library file is sent to the touch screen device, so that the touch screen device calls the target dynamic library file to execute the macro instruction.
5. The method according to claim 4, characterized in that The macro instructions are written in the host computer software running on the Windows operating system, including: The host computer responds to the user's editing instruction for the source file, wherein the editing instruction is generated based on the C language; Based on the editing instructions, macro instructions related to the C language are written in the host computer software running on the Windows operating system.
6. The method according to claim 5, characterized in that The editing instruction includes at least one of a code adding instruction, a code deleting instruction, a code copying instruction, a function editing instruction, and an algorithm program inserting instruction to the source file.
7. The method according to claim 5, characterized in that In the stage where the host computer writes macro instructions through the Windows operating system, it also includes: The source code related to the macro instruction is sent to the syntax detection file, so that the syntax detection file executes the syntax check command to perform syntax check on the source code, until the step of using the cross-compilation tool chain to compile the macro instruction into a target dynamic library file that can run on the embedded operating system is executed if the syntax check passes.
8. A host computer, characterized in that: The invention comprises a memory, a processor and a macro instruction compiler stored in the memory and executable on the processor. When the macro instruction compiler is executed by the processor, the steps of the macro instruction compiling method according to any one of claims 4 to 7 are implemented.
9. A touch screen device, characterized in that: The invention comprises a memory, a processor and a macro instruction execution program stored in the memory and executable on the processor, wherein the macro instruction execution program implements the steps of the macro instruction execution method according to any one of claims 1 to 3 when executed by the processor.
10. A storage medium, characterized in that: The storage medium stores a computer program, which implements the steps of the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Cited By
Macro information processing method suitable for multi-step compiling, electronic equipment and medium
CN121233120A