Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
AddExtender("wsrch34i.dll") hand=SrchInit("c:\","TRAIN.EXE","","",16) BoxOpen("Search Progress","" ) While 1 BoxText("Warning") ; Works when srchNext is removed ; Fails when srchNext is included a=SrchNext(hand) If a=="" Then Break EndWhile SrchFree(hand)Run the above code. Once the box is on the screen (Notice the x on the system menu is greyed out). I then switch focus to any other window, then back to the box. The x on the system menu is nolonger greyed out! Also the text in the box has disapeared.
The really strange things is if I then comment out the SrchNext and the following if condition, and take the same steps the x on the system menu is ALWAYS greyed out and the text remains in the box.
The only workaround I can think of is the tell the SrchInit function to return all directories using flag 32. This will cause srchNext to retrun everytime a new directory is found. You can then ignore those returns, but at least now the box is given a chance to update and not be seen as non responsive by the operating system.
AddExtender("wsrch34i.dll") hand=SrchInit("c:\","TRAIN.EXE","","",16+32) ; Added 32 to get directories BoxOpen("Search Progress","" ) While 1 a=SrchNext("Warning") If a=="" Then Break BoxText(a) If StrSub(a,StrLen(a),1) == "\" Then Continue ; ignore directories EndWhile SrchFree(hand)
Article ID: W16857
File Created: 2017:07:28:13:58:29
Last Updated: 2007:07:03:14:26:36