arandomguy01 Posted January 23, 2011 Share Posted January 23, 2011 (edited) Hello. I am trying to hide specific parts of a window such as title bar, status bar, some other controls and leave only 1 part. I've been able to hide some of the pieces of the window but the handles change so unless I pull them somehow (and their are a lot), I'm not quite sure how to go about it. The window I'm trying to do this to contains a map (the piece I want to keep) and a whole bunch of statistics, status bar, title bar etc. I basically want everything but the map hidden (toggle-able) and then probably set alpha on the remaining map part. I've been looking at _GUICtrlStatusBar_ShowHide and GUICtrlSetState. What could make this much easier for me is if I could use the control name/advanced mode name instead of the handle (can I do this?) since it won't change. The other way I could possible do this is to take that map control and copy it to another window created by autoit which I have no idea if that is possible. Thanks for your time. Edited January 23, 2011 by arandomguy01 Link to comment Share on other sites More sharing options...
JohnOne Posted January 23, 2011 Share Posted January 23, 2011 What could make this much easier for me is if I could use the control name/advanced mode name instead of the handle (can I do this?) since it won't changeI think so.Did you try? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
arandomguy01 Posted January 23, 2011 Author Share Posted January 23, 2011 I think so. Did you try? I did, but it doesn't seem to work unless I'm doing it wrong. I saw on another post that someone referred to a class in this manner [CLASS:classname] and I had no idea you could do that? When I attempted to use that syntax it did not work either. So I'm really not sure and at a standstill at the moment. Basically I guess what my main question is is can I use some name from the control/class/whatever that is static instead of the handle and if so how do I do this. As an example with the handle this is how I am doing it. #include <GuiStatusBar.au3> $hPane = 0x002B0620 _GUICtrlStatusBar_ShowHide($hPane, @SW_HIDE) Link to comment Share on other sites More sharing options...
JohnOne Posted January 23, 2011 Share Posted January 23, 2011 (edited) I would imagine so, but the example you offered does not use a classname. _GUICtrlStatusBar_ShowHide("[CLASS:msctls_statusbar32; INSTANCE:1]",@SW_HIDE) thats for the mspaint I dont know a great deal about this but I think there may be a Opt() option to be able to use something like that. Edited January 23, 2011 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
arandomguy01 Posted January 23, 2011 Author Share Posted January 23, 2011 I appreciate your help. I've tired a plethora of possible ways to do it but it doesn't seem to work unless I use the handles. I looked through the opt section and didn't see anything that pertained to this as far as I could tell. I guess I'll just leave it alone for a while and wait and see if someone knows for sure how to do it. If anyone has insight please let me know. Thanks for your time. Link to comment Share on other sites More sharing options...
JohnOne Posted January 23, 2011 Share Posted January 23, 2011 (edited) Perhaps I was mistaken. I get confused sometimes, I was thinking of WinTitleMatchMode see "Window Titles and Text (Advanced)" in helpfile. I was certain I had seen this method used on controls, but must have just been with the native functions. EDIT: Try your luck with ControlHide() function. Edited January 23, 2011 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted January 23, 2011 Share Posted January 23, 2011 This works for me $hwnd = winactivate("Untitled - Paint") WinWaitActive($hwnd) $CH = ControlHide($hwnd,"","[CLASS:msctls_statusbar32; INSTANCE:1]") If Not $CH Then MsgBox(0,"","") EndIf Sleep(5000) $CH = ControlShow($hwnd,"","[CLASS:msctls_statusbar32; INSTANCE:1]") except the desktop nees refreshing before the control is hidden or shown. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
arandomguy01 Posted January 23, 2011 Author Share Posted January 23, 2011 Nice one, thanks man. I can continue on now. I hate running into road blocks like that. Didn't realize ControlHide existed. *thumbs up* Thanks again. 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