Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
type or class EXE
#7
Do I correctly understand:

EXE is class that represents a window and provides functions to get information about the window.

Will try to explain how to create such class.

Since EXE cannot be used, let it be Exe.

Somewhere (eg in init2, or in macro code before using the class) declare the class:

class Exe m_hwnd -str'm_exename -str'm_exepath ;;and so on

Compile the code that contains the declaration.

Create member function (use menu File -> New) named EXE.name:

Code:
Copy      Help
function'str
if(!this.m_exename.len) m_exename.getwinexe(m_hwnd 0)
ret this.m_exename

Similarly create more member functions.

Example macro that declares and uses the class:
Code:
Copy      Help
class Exe m_hwnd -str'm_exename -str'm_exepath ;;and so on

Exe exe ;;declare variable of Exe class
exe.m_hwnd=_hwndqm ;;initialize. Alternatively, create member function eg Init that initializes the object.
out exe.name

This was just one of possible implementations. Maybe you need to get some properties every time the member function is called, instead of caching into member variables. Or get all properties in Exe.Init, which would simplify other member functions.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)