English
Forum

Search program and Shell

 

Thomas
Freier
During itself the Hauptprogramm aufbaut (normal ca. 1s) and then in the Warteschleife is, should one with Shell gestartetes Such-Program (here Avery.exe called) to check on, whether and where a defined *.exe present is.
After Rechnerneustart and appeal the Hauptprogramms verharrt it ca. 25s and reacted not.
really should still the Hauptprogramm moreover bedienbar stay.
After erneutem Start remains the main program is only about. 4s.
is the only me so or where make I a Error?
Minibeispiel
CompileMarkSeparation
 $P+
SetErrorLevel 0
DEF GETSYSCOLOR(1) !"USER32","GetSysColor"
DECLARE T&,TAB1&,TAB2&
DECLARE EDIT1&,EDIT2&,EDIT3&
DECLARE ELEMENT1&,ELEMENT2&,ELEMENT3&
WINDOWSTYLE 538
WINDOWTITLE "Tabtest"
WINDOW 209,169-500,250
SETTRUECOLOR 1
DECLARE ENDE%
CLS GETSYSCOLOR(15)
USEFONT "MS Sans Serif",13,0,0,0,0
SETDIALOGFONT 1
T& = CREATE("TABCTRL",%HWND,"Reiter1",0025,0027,0395,0172)
TAB1&=@InsertTab(T&,1,"Reiter2")
TAB2&=@InsertTab(T&,2,"Reiter3")
ELEMENT1&=Control("STATIC","",$54001106,10,30,200,100,t&,0,%hinstance,$0)
EDIT1&=Create("Edit",ELEMENT1&,"TAB 0",10,10,100,18)
ELEMENT2&=Control("STATIC","",$54001106,10,30,200,100,t&,0,%hinstance,$0)
EDIT2&=Create("TEXT",ELEMENT2&,"TAB 1",10,10,100,18)
ELEMENT3&=Control("STATIC","",$54001106,10,30,200,100,t&,0,%hinstance,$0)
EDIT3&=Create("BUTTON",ELEMENT3&,"TAB 3",10,10,100,18)
Zuerst nur das erste anzeigen:
Showwindow(Element1&,1)
Showwindow(Element2&,0)
Showwindow(Element3&,0)
Shell "Avery.exe" prüft wo notepad.exe vorhanden ist.
Ergebnis in der  AVREY.INI
SETFOCUS(%HWND)

WHILENOT ENDE%

    WAITINPUT

    If %KEY=2

        ENDE%= 1

    ELSEIF TABCHANGED(T&) TABCTRL

        IF GetActiveTab(T&) = 0

            Showwindow(Element1&,1)
            Showwindow(Element2&,0)
            Showwindow(Element3&,0)

        ELSEIF GetActiveTab(T&) = 1

            Showwindow(Element1&,0)
            Showwindow(Element2&,1)
            Showwindow(Element3&,0)

        ELSEIF GetActiveTab(T&) = 2

            Showwindow(Element1&,0)
            Showwindow(Element2&,0)
            Showwindow(Element3&,1)

        ENDIF

    ENDIF

href='./../../function-references/XProfan/wend/'>WEND


Search program
CompileMarkSeparation
Def Searchtreeforfile(3) !"imagehlp","SearchTreeForFile"
Def GetLogicalDrives(0) !"KERNEL32","GetLogicalDrives"
Def GetDriveType(1) !"KERNEL32","GetDriveTypeA"
Declare buf#, Buffer#
Dim buf#,4
Dim Buffer#,261
var f.File$=  "note-pad.exe" because of the Suchdauer changed
Declare drives&,i%,f.Root$,f.Rück&
drives&=GetLogicalDrives()

While (i%<26)

    If TestBit(drives&,i%)

        f.Root$=Chr$((i%+65));":"
        String buf#,0=f.Root$

        If GetDriveType(buf#)=3

            Clear Buffer#
            f.Rück& = @Searchtreeforfile(@Addr(f.Root$), @Addr(f.File$), Buffer#)
            case f.RÜck& <> 0: BREAK

        EndIf

        clear buf#

    EndIf

    Inc i%

Wend

WRITEINI $PROGDIR+"\AVERY.INI","Avery","DirPfad"=String $(Buffer#,0)
Dispose Buffer#
Dispose buf#
End
 
Gruß Thomas
Windows XP SP2, XProfan X2
04/09/10  
 



If to shell The aufrufende application verharrt, gives windows the Aufrufer wohlmöglich hold strain no priority or it means, that even others items strain importent are or. first of all worn out go must. you can't of it go out, that processes or Thread Step by step next to each other herlaufen - sooner is the contrary the case. a logischen Error have I at Überfliegen of code not recognized, so I simply say would, the computer "ackert" hold - particularly freshly to the Hochfahren - and particularly because your Suchthread so integrally without WaitInput gladly anyhow on the dearest filled Last in claim takes. ^^ (vlt. would simply to While (i%<26) one WaitInput 1 help)
 
04/09/10  
 




Thomas
Freier
has everything not plenty changed. will be just with want review, if The erforderliche ext. software used becomes, whether tappt im dunkeln yet in the once ermittelten Ordner present is.
 
Gruß Thomas
Windows XP SP2, XProfan X2
04/11/10  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.563 Views

Untitledvor 0 min.
Walter01/30/18
GC5708/04/16
Detlef Jagolski01/18/11

Themeninformationen

this Topic has 2 subscriber:

Thomas Freier (2x)
iF (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