local nPatch = "C:\\Images Optimization Suite\\Images Optimization Suite.bat" local nForder = "C:\\Images Optimization Suite" local nName = "cmd" local n =0 hand=filerun(nPatch,nForder,nName,n) function filerun(nPatch,nForder,nName,n) File.Run(nPatch, "", nForder, SW_SHOWNORMAL, false) nEmbedded=false; while (nEmbedded==false) do window_name =nName; windows = Window.EnumerateTitles(); for handle, title in windows do result = String.Find(title, window_name, 1, false); if (result ~= -1) then nEmbedded=true; result = DLL.CallFunction(_SystemFolder .. "\\User32.dll", "SetParent", handle..","..Application.GetWndHandle(), DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL) app_size = Window.GetSize(handle); Window.SetSize(handle, app_size.Width-(n), app_size.Height) Window.SetPos(handle,1,10) WinApi.SetCaptionButtons(handle, "Minimize", false) WinApi.SetWindowText(handle, "Images Optimization Suite") Page.Redraw() Window.Show(handle) return handle end end end end |