English
Source / code snippets

find strangers Handles programs Programs

 

CompileMarkSeparation
Source wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
Programme: Handles von fremden Programmen finden
Declare a%,Title$,Text$,WindowHandle%,jn%
Def ShortString$(2) If(Lt(Len($(1)),%(2)),$(1),Add$(Left$($(1),%(2)),...))
Def ReadObj$(1) GetText$(GetHandle(WindowHandle%,%(1)))
Def NotFound(0) And(Neq$(Left$(ReadObj$(a%),Len(text$)),text$),And(Neq(a%,32768),Not(ScanKey(27))))

Proc ende

    Case MessageBox(Programm beenden?,HandleFinder,36)=6:End

EndProc

Proc Search

    WhileNot jn%=7

        ClearList
        AddWindows
        title$=ListBox$(Fenster wählen,7)
        Case title$=:title$=Input$(Fenstertitel eingeben:,HandleFinder,)
        Case title$=:ende
        a%=Val(Input$(Bei welcher Nummer soll begonnen werden?,HandleFinder,a%))
        Text$=Input$(Welchen Text trägt das Objekt?,HandleFinder,text$)
        Case text$=:ende
        WindowHandle%=FindWindow(title$)
        Title$=GetText$(WindowHandle%)
        SetText %HWnd,Suche...
        Print Suche Text   :,ShortString$(text$,18)
        Print in Fenster   :,ShortString$(title$,18)
        Print Fensterhandle:,FindWindow(title$)
        Print Suche Objektnummer:

        While NotFound()

            Locate 4,21
            Print a%
            Inc a%

        Wend

        If And(a%<32768,Not(ScanKey(27)))

            Print Gefunden!
            Print Objektnummer     :,a%
            Print Momentaner Handle:,GetHandle(FindWindow(title$),a%)
            Print Momentaner Text  :,ShortString$(GetText$(GetHandle(FindWindow(title$),a%)),14)
            Print Taste drücken...
            SetText %HWnd,Gefunden!

        Else

            Print Nicht gefunden!
            Print Taste drücken...
            SetText %HWnd,Nicht Gefunden!

        EndIf

        WaitInput
        jn%=MessageBox(Nochwas?,HandleFinder,36)
        Cls

    Wend

EndProc

Proc Search2

EndProc

Proc Config

    Declare _dlg%,hSearchTo%,hEsc%,hCpText%,hOk%,hCancel%,hShowNr%,hVerz%
    _dlg%=createdialog(%Hwnd,HandleFinder Konfiguration,216,128,228,273)
    creategroupbox(_dlg%,Allgemein,16,16,184,78)
    createtext(_dlg%,Suchen bis:,24,40,88,16)
    createtext(_dlg%,Verzögerung:,24,64,88,16)
    let hVerz%=createedit(_dlg%,,120,62,72,20)
    hSearchTo%=createedit(_dlg%,,120,38,72,20)
    creategroupbox(_dlg%,Tuning,16,104,192,92)
    hEsc%=createcheckbox(_dlg%,ESC-&Taste abfragen,24,128,160,16)
    hCpText%=createcheckbox(_dlg%,&ganze Texte suchen,24,152,160,16)
    hShowNr%=createcheckbox(_dlg%,&Aktuelle Nummer zeigen,24,176,176,16)
    hOk%=createbutton(_dlg%,&OK,16,208,80,32)
    hCancel%=createbutton(_dlg%,&Abbrechen,120,208,80,32)

EndProc

SetErrorLevel 0

If Equ(%ParCount,1)

    Case Lower$(Par$(1))=/c:Config

Else

    WindowStyle 26
    Window 50,50-300,150
    SetText %HWnd,HandleFinder
    UseIcon Computer
    Search

EndIf

End
 
07/16/07  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.287 Views

Untitledvor 0 min.
RudiB.08/19/21
AndreasS01/06/19
W.L.07/13/17
Klaus Ernst07/25/14
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie