DCCD Posted May 2, 2009 Share Posted May 2, 2009 (edited) Hi, Is this the right way? #include <GUIConstants.au3> ; $hGui = GUICreate("My GUI Tab", 600, 500, 193, 115 ) GUISetBkColor (0xE0FFFF) $tab = GUICtrlCreateTab (-1,-1, 604,504) $tab0 = GUICtrlCreateTabitem ("If") $tab1 = GUICtrlCreateTabitem ("@error") $tab2 = GUICtrlCreateTabitem ("Then") $tab3 = GUICtrlCreateTabitem ("Exit") GUICtrlCreateTabitem ("") ; end tabitem definition ; GUISetState () _GetColor($hGui, $tab) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Func _GetColor($hWnd, $hSysTab32) $aTabPos = ControlGetPos($hWnd, "", $hSysTab32) ; ;$X = $aTabPos[0] ;$Y = $aTabPos[1] $W = $aTabPos[2] $H = $aTabPos[3] $var = PixelGetColor( $w , $h) TrayTip("GUICtrlCreateTab Stats...", "SIZE: " & $w &"," & $h &@CR&"HexColor = 0x"&Hex($var, 6), 10, 1) MsgBox(0,"The hex color is", "0x"&Hex($var, 6)) EndFunc Edited May 3, 2009 by DCCD [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
DCCD Posted May 2, 2009 Author Share Posted May 2, 2009 Hello . . . Is Anyone There? [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 2, 2009 Moderators Share Posted May 2, 2009 DCCD, Please do not bump your own post within 24 hours. Remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You just have to wait until someone who knows something about your particular problem, and is willing to help, comes online. Be patient and someone will answer eventually. Or if not - tough! ;-) This code will get the size and colour of a tab:#Include <GuiTab.au3> Opt('PixelCoordMode', 2) $hGUI = GUICreate('Test', 380, 400) $hTab = GUICtrlCreateTab(10, 10, 360, 380) $hTab0 = GUICtrlCreateTabItem('Tab') GUISetState() $aTab_Size = _GUICtrlTab_GetDisplayRect(GUICtrlGetHandle($hTab)) $iTab_Colour = '0x' & StringRight(Hex(PixelGetColor(0, 0, $hTab)), 6) MsgBox(0, '', 'Tab size: ' & $aTab_Size[2] - $aTab_Size[0] & ' x ' & $aTab_Size[3] - $aTab_Size[1] & @CRLF & @CRLF& _ 'Tab colour: ' & $iTab_Colour) Who can say whether it or your effort is more "right"? The most important criterion is that it works! 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 Link to comment Share on other sites More sharing options...
Yashied Posted May 2, 2009 Share Posted May 2, 2009 Hi, Is this the right way? expandcollapse popup#include <GUIConstants.au3> ; $hGui = GUICreate("My GUI Tab", 600, 500, 193, 115 ) GUISetBkColor (0xE0FFFF) $tab = GUICtrlCreateTab (-1,-1, 604,504) $tab0 = GUICtrlCreateTabitem ("If") $tab1 = GUICtrlCreateTabitem ("@error") $tab2 = GUICtrlCreateTabitem ("Then") $tab3 = GUICtrlCreateTabitem ("Exit") GUICtrlCreateTabitem ("") ; end tabitem definition ; GUISetState () _GetColor($hGui, $tab) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Func _GetColor($hWnd, $hSysTab32) $aTabPos = ControlGetPos($hWnd, "", $hSysTab32) ; ;$X = $aTabPos[0] ;$Y = $aTabPos[1] $W = $aTabPos[2] $H = $aTabPos[3] $var = PixelGetColor( $w , $h) TrayTip("GUICtrlCreateTab Stats...", "SIZE: " & $w &"," & $h &@CR&"HexColor = 0x"&Hex($var, 6), 10, 1) MsgBox(0,"The hex color is", "0x"&Hex($var, 6)) EndFuncoÝ÷ Ûú®¢×¡K~e£ºÚ"µÍÚ[ÛYH ÑÕRPÛÛÝ[Ë]LÉÝÂÚ[ÛYH ÑÕRPÛÛÝ[Ë]LÉÝÂÜ ÌÎNÔ^[ÛÛÜ[ÙIÌÎNËBÌÍÚÝZHHÕRPÜX]J ][ÝÓ^HÕRHX][ÝË LNLËLMH BÕRTÙ]ÐÛÛÜ LBÌÍÝXHÕRPÝÜX]UX L BÌÍÝXHÕRPÝÜX]UX][H ][ÝÒY][ÝÊBÌÍÝXHHÕRPÝÜX]UX][H ][ÝÐÜ][ÝÊBÌÍÝXHÕRPÝÜX]UX][H ][ÝÕ[][ÝÊBÌÍÝXÈHÕRPÝÜX]UX][H ][ÝÑ^] ][ÝÊBÕRPÝÜX]UX][H ][ÝÉ][ÝÊBÕRTÙ]Ý]H BÌÍÐÛÛXH^[Ù]ÛÛÜ K ÌÍÝXBÛÛÛÛUÜ]J ÌÎNÌ ÌÎNÈ [È^ ÌÍÐÛÛX JBÚ[HB ÌÍÛÙÈHÕRQÙ]ÙÊ BY ÌÍÛÙÈH ÌÍÑÕRWÑUSÐÓÔÑH[^]ÛÜÙ[ My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Yashied Posted May 2, 2009 Share Posted May 2, 2009 See this. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
DCCD Posted May 3, 2009 Author Share Posted May 3, 2009 I'm sorry to tell you "Melba23, Yashied", but this just won't work===========================================================Melba23\TabGetColor2.au3 (11) : ==> Incorrect number of parameters in function call.: ===========================================================$iTab_Colour = '0x' & StringRight(Hex(PixelGetColor(0, 0, $hTab)), 6) $iTab_Colour = '0x' & StringRight(Hex(^ ERROR===========================================================###########################################################===========================================================Yashied\TabGetColor3.au3 (11) : ==> Incorrect number of parameters in function call.:===========================================================$ColTab = PixelGetColor(5, 20, $tab) $ColTab = ^ ERROR===========================================================And I Am still interested.. [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
Yashied Posted May 3, 2009 Share Posted May 3, 2009 http://www.autoitscript.com/autoit3/docs/functions/PixelGetColor.htm My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
DCCD Posted May 4, 2009 Author Share Posted May 4, 2009 Upgrade to the latest version Of AutoIt ✔Now it works.... PixelGetColor ( x , y [, hwnd] )Thanks everyone! [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group 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