tp9191 Posted March 3, 2013 Share Posted March 3, 2013 I can't seem to do anything with it. I can't use WinActivate, ControlClick, etc.Anyone have any ideas what's wrong, or any alternative to try? Link to comment Share on other sites More sharing options...
kylomas Posted March 3, 2013 Share Posted March 3, 2013 tp9191, Did you uncheck "Freeze" under "Options"? kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
tp9191 Posted March 3, 2013 Author Share Posted March 3, 2013 Maybe I am not understanding something, but I'll ask.. how exactly is that supposed to help me? As you can see, I can get the info for this program (WM Capture) just fine. It's the fact that when I try to write some script for WM Capture, the code isn't working at all. Even something easy like I mentioned such as a simple WinActivate. Link to comment Share on other sites More sharing options...
kylomas Posted March 3, 2013 Share Posted March 3, 2013 tp9191,I can't seem to do anything with it.Led me to believe that you were talking about the info tool. I see that you have the info for the "window". Maybe if you post your script someone can spot something.kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
tp9191 Posted March 3, 2013 Author Share Posted March 3, 2013 HotKeySet ( "{F12}", "F12" ) HotKeySet ( "{ESC}", "Terminate" ) While 1 Sleep(100) WEnd Opt("WinTitleMatchMode", 2) Func F12() WinActivate ("WMCap") ControlClick ("WMCap", "", "[CLASS:Static; INSTANCE:6]") EndFunc ;==>F12 Func Terminate() Exit 0 EndFunc ;==>Terminate Link to comment Share on other sites More sharing options...
Exit Posted March 3, 2013 Share Posted March 3, 2013 (edited) There should be some error checking. F12 is often already used by other tasks. Change F12 to F9 and it will do the job. Hopefully. $FX = "{F12}" ;$FX = "{F9}" ; uncomment this line to set Hotkey to F9 If HotKeySet("{ESC}", "_Hotkey") = 0 Then Exit MsgBox(16 + 262144, "Hotkeyset Error", "Hotkey {ESC} already set.") If HotKeySet($FX, "_Hotkey") = 0 Then Exit MsgBox(16 + 262144, "Hotkeyset Error", "Hotkey " & $FX & " already set.") Func _Hotkey() Switch @HotKeyPressed Case "{ESC}" Exit MsgBox(262144, " ", "Exit", 0) Case $FX $return = WinActivate("[CLASS:#32770;REGEXPTITLE:WMCap]") If Not $return Then Exit MsgBox(262144, " ", "WinActivate failure.", 0) $return = ControlClick("[CLASS:#32770;REGEXPTITLE:WMCap]", "", "[CLASS:Static; INSTANCE:6]") If Not $return Then MsgBox(262144, " ", "ControlClick instance #6 failure. Now we try #1", 0) $return = ControlClick("[CLASS:#32770;REGEXPTITLE:WMCap]", "", "[CLASS:Static; INSTANCE:1]") If Not $return Then Exit MsgBox(262144, " ", "ControlClick instance #1 failure.", 0) Exit MsgBox(262144, " ", "Congratulation. You got it.", 0) EndSwitch EndFunc ;==>_Hotkey While 1 MsgBox(262144, " ", "Press " & $FX & " or ESC", 2) Sleep(3000) WEnd Edited March 3, 2013 by Exit App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
tp9191 Posted March 3, 2013 Author Share Posted March 3, 2013 (edited) Well, for some reason I got the WinActivate part to work when I changed "WMCap" to "WM Capture". "WM Capture" is what shows in the windows taskbar so I thought I'd give it a try and it worked. Now, why would that work if it's not what is shown in the Autoit Info Tool? I still have no luck on getting the ControlClick to work though HotKeySet ( "{F2}", "F2" ) HotKeySet ( "{ESC}", "Terminate" ) While 1 Sleep(100) WEnd Func F2() WinActivate ("WM Capture") Sleep (500) ControlClick ("WMCap", "", "[CLASS:Static; INSTANCE:6]") EndFunc Func Terminate() Exit 0 EndFunc Edited March 3, 2013 by tp9191 Link to comment Share on other sites More sharing options...
Exit Posted March 3, 2013 Share Posted March 3, 2013 Did you tried my script ? I think you should use controlnumber #1 instead of #6 At least you showed that on info tool App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
tp9191 Posted March 3, 2013 Author Share Posted March 3, 2013 I did not. I was too lazy and tired to even comprehend it being the newbie I am as it is. Though I will now and report back. Thank you. Link to comment Share on other sites More sharing options...
tp9191 Posted March 5, 2013 Author Share Posted March 5, 2013 Update: well, I tried the script and it said Congratulations I got it, which I assume means no error. So where do I go from here? Thank you. Link to comment Share on other sites More sharing options...
LarryDalooza Posted March 5, 2013 Share Posted March 5, 2013 It is possible that there is a "hidden" window or one that is off screen that the software developer uses for other operations. I have done that before. And it probably uses the same window title. If you winactivate and see that your window actually LOSES focus... then that is probably what is happening. Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
Exit Posted March 5, 2013 Share Posted March 5, 2013 Sorry, cannot debug further since i have no WM-Capture installed.But your finding was incorrect:Congratulations I got it. is wrong.Congratulation. You got it. would be OK. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
tp9191 Posted March 9, 2013 Author Share Posted March 9, 2013 It is possible that there is a "hidden" window or one that is off screen that the software developer uses for other operations. I have done that before. And it probably uses the same window title. If you winactivate and see that your window actually LOSES focus... then that is probably what is happening.Lar.Wow... what the heck.... I've been waiting for days for an email notification of this topic update and it never came!Anyhow, before your post, I had came back to say that I found the hidden window that resides in the left top corner of the screen.It has a title of: WM CaptureAnd the Class says: Afx:00400000:0:00010011:00000010:D7040191I managed to get the WinActivate to work, but for the life of me, I CANNOT get it to ControlClick to activate the Record button! I've tried several combinations following the examples in the help file.. and probably many of which are likely not even valid...Can someone please download the program and/or help me out here?Sorry, cannot debug further since i have no WM-Capture installed.But your finding was incorrect:Congratulations I got it. is wrong.Congratulation. You got it. would be OK. Well, as it was, the code was extremely basic that i feel this was a big waste of time. >_< Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now