Jump to content

tsgsjm

Members
  • Posts

    3
  • Joined

  • Last visited

tsgsjm's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. PsaltyDS, yes you might be right there, just read about the ControlSend function. Note to self, take sometime to go through all the functions available to see what else might be handy. I now have my script working perfectly, but will try using the ControlSend as I can see how it would be more reliable. Thanks for the great support on here.
  2. Hi And thanks for the super fast response.
  3. My AutoIt script runs a windows application, which when the requested result is returned, a CONTROL_P is sent which sends the result to WordPad. This WordPad window needs to be on top as I save the contents as a TXT file. Now this WordPad window appears on top myabe 95% of the time, but occassionally it doesnt, which causes my whole process to fall over as it is basically unattended. Here's what I am currently doing ; Set window title match to be any substring match Opt("WinTitleMatchMode", 2) As the WordPad window contains a unique title set by the original application, I match on the "WordPad" substring. WinWaitActive("WordPad", "Carrier") $whnd1=WinGetHandle("WordPad", "Carrier") I also use the text "Carrier" which appears in the text of the WordPad window, and then get the window handle to use. WinSetOnTop($whnd1, "Carrier", 1) WinSetState($whnd1, "Carrier", @SW_SHOWMAXIMIZED) By setting the "On top" bit and issuing @SW_SHOWMAXIMIZED, this appears to work most of the time. I have also recently added the following ; Check if WordPad window is maximised and visible $state = WinGetState($whnd1, "Carrier") If BitAnd($state, 34) Then ; MsgBox(0, "OK", "OK") Else WinSetState($whnd1, "Carrier", @SW_SHOWMAXIMIZED) EndIf But this hasnt seemed to help either. When this script runs there are no other windows open. Any suggestion of what to try or to look at would be greatly appreciated. Thanks Steve McGinley
×
×
  • Create New...