| |
|
|
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 CompileMarkSeparationDef 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) |
|
|
| |
|
|
|
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 ▲ |
|
|
|