Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Stardock Gadgets

Help
eryksun
2007-10-19
2013-05-28
  • eryksun
    eryksun
    2007-10-19

    Does anyone know how to control a Stardock desktop gadget? It doesn't remember its position on Windows start up. I thought it would be a simple matter to use pywinauto to set the position, but the gadget has no associated window that I can see with app.windows_().

     
    • eryksun
      eryksun
      2007-10-19

      It turns out I had to manually connect_() to the gadget even though I ran it with start_(). Now that I have access to the dialogs, my problem is getting MoveWindow(x,y) to work. It does absolutely nothing. I also can't get DragMouse() to work. I wrote a function that uses the SendKey-based mouse functions instead:

      def DragMouseInput(dlg,press_coords=(0,0),release_coords=(0,0)):
         dlg.PressMouseInput(coords = press_coords)
         dlg.MoveMouse(coords = release_coords)
         dlg.ReleaseMouseInput(coords = release_coords)

      This lets me drag the gadget, but other windows can interfere. I'd rather find a way to make MoveWindow() work.

       
    • Hi eryksun,

      Can you try this one:

      import pywinauto.application
      import time

      app = pywinauto.application.Application().start('notepad')
      time.sleep(10)
      app.top_window_().MoveWindow(10,10)

      Just my two cents.

      Regards,
      TS