The operation completed successfully

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
If, during the delay (see below), I make a window other than TCMD the foreground window, I get
Code:
v:\> delay 5 & activate "TC 14.0 - 14.02  [2160]  v:\" /pos=0,0,800,600
TCC: (Sys) The operation completed successfully.
"TC 14.0 - 14.02  [2160]  v:\"
The window is moved and sized but not activated (no surprise since MS has really screwed up foreground/focus in Win7). But the (non-)error message seems inappropriate.
 
#3
It's coming from Windows, not TCC. Windows is reporting an API failure, TCC asks for the extended error info, and Windows says there isn't any.
I see this too in trying to implement a MOVEWIN plugin. For me, it's coming from FindWindow(). A "community addition" to the MS docs for FindWindow() warns:
Code:
Note that a return value of NULL with a GetLastError() of ERROR_SUCCESS indicates that there are no top-level windows matching the search criteria.
 
#4
Another place where this happens (sometimes!) is with SetForegroundWindow(). If the Windows no_steal_focus mechanism prevents SetForegroundWindow() (making it fail), GetLastError() can be ERROR_SUCCESS.