Jump to content

Recommended Posts

Posted

Yes, the code isn't finished yet. Thank you for the constructive feedback. I'll eventually work on reducing the size of the executable. Besides, I'll explore UPX as another solution to shrink its size. I'll update the code soon. thank you @AZJIO  don't forget that I'm just an amateur coder ;)
 

  • 1 month later...
Posted (edited)

@argumentum in a sense you are right but I think that you have to have a broader vision a smaller code is also more readable is easier to maintain I realize over time it is quickly anarchy not to mention that optimizing it also makes it more efficient

@AZJIO Thank you for your help to advance the project I add functions and more I want to create a git and add you to push code 😀

 

Edited by ghost911
Posted (edited)

@AZJIO Thanks for the function and small precision for the size of the executable since they change the compiler on purebasic the size of executables has greatly increase this is not my fault

PureBasic has lost its charm; before, we had small-sized executables

small update bug fix

Edited by ghost911
  • 1 month later...
Posted (edited)
On 3/7/2019 at 1:33 AM, ghost911 said:

PureBasic Code : .....................

IncludeFile "AutoitCoding.PB"

 

 

Edited by Trong
EULA

Regards,
 

  • 3 weeks later...
  • 3 weeks later...
Posted (edited)

@winkot Hello no there is no need you have an example file in the archive

update available with bug fix and nice little feature addition

code update 05/12/2024
 

Edited by ghost911
Posted (edited)

WinGetClassList

EnableExplicit

Structure winparam
    hwnd.i
    title.s
    text.s
    result.s
EndStructure


Procedure EnumWinProc(hwnd.l, *ptr.winparam)
    Protected title${256} ; буфер
    GetWindowText_(hwnd, @title$, 256)
    If Asc(title$) And title$ = *ptr\title
        PokeL(@*ptr\hwnd, hwnd)
        ProcedureReturn 0
    EndIf
    ProcedureReturn 1
EndProcedure


Procedure EnumChildProc(hwnd.l, *ptr.winparam)
    Protected class${256}, text${256}
    GetClassName_(hwnd, @class$, 256)
    If Asc(class$)
        If Asc(*ptr\text)
            GetWindowText_(hwnd, @text$, 256)
            If text$ = *ptr\text
                *ptr\result + class$ + #LF$
            EndIf
        Else
            *ptr\result + class$ + #LF$
        EndIf
    EndIf
    ProcedureReturn 1
EndProcedure


Procedure.s WinGetClassList(title$, text$ = "")
    Protected ptr.winparam
    ptr\title = title$
    ptr\text = text$
    EnumWindows_(@EnumWinProc(), @ptr)
    If ptr\hwnd
        EnumChildWindows_(ptr\hwnd, @EnumChildProc(), @ptr)
        ptr\result = RTrim(ptr\result, #LF$)
        ProcedureReturn ptr\result
    EndIf
EndProcedure

Debug WinGetClassList("Untitled — Notepad")

 

Edited by AZJIO
Posted

@AZJIO  thank you for your help it's always nice to have support

Update 10/12/2024 the code by adding new features with the addition of window imitation with api experimental code purebasic already has window management it's just for fun

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...