On May 1, 2015, at 10:19 AM, Tim Jones <[email protected]> wrote:
> 
>> On May 1, 2015, at 10:16 AM, Christian Schmitz 
>> <[email protected]> wrote:
>> 
>>> Am 01 May 2015 um 18:57 schrieb Tim Jones <[email protected]>:
>>> 
>>> Hi Folks,
>>> 
>>> Is it possible to take a snapshot of the user’s Dock in OS X?  I’ve just 
>>> started digging around, but nothing jumps out at me.
>> 
>> Use ProcessMBS to find Dock's process.
>> Use CGSWindowListMBS to get list of windows.
>> Use functions in CGWindowMBS module to render picture from that process main 
>> window.
> 
> ProcessMBS was what I was missing!
> 
I’m still missing something.  Using this code, I can’t determine how to get the 
Dock’s Window List.  I’ve added a listbox to display the results of the 
CGSWindowMBS list, but I get no window titles back.

  dim p As New ProcessMBS
  dim dockPID As Integer
  dim c as new CGSConnectionMBS
  dim list as CGSWindowListMBS = c.GetWindowList
  
  dim u as integer = List.Count-1
  
  p.GetfirstProcess ' get first
  do
    If p.Name = "Dock" Then
      dockPID = p.ProcessID
      for i as integer = 0 to u
        dim w as CGSWindowMBS = List.Item(i)
        lbProcessTable.AddRow w.Title
      next
      exit do
    End If
  loop until not p.GetNextProcess

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to