Author |
Topic |
|
tia34531
18 Posts |
Posted - 11/19/2013 : 03:31:57
|
Hi... I want to run file explorer to specific location and in specific size.. but Control Panel, which has the same class name as Explorer's, is bothering =============================================================================== local iHandle = acFindWindow("CabinetWClass") if iHandle == 0 then acRunProgram("C:\\Windows\\explorer.exe","D:\\1.kk\\kk",0, 1) acDelay(300) end local iHandle = acFindWindow("CabinetWClass") acRestoreWindow(iHandle,nil,nil) acActivateWindow(iHandle,nil,nil) if acGetWindowBottom(acFindWindow("Shell_TrayWnd"), nil, nil) == 900 then acMoveWindow(acFindWindow("CabinetWClass"), nil, nil, 470, 0) acSetWindowSize(acFindWindow("CabinetWClass"), nil, nil, 970, 870) else acMoveWindow(acFindWindow("CabinetWClass"), nil, nil, 470, 0) acSetWindowSize(acFindWindow("CabinetWClass"), nil, nil, 970, 770) end ===========================================================================
This is my code.. But as you can see, if Control Panel exists, Explorer doesn't run. Only Control Panel Window gets that location and size, which is not what I intended In the first line, defining the variable, can I exclude it? , which is the way i wish, because the way using window title is not good since there are many folders I use.. |
Edited by - tia34531 on 11/19/2013 04:50:08 |
|
Rob
USA
2615 Posts |
Posted - 11/19/2013 : 13:20:13
|
That will not be easy to accomplish since Windows uses the exact same window class for Control Panel as it does for browsing files. The only way I can think of is to check the title of the window, if it matches a Control Panel title (which there are quite a few) skip the check and start your new instance of Explorer. |
|
|
tia34531
18 Posts |
Posted - 11/19/2013 : 17:06:53
|
Thanks for your reply |
Edited by - tia34531 on 11/19/2013 23:25:41 |
|
|
|
Topic |
|
|
|