SBrown Posted October 2, 2008 Share Posted October 2, 2008 How can I apply the style $WS_EX_TOOLWINDOW to a regular window, such as firefox? If that isn't possible, how can i set it on to and remove the item from the taskbar? Link to comment Share on other sites More sharing options...
Zedna Posted October 2, 2008 Share Posted October 2, 2008 (edited) $newStyle = ... $oldStyle = _WinAPI_GetWindowLong($hWnd, $GWL_STYLE) _WinAPI_SetWindowLong($hWnd, $GWL_STYLE, BitOR($oldStyle, $newStyle)) In your case use GWL_EXSTYLE instead of GWL_STYLE because $WS_EX_TOOLWINDOW is exstyle and not style Edited October 2, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
SBrown Posted October 2, 2008 Author Share Posted October 2, 2008 (edited) Im sorry, Im kinda new here at this. Could you post the code that would do the entire thing? Its confusing for me Edited October 2, 2008 by SBrown Link to comment Share on other sites More sharing options...
Zedna Posted October 2, 2008 Share Posted October 2, 2008 Im sorry, Im kinda new here at this. Could you post the code that would do the entire thing? Its confusing for me #include <Constants.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> $hWnd = WinGetHandle("Your window title", "Your window text") $newStyle = $WS_EX_TOOLWINDOW $oldStyle = _WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE) _WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, BitOR($oldStyle, $newStyle)) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
SBrown Posted October 2, 2008 Author Share Posted October 2, 2008 #include <Constants.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> $hWnd = WinGetHandle("Your window title", "Your window text") $newStyle = $WS_EX_TOOLWINDOW $oldStyle = _WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE) _WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, BitOR($oldStyle, $newStyle)) Thanks, but the window goes smaller, like the style does, but it isnt topmost, nor out of the taskbar Link to comment Share on other sites More sharing options...
Zedna Posted October 2, 2008 Share Posted October 2, 2008 I have seen some trick with setting parent to desktop window: #include <Constants.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> $hWnd = WinGetHandle("Your window title", "Your window text") $parent = _WinAPI_GetDesktopWindow() _WinAPI_SetParent($hWnd, $parent) But it seems to not work too. Search forum. I'm sure there is answer for your question already. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
SBrown Posted October 2, 2008 Author Share Posted October 2, 2008 i searched, no luck Link to comment Share on other sites More sharing options...
SBrown Posted October 2, 2008 Author Share Posted October 2, 2008 Looking on msdn, i found WS_EX_APPWINDOW, which keeps the window in the bar, how do i subtract that now? Link to comment Share on other sites More sharing options...
Zedna Posted October 2, 2008 Share Posted October 2, 2008 Looking on msdn, i found WS_EX_APPWINDOW, which keeps the window in the bar, how do i subtract that now? Try this: #include <Constants.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> $hWnd = WinGetHandle("Your window title", "Your window text") $oldStyle = _WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE) $newStyle = BitOR($oldStyle, $WS_EX_TOOLWINDOW) $newStyle = BitAND($newStyle, BitNOT($WS_EX_APPWINDOW)) _WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, $newStyle) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
SBrown Posted October 2, 2008 Author Share Posted October 2, 2008 Try this: #include <Constants.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> $hWnd = WinGetHandle("Your window title", "Your window text") $oldStyle = _WinAPI_GetWindowLong($hWnd, $GWL_EXSTYLE) $newStyle = BitOR($oldStyle, $WS_EX_TOOLWINDOW) $newStyle = BitAND($newStyle, BitNOT($WS_EX_APPWINDOW)) _WinAPI_SetWindowLong($hWnd, $GWL_EXSTYLE, $newStyle)nope dosnt work Link to comment Share on other sites More sharing options...
BinaryBrother Posted October 6, 2008 Share Posted October 6, 2008 Its possible to load other applications through an AutoIt GUI, through that, you can define regular AutoIt GUI events... Hope that helped you a bit... SIGNATURE_0X800007D NOT FOUND 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