Werty Posted July 23, 2011 Share Posted July 23, 2011 (edited) I have a feeling that I'm supposed to be embarrased asking this, but how do I get the ControlHandle from ID instead of INSTANCE ?This works...$anger = ControlGetHandle("FaceIt", "", "[CLASS:msctls_trackbar32; INSTANCE:3]")..but gives me the wrong handle as there are several (many) msctls_trackbars that have INSTANCE:3 (located on different tabs) but they all have different ID: so I need to use the ID: instead but dunno how This does NOT work, gives me an empty string...$anger = ControlGetHandle("FaceIt", "", "[CLASS:msctls_trackbar32; ID:1750]")All the msctls_trackbars are located inside a SysTabControl32.Thanks in advance Edited July 25, 2011 by Werty Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
Werty Posted July 25, 2011 Author Share Posted July 25, 2011 Well, I'm not embarrased anyway since there has been no replies (bump) Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
monoscout999 Posted July 25, 2011 Share Posted July 25, 2011 (edited) I think that is imposible that the same window have the same control with the same class with the same instance.. try to mach the correct window, because that context is imposible. Anyway if you get the wrong handle then you will get the wrong ID too Edited July 25, 2011 by monoscout999 Link to comment Share on other sites More sharing options...
Werty Posted July 25, 2011 Author Share Posted July 25, 2011 They are located inside a SysTabControl32, which have 7 tabs, all tabs contains numerous trackbars (sliders), so it's like, on tab 1 there is a trackbar as INSTANCE:3, tab 2 also have a trackbar as INSTANCE:3, so there are like 7 different trackbars as INSTANCE:3, but located on different tabs. How do I access the different trackbars on say tab 7 ? That's where I'm stuck. I'll post some screenies from AU3Info and ControlViewer later. Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
bogQ Posted July 25, 2011 Share Posted July 25, 2011 (edited) maby your problem is activating tab before you take id or instance? this is based on sound options on XP located in control panel Ofc sound options dont have 7 tabs, they have 5 #include <GuiTab.au3> $anger = ControlGetHandle("Sounds", "", "[CLASS:SysTabControl32]") If @error Then MsgBox(0,"ERROR",@error) _GUICtrlTab_SetCurFocus($anger, 6) ;6 = to activate tab number 7, starting enum tab position is 0 try activating tab before takeing handle Edit: eather way in sound options takeing handle from ID: works 4 me, active tab or not, it dont make diffrance, but maby if you post link to the program that your using and if someone have time he can look directly in the problem. As for instance using to get handle result is diffrent with activating another tab holding identical CLASS: and INSTANCE: so activating tab will maby help you Edited July 25, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Werty Posted July 25, 2011 Author Share Posted July 25, 2011 Thanks, that did it, partially, I had been messing around with _SetCurSel() and couldnt get it working, but _SetCurFocus() works fine, and I get the handle I need. Now the problem is that it doesnt update the 3D view it is controlling, as if it expects a mouse release of some sort. When dragging the original slider in the program (FaceGen Modeller) it updates a 3D OpenGL viewport live, the model changes as the slider is moved. That doesnt happen when I update the slider with _GuiCtrlSlider_SetPos(), and GUICtrlSetData doesnt seem to work. Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
bogQ Posted July 25, 2011 Share Posted July 25, 2011 (edited) can you post picture with specific tab and slider marked in paint that you have problems with? Edited July 25, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Werty Posted July 25, 2011 Author Share Posted July 25, 2011 (edited) Not much to circle in paint, it's all these sliders, as mentioned when dragged they update the 3D view live, but when I change their value using _GUICtrlSlider_SetPos() the 3D view doesnt update. (edit: the sliders move to the position I tell them to, but the 3D view doesnt update) Edited July 25, 2011 by Werty Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
bogQ Posted July 25, 2011 Share Posted July 25, 2011 (edited) And do the sliders update? Edited July 25, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Werty Posted July 25, 2011 Author Share Posted July 25, 2011 And do the sliders update? Yes, you missed my update Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
bogQ Posted July 25, 2011 Share Posted July 25, 2011 (edited) i cant grab any controll with info tool, we are probablu using diffrent versions, any chance that i get link from your version? and the script that your using at the moment? Edited July 25, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Werty Posted July 25, 2011 Author Share Posted July 25, 2011 i cant grab any controll with info tool, we are probablu using diffrent versions, any chance that i get link from your version?and the script that your using at the moment?The info tool cant read them, but Yashied's ControlViewer can.my script is a bunch of mess right now, I'll post a cleaned up example later. Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
bogQ Posted July 25, 2011 Share Posted July 25, 2011 (edited) Its dumb solution but its working [autoit]_GUICtrlSlider_SetPos($anger, 20)ControlSend("","",$anger,"{UP}")[/autoit]no not working gota think another wayEdit: Btw i totaly missed that info tool in exaqmpel scripts, ty for link man lol Edited July 25, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Werty Posted July 25, 2011 Author Share Posted July 25, 2011 (edited) Its dumb solution but its working [autoit]_GUICtrlSlider_SetPos($anger, 20) ControlSend("","",$anger,"{UP}")[/autoit] no not working gota think another way Edit: Btw i totaly missed that info tool in exaqmpel scripts, ty for link man lol lol, works for me so far atleast I have the render window set as child for my Gui, grabbed it with _WinAPI_SetParent(). and yeah, CV.exe is cool. Edited July 25, 2011 by Werty Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
bogQ Posted July 25, 2011 Share Posted July 25, 2011 $anger = ControlGetHandle("FaceGen", "", "[CLASS:Edit; INSTANCE:1]") If @error Then MsgBox(0,"ERROR",@error) ControlSetText("","",$anger,"0.5") ControlSend("","",$anger,"{ENTER}") ok heare is working one, instead of slider we will attack edit box and it will work 100% TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Werty Posted July 25, 2011 Author Share Posted July 25, 2011 $anger = ControlGetHandle("FaceGen", "", "[CLASS:Edit; INSTANCE:1]") If @error Then MsgBox(0,"ERROR",@error) ControlSetText("","",$anger,"0.5") ControlSend("","",$anger,"{ENTER}") ok heare is working one, instead of slider we will attack edit box and it will work 100% ...but that say's DING DING DING all the time, atleast for me Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
bogQ Posted July 25, 2011 Share Posted July 25, 2011 (edited) well there isnt any other flexible solution for it, that is one crazy slider but you can try it like this to see if itl work if its working it shud not reproduce ding or dong #include <GuiTab.au3> #Include <GuiSlider.au3> $anger = ControlGetHandle("FaceGen", "", "[CLASS:msctls_trackbar32; INSTANCE:3]") _Slider_SetPos($anger,12); ,12) = in % Func _Slider_SetPos($Hwnd,$pos) _GUICtrlSlider_SetPos($Hwnd, $pos) Local $a = ControlGetPos("","",$Hwnd) $a[2] = ((($a[2] - 14)/100)*$pos)+7 ControlClick("","",$Hwnd,"",1,$a[2],10) EndFunc Edited July 25, 2011 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Werty Posted July 25, 2011 Author Share Posted July 25, 2011 well there isnt any other flexible solution for it, that is one crazy sliderNo problem as your example above works just fine for my need Thanks for downloading the program to test, much appreciated Some guy's script + some other guy's script = my script! 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