Hypertrophy Posted June 24, 2009 Posted June 24, 2009 For example, how would I draw a red line completely around the perimeter of a window. This is new territory for me so i have no clue. Help would be appreciated.
BrettF Posted June 24, 2009 Posted June 24, 2009 I seem to remember a topic with a similar question a while back. Try finding topics that mention the way the AutoIt window Info tool did it... Had a quick look (5minutes of searching) but nothing turned up Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Hypertrophy Posted June 24, 2009 Author Posted June 24, 2009 BrettF: do you know where i can find that program?
Moderators Melba23 Posted June 24, 2009 Moderators Posted June 24, 2009 coder09, I was interested too, so I used Search (the button is in the title bar to the right) and I found the answer here. The final code (amended for the newer versions of Autoit) is:expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <Misc.au3> Opt("GuiOnEventMode", 1) HotKeySet("{ESC}", "QuitApp") If Not IsDeclared("WM_WINDOWPOSCHANGED") Then Assign("WM_WINDOWPOSCHANGED",0x0047) Global $ahGUI[4] Global $Last_hControl = -1 Global $Frame_Color = 0xff0000;0xFF0000 Global $Frame_Width = 2 Global $hCtrl $Main_GUI = GuiCreate("Highlight Controls Demo") GUISetOnEvent($GUI_EVENT_CLOSE, "QuitApp") GUIRegisterMsg($WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED") GUICtrlCreateButton("Button", 20, 20) GUICtrlCreateCheckbox("CheckBox", 20, 60) GUICtrlCreateEdit("", 120, 60, 240, 150) GUICtrlCreateLabel("Info: ", 20, 250) GUICtrlSetFont(-1, 9, 800) $Info_Label = GUICtrlCreateLabel("", 120, 270, 250, 80) GUISetState() While 1 Sleep(100) $hCtrl = _ControlGetHovered() If $hCtrl <> 0 And $Last_hControl <> $hCtrl And Not IsHighLight_GUIs($hCtrl) Then if not _IsPressed("1") Then $Last_hControl = $hCtrl $aCtrlPos = WinGetPos($hCtrl) GUICtrlSetData($Info_Label, _ "X = " & $aCtrlPos[0] & @CRLF & _ "Y = " & $aCtrlPos[1] & @CRLF & _ "W = " & $aCtrlPos[2] & @CRLF & _ "H = " & $aCtrlPos[3] & @CRLF & _ "Control Data = " & ControlGetText($hCtrl, "", "")) GUISquareDelete() GUICreateSquare($aCtrlPos[0], $aCtrlPos[1], $aCtrlPos[2], $aCtrlPos[3]) EndIf Else $aNewCtrlPos = WinGetPos($hCtrl) for $n = 0 to 3 if $aCtrlPos[$n] <> $aNewCtrlPos[$n] Then GUISquareDelete() $hCtrl = 0 $Last_hControl = 0 ExitLoop EndIf Next EndIf WEnd Func GUICreateSquare($X, $Y, $W, $H) $X -= $Frame_Width $Y -= $Frame_Width $W += $Frame_Width $H += $Frame_Width $ahGUI[0] = GUICreate("", $W, $Frame_Width, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) $ahGUI[1] = GUICreate("", $Frame_Width, $H, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) $ahGUI[2] = GUICreate("", $Frame_Width, $H, $X+$W, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) $ahGUI[3] = GUICreate("", $W+$Frame_Width, $Frame_Width, $X, $Y+$H, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) For $i = 0 To 3 GUISetState(@SW_SHOW, $ahGUI[$i]) Next EndFunc Func GUISquareDelete() For $i = 0 To 3 If IsHWnd($ahGUI[$i]) And $ahGUI[$i] <> $Main_GUI Then GUIDelete($ahGUI[$i]) Next $ahGUI = "" Dim $ahGUI[4] EndFunc Func IsHighLight_GUIs($hCtrl) For $i = 0 To 3 If $ahGUI[$i] = $hCtrl Then Return True Next Return False EndFunc Func _ControlGetHovered() Local $aRet = DllCall("user32.dll", "int", "WindowFromPoint", "long", MouseGetPos(0), "long", MouseGetPos(1)) If Not IsArray($aRet) Then Return SetError(1, 0, 0) Return HWnd($aRet[0]) EndFunc Func WM_WINDOWPOSCHANGED($hWndGUI, $MsgID, $WParam, $LParam) If $hWndGUI = $Main_GUI or $hWndGUI = $hCtrl Then GUISquareDelete() $Last_hControl = -1 Else Return $GUI_RUNDEFMSG EndIf EndFunc Func QuitApp() Exit EndFunc Credit to MrCreatoR and martin. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Hypertrophy Posted June 24, 2009 Author Posted June 24, 2009 Well done Melba. Thanks a bunch. You're going to have to teach me a few searching tricks because I searched for 15 minutes!
Hypertrophy Posted June 24, 2009 Author Posted June 24, 2009 I've been trying to get it to display the red border only around the active window, have any ideas?
FaT3oYCG Posted June 24, 2009 Posted June 24, 2009 learn how to search and then search XD. Interpreters have great power!Although they live in the shadow of compiled programming languages an interpreter can do anything that a compiled language can do, you just have to code it right.
Moderators Melba23 Posted June 24, 2009 Moderators Posted June 24, 2009 coder09, I am feeling generous today:expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Opt("GuiOnEventMode", 1) HotKeySet("{ESC}", "QuitApp") If Not IsDeclared("WM_WINDOWPOSCHANGED") Then Assign("WM_WINDOWPOSCHANGED",0x0047) Global $ahGUI[4] Global $Frame_Color = 0xFF0000 Global $Frame_Width = 2 $Main_GUI = GuiCreate("Highlight Window Demo") GUISetOnEvent($GUI_EVENT_CLOSE, "QuitApp") GUIRegisterMsg($WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED") GUISetState() Global $fSquare = False While 1 Sleep(100) If BitAND(WinGetState($Main_GUI), 8) Then If $fSquare = False Then ; Get window data $aWin = WinGetPos($Main_GUI) ; X Y $iBorder = _WinAPI_GetSystemMetrics(8); Border width $iBar = _WinAPI_GetSystemMetrics(4); Title bar height ; Get Client area size $aCA = WinGetClientSize($Main_GUI) ; Width, height GUICreateSquare($aWin[0] + $iBorder, $aWin[1] + $iBar + $iBorder, $aCA[0], $aCA[1]) WinActivate($Main_GUI) EndIf Else If $fSquare = True Then GUISquareDelete() EndIf WEnd Func GUICreateSquare($X, $Y, $W, $H) $X -= $Frame_Width $Y -= $Frame_Width $W += $Frame_Width $H += $Frame_Width $ahGUI[0] = GUICreate("", $W, $Frame_Width, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) $ahGUI[1] = GUICreate("", $Frame_Width, $H, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) $ahGUI[2] = GUICreate("", $Frame_Width, $H, $X+$W, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) $ahGUI[3] = GUICreate("", $W+$Frame_Width, $Frame_Width, $X, $Y+$H, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) For $i = 0 To 3 GUISetState(@SW_SHOW, $ahGUI[$i]) Next $fSquare = True EndFunc Func GUISquareDelete() For $i = 0 To 3 If IsHWnd($ahGUI[$i]) And $ahGUI[$i] <> $Main_GUI Then GUIDelete($ahGUI[$i]) Next $ahGUI = "" Dim $ahGUI[4] $fSquare = False EndFunc Func WM_WINDOWPOSCHANGED($hWnd, $MsgID, $WParam, $LParam) If $hWnd = $Main_GUI Then GUISquareDelete() Else Return $GUI_RUNDEFMSG EndIf EndFunc Func QuitApp() Exit EndFunc Have fun! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Hypertrophy Posted June 24, 2009 Author Posted June 24, 2009 (edited) Melba, Can't thank you enough! Edited June 24, 2009 by coder09
Hypertrophy Posted June 24, 2009 Author Posted June 24, 2009 Melba your code displays the red border around only the main gui. What I was asking is if it was possible to put the border around whatever window is currently active. Here's my attempt but its not working. Suggestions would be helpful. expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Opt("GuiOnEventMode", 1) HotKeySet("{ESC}", "QuitApp") If Not IsDeclared("WM_WINDOWPOSCHANGED") Then Assign("WM_WINDOWPOSCHANGED",0x0047) Global $ahGUI[4] Global $Frame_Color = 0xFF0000 Global $Frame_Width = 4 $Main_GUI = GuiCreate("Highlight Window Demo") GUISetOnEvent($GUI_EVENT_CLOSE, "QuitApp") GUIRegisterMsg($WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED") GUISetState() Global $fSquare = False While 1 Sleep(100) $handle = WinGetHandle("") ;~ If BitAND(WinGetState($handle), 8) Then If $fSquare = False Then ; Get window data $aWin = WinGetPos($handle) ; X Y $iBorder = _WinAPI_GetSystemMetrics(8); Border width $iBar = _WinAPI_GetSystemMetrics(4); Title bar height ; Get Client area size $aCA = WinGetClientSize($handle) ; Width, height GUICreateSquare($aWin[0]-3+ + $iBorder, $aWin[1]-3 + $iBar-21 + $iBorder, $aCA[0]+6, $aCA[1]+26) WinActivate($handle) EndIf ;~ Else ;~ If $fSquare = True Then GUISquareDelete() ;~ EndIf WEnd Func GUICreateSquare($X, $Y, $W, $H) $X -= $Frame_Width $Y -= $Frame_Width $W += $Frame_Width $H += $Frame_Width $ahGUI[0] = GUICreate("", $W, $Frame_Width, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) $ahGUI[1] = GUICreate("", $Frame_Width, $H, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) $ahGUI[2] = GUICreate("", $Frame_Width, $H, $X+$W, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) $ahGUI[3] = GUICreate("", $W+$Frame_Width, $Frame_Width, $X, $Y+$H, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) For $i = 0 To 3 GUISetState(@SW_SHOW, $ahGUI[$i]) Next $fSquare = True EndFunc Func GUISquareDelete() For $i = 0 To 3 If IsHWnd($ahGUI[$i]) And $ahGUI[$i] <> $Main_GUI Then GUIDelete($ahGUI[$i]) Next $ahGUI = "" Dim $ahGUI[4] $fSquare = False EndFunc Func WM_WINDOWPOSCHANGED($hWnd, $MsgID, $WParam, $LParam) If $hWnd = $Main_GUI Then GUISquareDelete() Else Return $GUI_RUNDEFMSG EndIf EndFunc Func QuitApp() Exit EndFunc
MrCreatoR Posted June 24, 2009 Posted June 24, 2009 Example with constant movements of the square: expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Opt("GuiOnEventMode", 1) HotKeySet("{ESC}", "QuitApp") ;If Not IsDeclared("WM_WINDOWPOSCHANGING") Then Assign("WM_WINDOWPOSCHANGING",0x0047) Global $ahGUI[4] Global $Frame_Color = 0xFF0000 Global $Frame_Width = 2 Global $iShow = True $Main_GUI = GUICreate("Highlight Window Demo") GUISetOnEvent($GUI_EVENT_CLOSE, "QuitApp") GUIRegisterMsg($WM_WINDOWPOSCHANGING, "WM_WINDOWPOSCHANGING") GUICreateSquare($Main_GUI) GUISetState(@SW_SHOW, $Main_GUI) While 1 Sleep(10) If $iShow And Not WinActive($Main_GUI) Then For $i = 0 To 3 GUISetState(@SW_HIDE, $ahGUI[$i]) Next $iShow = False EndIf WEnd Func GUICreateSquare($hWnd) $aWin = WinGetPos($hWnd) $iBorder = _WinAPI_GetSystemMetrics(8) ; Border width $iBar = _WinAPI_GetSystemMetrics(4) ; Title bar height $aCA = WinGetClientSize($Main_GUI) $X = ($aWin[0] + $iBorder) - $Frame_Width $Y = ($aWin[1] + $iBar + $iBorder) - $Frame_Width $W = $aCA[0] + $Frame_Width $H = $aCA[1] + $Frame_Width If IsHWnd($ahGUI[0]) Then WinMove($ahGUI[0], "", $X, $Y) Else $ahGUI[0] = GUICreate("", $W+$iBorder, $Frame_Width, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) EndIf If IsHWnd($ahGUI[1]) Then WinMove($ahGUI[1], "", $X, $Y) Else $ahGUI[1] = GUICreate("", $Frame_Width, $H+$iBorder, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) EndIf If IsHWnd($ahGUI[2]) Then WinMove($ahGUI[2], "", $X+$aCA[0]+$iBorder, $Y) Else $ahGUI[2] = GUICreate("", $Frame_Width, $H+$iBorder, $X+$W, $Y, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) EndIf If IsHWnd($ahGUI[3]) Then WinMove($ahGUI[3], "", $X, $Y+$aCA[1]+$iBorder) Else $ahGUI[3] = GUICreate("", $W+$Frame_Width, $Frame_Width, $X, $Y+$H, $WS_POPUP, $WS_EX_TOPMOST+$WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) EndIf For $i = 0 To 3 GUISetState(@SW_SHOW, $ahGUI[$i]) Next If Not WinActive($Main_GUI) Then WinActivate($Main_GUI) $iShow = True EndIf EndFunc Func WM_WINDOWPOSCHANGING($hWnd, $MsgID, $WParam, $LParam) If $hWnd = $Main_GUI Then GUICreateSquare($Main_GUI) Return $GUI_RUNDEFMSG EndFunc Func QuitApp() Exit EndFunc Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
Malkey Posted June 24, 2009 Posted June 24, 2009 I seem to remember a topic with a similar question a while back. Try finding topics that mention the way the AutoIt window Info tool did it... Had a quick look (5minutes of searching) but nothing turned up There is an example @http://www.autoitscript.com/forum/index.ph...st&p=573462The line "Global Const $PS_SOLID = 0" may need to be deleted or commented out.
Moderators Melba23 Posted June 24, 2009 Moderators Posted June 24, 2009 coder09, I hope this is this what you want, because I am slightly fed up of being told that my efforts are not what you want!expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Opt("GuiOnEventMode", 1) HotKeySet("{ESC}", "QuitApp") If Not IsDeclared("WM_WINDOWPOSCHANGED") Then Assign("WM_WINDOWPOSCHANGED", 0x0047) Global $ahGUI[4] Global $Frame_Color = 0xFF0000 Global $Frame_Width = 2 $Main_GUI = GUICreate("Highlight Window Demo") GUISetOnEvent($GUI_EVENT_CLOSE, "QuitApp") GUIRegisterMsg($WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED") GUISetState() Global $fSquare = False $iCurrentActive = 0 While 1 Sleep(100) $hActiveWindow = WinGetHandle("") If $hActiveWindow <> $iCurrentActive Then GUISquareDelete() If $fSquare = False Then ConsoleWrite("Firing" & @CRLF) ; Get window data $aWin = WinGetPos($hActiveWindow) GUICreateSquare($aWin[0], $aWin[1], $aWin[2], $aWin[3]) WinActivate($hActiveWindow) $iCurrentActive = $hActiveWindow EndIf WEnd Func GUICreateSquare($X, $Y, $W, $H) $X -= $Frame_Width $Y -= $Frame_Width $W += $Frame_Width $H += $Frame_Width $ahGUI[0] = GUICreate("", $W, $Frame_Width, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) $ahGUI[1] = GUICreate("", $Frame_Width, $H, $X, $Y, $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) $ahGUI[2] = GUICreate("", $Frame_Width, $H, $X + $W, $Y, $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) $ahGUI[3] = GUICreate("", $W + $Frame_Width, $Frame_Width, $X, $Y + $H, $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW) GUISetBkColor($Frame_Color) For $i = 0 To 3 GUISetState(@SW_SHOW, $ahGUI[$i]) Next $fSquare = True EndFunc ;==>GUICreateSquare Func GUISquareDelete() For $i = 0 To 3 If IsHWnd($ahGUI[$i]) And $ahGUI[$i] <> $Main_GUI Then GUIDelete($ahGUI[$i]) Next $ahGUI = "" Dim $ahGUI[4] $fSquare = False EndFunc ;==>GUISquareDelete Func WM_WINDOWPOSCHANGED($hWnd, $MsgID, $WParam, $LParam) If $hWnd = $Main_GUI Then GUISquareDelete() Else Return $GUI_RUNDEFMSG EndIf EndFunc ;==>WM_WINDOWPOSCHANGED Func QuitApp() Exit EndFunc ;==>QuitApp M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
MrCreatoR Posted June 24, 2009 Posted June 24, 2009 There is an example @Nice one!I hope this is this what you wantWell, there is highlighted taskbar after we deactivating our GUI... Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
Hypertrophy Posted June 25, 2009 Author Posted June 25, 2009 I'm getting an error on line 5 saying $PS_SOLID was previously declared as Const. expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Global Const $PS_SOLID = 0 $hGUI = GUICreate("TEST", 320, 240, -1, -1, BitOR($WS_POPUP, $WS_SIZEBOX)) GUISetBkColor(0x000000) GUIRegisterMsg($WM_NCPAINT, "WM_NCPAINT") GUISetState() Do Until GUIGetMsg() = -3 Func WM_NCPAINT($hWnd, $Msg, $wParam, $lParam) Local $hDC, $hPen, $OldPen, $OldBrush, $aHwndPos $hDC = _WinAPI_GetWindowDC($hWnd) $hPen = DllCall("gdi32.dll", "hwnd", "CreatePen", "int", $PS_SOLID, "int", 5, "int", 0x0000FF) $hPen = $hPen[0] $OldPen = _WinAPI_SelectObject($hDC, $hPen) $OldBrush = _WinAPI_SelectObject($hDC, _WinAPI_GetStockObject($NULL_BRUSH)) $aHwndPos = WinGetPos($hWnd) DllCall("gdi32.dll", "int", "Rectangle", "hwnd", $hDC, "int", 1, "int", 1, "int", $aHwndPos[2], "int", $aHwndPos[3]) _WinAPI_SelectObject($hDC, $OldBrush) _WinAPI_SelectObject($hDC, $OldPen) _WinAPI_DeleteObject($hPen) _WinAPI_ReleaseDC($hWnd, $hDC) Return True EndFunc
MrCreatoR Posted June 25, 2009 Posted June 25, 2009 I'm getting an error on line 5 saying $PS_SOLID was previously declared as Const.So remove this line if it's already declared Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
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