IntControl 31... Function
Keywords: intcontrol(31,...)
Question:
This is a very elementary question, but in reading about IntControl (31,0,0,0) about explorer, the function returns a tab-delimited list of Window ID's for all open W95 explorers. Does anyone know what the term "tab-delimited list of Window ID's" mean?Answer:
WindowID's are special strings that can represent a window instead of the Window title most anyplace in WinBatch where window titles are called for (as in the Winxxx functions)The WinIDGet function can convert a window title to a window ID.
In Winbatch there is a special sort of string called a list, in which a bunch of seperate pieces of information are glued together into a single string variable. Each seperate piece of information (a single windowID in this case) is seperated from the other by some special character -- these characters are called delimiters. Using the TAB character as a delimiter is prettymuch standard in WinBatch.
It is sometimes handy to get a list of the explorer windows. But window titles will not do since two explorer windows could have the same title, so WindowIDs are used instead. There could be many more than one. Sometimes zero. So the IntControl 32 function goes out and finds all the Explorer windows. It figures out WindowID's for them, then glues all the WindowIDs together separated by tabs. This function is used in the "Two Explorers side by side" menu item in PopMenu and FileMenu. And that is the only place I've ever seen it used. It was added especially for that exact purpose.
Question:
The following code returns a 2-item tab-delimited string:For i = 1 To 2 Run("C:\Windows\Explorer.exe","") Next TimeDelay(1) Message("",IntControl(31,0,0,0,0)) ExitThe following code returns an empty string:dir1 = "C:\Windows" dir2 = "C:\Program Files\Internet Explorer" For i = 1 To 2 Run("C:\Windows\Explorer.exe",dir%i%) Next TimeDelay(1) Message("",IntControl(31,0,0,0,0)) ExitWhy is this?Answer:
IntControl returns the handles of the "Exploring" windows that have the directory pane on the left and the file panes on the right, the true "Explorer" windows, not the "My computer" style windows.
Article ID: W13085Filename: IntControl 31... .txt