Search the Community
Showing results for tags 'Tab'.
-
Hi! Can someone help me with this? I upgraded from SciTe Edit Lite to full version. Now every time I edit a script it opens on a new SciTe tab, but I want it opens on a new window like before the upgrade. Can someone help me with that? Thanks!!
-
Help! The mouse clicks I'm sending to a control on a dialog box produce no response. The dialog box in question handles advanced display properties. The tab page my script interacts with is created by Trident Microsystems. It allows the user to enhance or attenuate the screen's RGB values. (See image.) My script automates the process of changing these in order to adjust the screen's hue or, when the red, green and blue values are all the same, the brightness. Producing a script to change the brightness has been quite straightforward. I use ControlClick() to send a mouse click to one of the trackbars on the right of the tab page. By default, they're linked and so move as one. The difficulty I'm having however is in automating the process when the desired red, green and blue values aren't the same as each other. Ordinarily, there are three ways of doing this: (1) clear the Link check box to unlink the three trackbars then either click on each trackbar or drag their sliders, (2) clear the Link tick-box then for each colour, click on the corresponding trackbar slider (to select it) then click on a point on the graph, and (3) click on the Load button to open an Open dialog box and load a preset (stored as a .gam file). However, when ControlClick() is used to clear the Link check box or to push the Load button, nothing happens. Making the dialog box the active window makes no difference. The AutoIt Window Info tool indicates that the Reload a Bitmap, Save, Load and Reset buttons, the Link check box and the graph are all the same control. (See other images.) In fact, it there are only four controls on the page: the tab page, which is an instance of a SysTabControl32 class, and the three trackbars, each of which is an instance of the TridentTrackBar class. (Am unsure whether the SysTabControl32 class is a Windows or third-party control.) What's the solution? Note that the MouseClick() function—as opposed to ControlClick()—does work, but having AutoIt commandeer the screen pointer isn't an acceptable solution. For the sake of completeness, here's the relevant code fragment for the Link check box. ;unlink trackbars WinActivate("(Multiple Monitors)") ControlClick("(Multiple Monitors)", "", 12320, "left", 1, 211, 252)
- 3 replies
-
- controlclick
- tab
-
(and 3 more)
Tagged with:
-
Hi everyone, I have created a ListView that is in a tab, and I want to display an image in that tab, with the ListView on top. However, the image still appears on top of my ListView. If I remove the tabs everything works. I looked at the autoit documentation and the <GuiListView.au3> documentation , I can't figure out how to display a background image, and put on top a ListView, inside a tab. 😥 Here is the code: Opt("GUIOnEventMode", 1) $Form1 = GUICreate($Titre, 700, 627, $Form1Width, $Form1Height); main window $tabulation = GUICtrlCreateTab(148,0,700,580); creating tabs $tab1=GUICtrlCreateTabItem("Tab 1"); first tab GUICtrlSetState(-1, $GUI_SHOW); this tab is selected by default $Pic1 = GUICtrlCreatePic("image.jpg", 0, 30, 700, 627) GUICtrlSetState(-1, $GUI_DISABLE). $idListview = GUICtrlCreateListView("list 1|list 2|list 3", 200, 50, 390, 200) GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Thank you in advance.
-
Hi Guis, I need to create keyboard shortcut to navigate the tabs and activate them, but I could not use the code below: #include <TabConstants.au3> #include <WindowsConstants.au3> #include <GuiTab.au3> #include <GUIConstantsEx.au3> HotKeySet("^{TAB}", "_TabRight") HotKeySet("^+{TAB}", "_TabLeft") $gui = GUICreate("test",450, 300) $Tab1 = GUICtrlCreateTab(20, 24, 425, 201) $TabSheet1 = GUICtrlCreateTabItem("Tabsheet 1") $lbContagemGrupos2 = GUICtrlCreateLabel("aaaa", 50, 50) GUICtrlSetColor(-1, 0x0000FF) GUICtrlCreateTabItem("") $TabSheet2 = GUICtrlCreateTabItem(" ") $TabSheet3 = GUICtrlCreateTabItem(" ") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func _TabRight() $CurPos = _GUICtrlTab_GetCurSel($Tab1) _GUICtrlTab_SetCurSel($Tab1, $CurPos + 1) $tab = "$TabSheet" & $CurPos GUICtrlSetState($TabSheet1 + $CurPos, $GUI_SHOW) Return EndFunc Func _TabLeft() $CurPos = _GUICtrlTab_GetCurSel($Tab1) _GUICtrlTab_SetCurSel($Tab1, $CurPos - 1) $tab = "$TabSheet" & $CurPos GUICtrlSetState($TabSheet1 + $CurPos, $GUI_SHOW) Return EndFunc Exit can you help me?
-
I made a software that download music and play it, but i have an idea , listen music online when we have internet connectionm ,no need for download any more, so i want to connect to soundclound but if wan to do that i need to open google chrome , so is there any way to open that in hide and not show on taskbar? sorry for my bad english
-
I am trying to click on a tab within an SWT_Window0. The problem is autoit can not see the tab's text and there is no controlid. I have tried using commands to obtain a handle and text with no luck. Any ideas on how to get control of this tab?
-
This UDF allows to create pseudo TreeViewTab control (tabs as TreeView). Useful for Settings dialog. Notes: Example: Download: TreeViewTab_1.2.zip TreeViewTab_1.1.zip Changelog:
-
Hi Developers, While trying to find a way to actually style/skin the GUICtrlCreateTabItem, I read the help file and stated: My question to you guys is will this be updated? or am I hoping for something that will never come to pass? I've seen scripts between 2007 to 2009 allowing the tabs to be modified Reason for my question is I'm trying to make my GUI Tabs look more modern. Thanks in advance for reading my post.
-
#include <GUIConstantsEx.au3> #include "GUIExtender.au3" $hGUI = GUICreate("Move Example", 250, 230) GUICtrlCreateGroup(" Choose Orientation ", 10, 10, 230, 80) $cRadio_Horz = GUICtrlCreateRadio(" Horizontal ", 20, 30, 100, 20) GUICtrlSetState(-1, $GUI_CHECKED) $cRadio_Vert = GUICtrlCreateRadio(" Vertical ", 20, 60, 100, 20) GUICtrlCreateGroup(" Choose Move Style ", 10, 100, 230, 110) $cRadio_0 = GUICtrlCreateRadio(" Fix Left ", 20, 120, 100, 20) $cRadio_1 = GUICtrlCreateRadio(" Fix Centre ", 20, 150, 100, 20) $cRadio_2 = GUICtrlCreateRadio(" Fix Right ", 20, 180, 100, 20) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cRadio_Horz GUICtrlSetData($cRadio_0, " Fix Left ") GUICtrlSetState($cRadio_0, $GUI_UNCHECKED) GUICtrlSetState($cRadio_1, $GUI_UNCHECKED) GUICtrlSetData($cRadio_2, " Fix Right ") GUICtrlSetState($cRadio_2, $GUI_UNCHECKED) Case $cRadio_Vert GUICtrlSetData($cRadio_0, " Fix Top ") GUICtrlSetState($cRadio_0, $GUI_UNCHECKED) GUICtrlSetState($cRadio_1, $GUI_UNCHECKED) GUICtrlSetData($cRadio_2, " Fix Bottom ") GUICtrlSetState($cRadio_2, $GUI_UNCHECKED) Case $cRadio_0 _Create_GUI(0) Case $cRadio_1 _Create_GUI(1) Case $cRadio_2 _Create_GUI(2) EndSwitch WEnd Func _Create_GUI($iMove) Local $sTitle Switch $iMove Case 0 If GUICtrlRead($cRadio_Horz) = 1 Then $sTitle = "Fixed Left" Else $sTitle = "Fixed Top" EndIf Case 1 $sTitle = "Fixed Centre" Case 2 If GUICtrlRead($cRadio_Horz) = 1 Then $sTitle = "Fixed Right" Else $sTitle = "Fixed Bottom" EndIf EndSwitch GUISetState(@SW_HIDE, $hGUI) $hGUI_Ex = GUICreate($sTitle, 500, 500) If GUICtrlRead($cRadio_Horz) = 1 Then _GUIExtender_Init($hGUI_Ex, 1, $iMove) _GUIExtender_Section_Create($hGUI_Ex, 0, 250) _GUIExtender_Section_Activate($hGUI_Ex, 2, "", "", 220, 10, 20, 20) _GUIExtender_Section_Create($hGUI_Ex, 250, 250) GUICtrlCreateLabel("", 250, 0, 250, 500) GUICtrlSetBkColor(-1, 0xFFCCCC) _GUIExtender_Section_Create($hGUI_Ex, -99) Else _GUIExtender_Init($hGUI_Ex, 0, $iMove) _GUIExtender_Section_Create($hGUI_Ex, 250, 0) _GUIExtender_Section_Activate($hGUI_Ex, 2, "", "", 470, 220, 20, 20) _GUIExtender_Section_Create($hGUI_Ex, 250, 250) GUICtrlCreateLabel("", 0, 250, 500, 250) GUICtrlSetBkColor(-1, 0xFFCCCC) _GUIExtender_Section_Create($hGUI_Ex, -99) EndIf _GUIExtender_Section_Action($hGUI_Ex, 2, False) GUISetState() While 1 $aMsg = GUIGetMsg(1) Switch $aMsg[0] Case $GUI_EVENT_CLOSE GUISetState(@SW_SHOW, $hGUI) GUIDelete($hGUI_Ex) _GUIExtender_Clear($hGUI_Ex) ExitLoop EndSwitch _GUIExtender_EventMonitor($aMsg[1], $aMsg[0]) ; Check for click on Action control WEnd EndFunc I am trying to implement 2 side window toggle hide and show with 2 different menu. can someone give me some direction thanks
-
Hi, First of all I would like say infinite thanks to the team involved in designing this great tool. Here is my problem 1. Press windows button 2. ESC 3. TAB 4. It will take me to the first pinned icon in the taskbar 5. If I I do SHIFT F10 which usually opens context menu like right click of the mouse. 6. For one of the application I am using it does not support Shift + F10 context menu rather it listens to only mouse right click event. 7. I do a search in a tree view of my application and the search item is selected or focused 8. For eg User1 User2 User3 Now if I search for User1 the tab or focus move to User 1 (Red) User1 User2 User3 If I search for User3 the tab or focus moves to User 3 Now my question is how can I move the mouse automatically go to the focused item on the window. Such that during automation I can issue MoveClick("{RIGHT}") as {SHIFT F10} is not working from the keyboard. It is a java app, unfortunately it is not honoring the right click events from keyboard to open the context WinMinimizeAll(); Send("^{ESC}") Sleep(200) Send("{ESC}") Send("{TAB}") the above scripts take the tab to the first pinned icon in the taskbar. Now i want MouseMove( "move to tab" selection") Regards, Tarakesh
-
Hello, i was working in two tipes of design have difirent problems for the same design 1st one i was making child gui for all tabs and sub tabs -problems: to big the code, for the tab1 its go back, but tab 2 doesn t move if for item 3, but i have to declarate 20 child guis in the end if it of course not now 2nd one i make child guid only for the sub tabs problems: doesnt go back from tab 1 to tab, and from tab2 to tab1, wen enter in tab1 doesnt charge the buttons, only if i click in outher tab item and go back the button appear CODE 1 - BIG MESSI #include <GuiTab.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> $GUI = GUICreate("", 450, 600, 0, 0); BitOR($WS_SIZEBOX, $WS_MINIMIZEBOX)) ;GUICtrlCreateMenu("") ;GUISetBkColor(0x940F1B) GUISetIcon("hunosicon.ico") $Pic1 = GUICtrlCreatePic("img\App\barra.jpg", 0, 0, 450, 120) $Button1 = GUICtrlCreateButton("FIRST TAB ITEM A", 0, 580, 450, 20) $Tab = GUICtrlCreateTab(1,120) GUICtrlCreateTabItem("A") ;GUICtrlSetState(-1, $GUI_SHOW) GUICtrlCreateTabItem("B") GUICtrlCreateTabItem("C") GUICtrlCreateTabItem("D") GUICtrlCreateTabItem("E") GUICtrlCreateTabItem("") GUISetState() ; //////////////////////////////A\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_1 = GUICreate("", 450, 440, 0, 140, BitOR($WS_POPUP, 0), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xE0A652) GUISetState(@SW_SHOW) ; //////////////////////////////B\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_2 = GUICreate("", 450, 440, 0, 140, BitOR($WS_POPUP, 1), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xAAAAAAA) GUISetState(@SW_HIDE) ; //////////////////////////////C\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_3 = GUICreate("", 445, 440, 0, 140, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xAAAEEAA) GUISetState(@SW_HIDE) ; //////////////////////////////D\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_4 = GUICreate("", 445, 440, 0, 120, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xAAAEEAA) $Tab1 = GUICtrlCreateTab(0,0,455,440,$tcs_buttons) _GUICtrlTab_SetBkColor($GUI_Child_4, $Tab1, 0xFFCCCC) GUICtrlCreateTabItem("<----") GUICtrlCreateTabItem("11") GUICtrlCreateTabItem("22") GUICtrlCreateTabItem("33") GUICtrlCreateTabItem("44") GUICtrlCreateTabItem("55") GUICtrlCreateTabItem("66") GUICtrlCreateTabItem("") GUISetState(@SW_HIDE) ; //////////////////////////////E\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_5 = GUICreate("", 445, 440, 0, 140, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xAAAEEAA) GUISetState(@SW_HIDE) ; //////////////////////////////11\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_6 = GUICreate("", 445, 440, 0, 120, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xAAAE6AA) $Tab2 = GUICtrlCreateTab(0,0,455,440,$tcs_buttons) _GUICtrlTab_SetBkColor($GUI_Child_6, $Tab2, 0xFFAACC) GUICtrlCreateTabItem("<----") GUICtrlCreateTabItem("H2O") GUICtrlCreateTabItem("CO2") GUICtrlCreateTabItem("H2") GUICtrlCreateTabItem("O2") GUICtrlCreateTabItem("") GUISetState(@SW_HIDE) ; //////////////////////////////22\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_7 = GUICreate("", 445, 440, 0, 140, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_MDICHILD, $GUI) GUISetBkColor(0xAAAEEAA) GUISetState(@SW_HIDE) While 1 $msg = GUIGetMsg() Switch $msg Case -3 Exit Case $Tab $SelTab = _GUICtrlTab_GetCurSel($Tab) _GUICtrlTab_SetCurSel($Tab1, 2) ;_GUICtrlTab_SetCurSel($Tab2, 1) Switch $SelTab Case 0 ;A GUISetState(@SW_HIDE,$GUI_Child_7) GUISetState(@SW_HIDE,$GUI_Child_6) GUISetState(@SW_HIDE,$GUI_Child_5) GUISetState(@SW_HIDE,$GUI_Child_4) GUISetState(@SW_HIDE,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_SHOW,$GUI_Child_1) Case 1 ;B GUISetState(@SW_HIDE,$GUI_Child_7) GUISetState(@SW_HIDE,$GUI_Child_6) GUISetState(@SW_HIDE,$GUI_Child_5) GUISetState(@SW_HIDE,$GUI_Child_1) GUISetState(@SW_SHOW,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_4) Case 2 ;C GUISetState(@SW_HIDE,$GUI_Child_7) GUISetState(@SW_HIDE,$GUI_Child_6) GUISetState(@SW_HIDE,$GUI_Child_5) GUISetState(@SW_HIDE,$GUI_Child_4) GUISetState(@SW_SHOW,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_1) Case 3 ;D GUISetState(@SW_HIDE,$GUI_Child_7) GUISetState(@SW_HIDE,$GUI_Child_6) GUISetState(@SW_HIDE,$GUI_Child_5) GUISetState(@SW_SHOW,$GUI_Child_4) GUISetState(@SW_HIDE,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_1) Case 4 ;E GUISetState(@SW_HIDE,$GUI_Child_7) GUISetState(@SW_HIDE,$GUI_Child_6) GUISetState(@SW_SHOW,$GUI_Child_5) GUISetState(@SW_HIDE,$GUI_Child_4) GUISetState(@SW_HIDE,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_1) EndSwitch Case $Tab1 ; NUMBERS Tab $SelTab1 = _GUICtrlTab_GetCurSel($Tab1) _GUICtrlTab_SetCurSel($Tab2, 1) Switch $SelTab1 Case 0 _GUICtrlTab_ClickTab($Tab, 0, "left", False, 1, 100) Case 1 ;11 GUISetState(@SW_HIDE,$GUI_Child_7) GUISetState(@SW_SHOW,$GUI_Child_6) GUISetState(@SW_HIDE,$GUI_Child_5) GUISetState(@SW_HIDE,$GUI_Child_4) GUISetState(@SW_HIDE,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_1) Case 2; 22 GUISetState(@SW_SHOW,$GUI_Child_7) GUISetState(@SW_HIDE,$GUI_Child_6) GUISetState(@SW_HIDE,$GUI_Child_5) GUISetState(@SW_HIDE,$GUI_Child_4) GUISetState(@SW_HIDE,$GUI_Child_3) GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_1) EndSwitch Case $Tab2 ; TABLE PER $SelTab2 = _GUICtrlTab_GetCurSel($Tab2) ;_GUICtrlTab_SetCurSel($Tab1, 2) Switch $SelTab2 Case 0 ;MsgBox("0", "tttt", "hehhheh") _GUICtrlTab_ClickTab($Tab, 3, "left", False, 1, 100); IF I CHANGE TO 2 IT MOVE EndSwitch Case $Button1 _GUICtrlTab_ClickTab($Tab, 0, "left", False, 1, 100) EndSwitch WEnd Func _GUICtrlTab_SetBkColor($hWnd, $hSysTab32, $sBkColor) Local $aTabPos = ControlGetPos($hWnd, "", $hSysTab32) Local $aTab_Rect = _GUICtrlTab_GetItemRect($hSysTab32, -1) GUICtrlCreateLabel("", $aTabPos[0]+2, $aTabPos[1]+$aTab_Rect[3]+4, $aTabPos[2]-6, $aTabPos[3]-$aTab_Rect[3]-7) GUICtrlSetBkColor(-1, $sBkColor) GUICtrlSetState(-1, $GUI_DISABLE) EndFuncCODE 2 I THINK IS THE BETHER OPTION IF WORKS #include <GuiTab.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> ; //////////////////////////////MENU\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ; $GUI = GUICreate("", 450, 600, 0, 0); BitOR($WS_SIZEBOX, $WS_MINIMIZEBOX)) ;GUICtrlCreateMenu("") ;GUISetBkColor(0x940F1B) GUISetIcon("hunosicon.ico") $Pic1 = GUICtrlCreatePic("img\App\barra.jpg", 0, 0, 450, 120) $Button1 = GUICtrlCreateButton("BACK TO GUI", 0, 580, 450, 20); TESTE BUTON $Tab = GUICtrlCreateTab(1,120) GUICtrlCreateTabItem("A") $Button1 = GUICtrlCreateButton("AAAAAAA", 16, 254, 75, 25) ;GUICtrlSetState(-1, $GUI_SHOW) GUICtrlCreateTabItem("B") $Button2 = GUICtrlCreateButton("BBBBBBBB", 16, 254, 75, 25) GUICtrlCreateTabItem("C") GUICtrlCreateTabItem("D") GUICtrlCreateTabItem("E") GUICtrlCreateTabItem("") GUISetState() ; //////////////////////////////MENU1\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ $GUI_Child_1 = GUICreate("", 450, 440, 0, 120, BitOR($WS_POPUP, 0), $WS_EX_MDICHILD, $GUI) ;GUISetBkColor(0xE0A652) $Tab1 = GUICtrlCreateTab(0,0,455,440,$tcs_buttons) ; _GUICtrlTab_SetBkColor($GUI_Child_1, $Tab1, 0xFFCCCC) GUICtrlCreateTabItem("<----") GUICtrlCreateTabItem("11") GUICtrlCreateTabItem("22") $Button3 = GUICtrlCreateButton("222222", 16, 254, 75, 25) GUICtrlCreateTabItem("33") GUICtrlCreateTabItem("44") GUICtrlCreateTabItem("55") GUICtrlCreateTabItem("66") GUICtrlCreateTabItem("") GUISetState(@SW_HIDE) ; //////////////////////////////MENU 2\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ;<---, CASTELO PRINCIPAL, PA1, PA2, PA3 $GUI_Child_2 = GUICreate("", 445, 440, 0, 120, BitOR($WS_POPUP, $WS_BORDER), $WS_EX_MDICHILD, $GUI) ;GUISetBkColor(0xAAAE6AA) $Tab2 = GUICtrlCreateTab(0,0,455,440,$tcs_buttons) ; _GUICtrlTab_SetBkColor($GUI_Child_2, $Tab2, 0xFFAACC) GUICtrlCreateTabItem("<----") GUICtrlCreateTabItem("H2O") $Button4 = GUICtrlCreateButton("WATER C", 16, 254, 75, 25) GUICtrlCreateTabItem("CO2") GUICtrlCreateTabItem("H2") GUICtrlCreateTabItem("02") GUICtrlCreateTabItem("") GUISetState(@SW_HIDE) While 1 $msg = GUIGetMsg() Switch $msg Case -3 Exit Case $Tab $SelTab = _GUICtrlTab_GetCurSel($Tab) _GUICtrlTab_SetCurSel($Tab1, 2) ;_GUICtrlTab_SetCurSel($Tab2, 1) Switch $SelTab Case 3 GUISetState(@SW_HIDE,$GUI_Child_2) GUISetState(@SW_SHOW,$GUI_Child_1) EndSwitch Case $Tab1 ; $SelTab1 = _GUICtrlTab_GetCurSel($Tab1) _GUICtrlTab_SetCurSel($Tab2, 1) Switch $SelTab1 Case 0 ;MsgBox("0", "tttt", "hehhheh") _GUICtrlTab_ClickTab($Tab, 0, "left", False, 1, 100); GO BACK TO MENU Case 1 GUISetState(@SW_SHOW,$GUI_Child_2) GUISetState(@SW_HIDE,$GUI_Child_1) EndSwitch Case $Tab2 ; $SelTab2 = _GUICtrlTab_GetCurSel($Tab2) ;_GUICtrlTab_SetCurSel($Tab1, 2) Switch $SelTab2 Case 0 ;MsgBox("0", "tttt", "h55555") _GUICtrlTab_ClickTab($Tab, 0, "left", False, 1, 100); GO BACK TO MENU1 EndSwitch Case $Button1 _GUICtrlTab_ClickTab($Tab, 0, "left", False, 1, 100) EndSwitch WEnd Func _GUICtrlTab_SetBkColor($hWnd, $hSysTab32, $sBkColor) Local $aTabPos = ControlGetPos($hWnd, "", $hSysTab32) Local $aTab_Rect = _GUICtrlTab_GetItemRect($hSysTab32, -1) GUICtrlCreateLabel("", $aTabPos[0]+2, $aTabPos[1]+$aTab_Rect[3]+4, $aTabPos[2]-6, $aTabPos[3]-$aTab_Rect[3]-7) GUICtrlSetBkColor(-1, $sBkColor) GUICtrlSetState(-1, $GUI_DISABLE) EndFuncAny idea? I have been Reading a lot of the help file and web, but didnt get Thanks
-
Hi, i did some researchs how to set the font and the only way is to overwrite the subclass with WM_DRAWITEM. With WM_SETFONT i can only change the font for all tab pages, but i want to change the font for a specific page. So i have to set the $TCS_OWNERDRAWFIXED style to the tab control to send the WM_DRAWITEM message to the parent window. When i set this style, i can change the fonts, but sadly the tab looses the nice and simple "AutoIt style". I created two child guis, the first is the owner draw tab and the second the "Normal" tab. My questions is, how to create this special "AutoIt style"??? #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiTab.au3> #include <ColorConstants.au3> Global Const $ODT_TAB = 101 Global Const $ODS_SELECTED = 0x0001 Global Const $ODA_DRAWENTIRE = 0x1 Global Const $ODS_FOCUS = 0x0010 $hStrikeOutDefaultFont = _WinAPI_CreateFont(14, 0, 0, 0, 400, False, False, True) ; see system apps module $hGUI = GUICreate("Draw Tab", 500, 600) ; Create child GUIs to hold tabs $hTab_Win0 = GUICreate("", 400, 200, 50, 20, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) $hTab_0 = GUICtrlCreateTab(10, 10, 380, 180, $TCS_OWNERDRAWFIXED);BitOR($TCS_OWNERDRAWFIXED, $TCS_TOOLTIPS, $WS_TABSTOP, $WS_CLIPSIBLINGS)) $hTab_00 = GUICtrlCreateTabitem("00") GUICtrlCreateButton("00", 160, 90, 80, 30) $hTab_01 = GUICtrlCreateTabitem("01") GUICtrlCreateButton("01", 160, 90, 80, 30) GUICtrlCreateTabitem ("") GUISetState() $hTab_Win1 = GUICreate("", 400, 200, 50, 250, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) $hTab_1 = GUICtrlCreateTab(10, 10, 380, 180) $hTab_10 = GUICtrlCreateTabitem("10") GUICtrlCreateButton("10", 160, 90, 80, 30) $hTab_11 = GUICtrlCreateTabitem("11") GUICtrlCreateButton("11", 160, 90, 80, 30) GUICtrlCreateTabitem ("") GUISetState() GUIRegisterMsg($WM_DRAWITEM, "WM_DRAWITEM") ;~ GUIRegisterMsg($WM_SETFONT, "WM_SETFONT") ;~ GUICtrlSendMsg ( $hTab_1, $WM_SETFONT , $hStrikeOutDefaultFont, 1 ) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func WM_SETFONT($hWnd, $Msg, $wParam, $lParam) ConsoleWrite("$hWnd: " & $hWnd & " $Msg: " & $Msg & " $wParam: " & $wParam & " $lParam: " & $lParam & @CRLF) EndFunc Func WM_DRAWITEM($hWnd, $Msg, $wParam, $lParam) Local $DRAWITEMSTRUCT $DRAWITEMSTRUCT = DllStructCreate("uint cType;uint cID;uint itmID;uint itmAction;uint itmState;" & _ "hwnd hItm;hwnd hDC;dword itmRect[4];dword itmData", $lParam) If DllStructGetData($DRAWITEMSTRUCT, "cType") <> $ODT_TAB Then Return $GUI_RUNDEFMSG Local $cID = DllStructGetData($DRAWITEMSTRUCT, "cID") Local $itmID = DllStructGetData($DRAWITEMSTRUCT, "itmID") Local $itmAction = DllStructGetData($DRAWITEMSTRUCT, "itmAction") Local $itmState = DllStructGetData($DRAWITEMSTRUCT, "itmState") Local $hItm = DllStructGetData($DRAWITEMSTRUCT, "hItm") Local $hDC = DllStructGetData($DRAWITEMSTRUCT, "hDC") If $itmAction <> $ODA_DRAWENTIRE Then Return $GUI_RUNDEFMSG Local $iTextColor, $itmText $iTextColor = 0xFFFFFF Switch $itmID Case 0 $iBrushColor = 0x11AADD Case 1 $iBrushColor = 0xEEBB99 EndSwitch _WinAPI_SetBkMode($hDC, $TRANSPARENT) Local $iBrush = _WinAPI_CreateSolidBrush($iBrushColor) Local $iBrushOld = _WinAPI_SelectObject($hDC, $iBrush) $g_tRECT = DllStructCreate($tagRect, DllStructGetPtr($DRAWITEMSTRUCT, "itmRect")) DllStructSetData($g_tRECT, "Left", DllStructGetData($g_tRECT, "Left")) DllStructSetData($g_tRECT, "Top", DllStructGetData($g_tRECT, "Top")) DllStructSetData($g_tRECT, "Right", DllStructGetData($g_tRECT, "Right")) DllStructSetData($g_tRECT, "Bottom", DllStructGetData($g_tRECT, "Bottom")+10) _WinAPI_FillRect ( $hDC, $g_tRECT, $iBrush ) _WinAPI_SetTextColor($hDC, $iTextColor) _WinAPI_DrawText($hDC, "Item " & $itmID, $g_tRECT, $DT_LEFT) _WinAPI_SelectObject($hDC, $iBrushOld) _WinAPI_DeleteObject($iBrush) Return $GUI_RUNDEFMSG EndFunc ;==>WM_DRAWITEM Thanks in advance
- 1 reply
-
- wm_drawitem
- tab
-
(and 1 more)
Tagged with:
-
Hi, I've a problem and a few questions about list view. When I expand/collapse a group that causes the list view to add/remove a scrolling bar, the list view contents disappears and minimizing/restoring the window fix it. - How can I fix the list view content disappearing without removing $LVS_EX_FULLROWSELECT. Also, How can I: - expand a collapsed group without applying $LVGS_NORMAL and $LVGS_COLLAPSIBLE separately (without calling _GUICtrlListView_SetGroupInfo twice) - remove the empty space at the end of the list view when scrolled to the end. - place the groups expand arrow on the left side. Thanks. #include <GuiListView.au3> #include <GUIConstants.au3> Example() Func Example() GUICreate("ListView in a Tab", 400, 250) GUICtrlCreateTab(1, 1, 400, 200) GUICtrlCreateTabItem('Tab') $LV = GUICtrlCreateListView("Column", 15, 35, 370, 150) ;$LV = GUICtrlCreateListView("Column", 15, 35, 370, 150, Default, $WS_EX_CLIENTEDGE) ;Works, $LVS_EX_FULLROWSELECT removed. $BT1 = GUICtrlCreateButton("Expand 1", 50, 210, 100, 30) $BT2 = GUICtrlCreateButton("Expand 2", 250, 210, 100, 30) GUISetState() _GUICtrlListView_EnableGroupView($LV) _GUICtrlListView_InsertGroup($LV, -1, 1, "") _GUICtrlListView_SetGroupInfo($LV, 1, "Group", 1, BitOR($LVGS_COLLAPSED, $LVGS_COLLAPSIBLE)) For $i = 1 To 10 GUICtrlCreateListViewItem("Item " & $i, $LV) ;_GUICtrlListView_AddItem($LV, "Item " & $i) ;Same problem _GUICtrlListView_SetItemGroupID($LV, $i-1, 1) Next While 1 $msg = GUIGetMsg() Switch $msg Case $BT1 _GUICtrlListView_SetGroupInfo($LV, 1, "Group", 1, BitOR($LVGS_NORMAL, $LVGS_COLLAPSIBLE)) Case $BT2 _GUICtrlListView_SetGroupInfo($LV, 1, "Group", 1, $LVGS_NORMAL) _GUICtrlListView_SetGroupInfo($LV, 1, "Group", 1, $LVGS_COLLAPSIBLE) Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() EndFunc
-
Hello everyone, i have a problem on my scripts to activate the auto install of driver on W10 with autoit. When i open "control.exe", "sysdm.cpl" and i send "Send("^{TAB}")" my PC is doing nothing, like windows 10 don't take Control + Tab, but when i do with my keyboard it works, so i think there is something with the script with W10 ? Here it is the scripts i have : ProgressSet("3%", "Activation recherche auto pilote sur le net en cours...") Sleep(200) ShellExecute("control.exe", "sysdm.cpl") WinWait("Propriétés système") ;==> Attend la fenêtre msgbox(1,"test","1") Send("^{TAB}") msgbox(1,"test","2") Sleep(100) ControlClick("Propriétés système", "", "[ID:2008]") ;==> Envoi un clic msgbox(1,"test","3") Sleep(300) ControlClick("Paramètres d’installation de périphérique", "", "[ID:1082]") Sleep(100) ControlClick("Paramètres d’installation de périphérique", "", "[ID:1]") Sleep(300) ControlClick("Propriétés système", "", "[ID:1]") ProgressSet("5%", "Activation recherche auto pilote sur le net terminée...") Sleep(10000) All the french in the scripts are just the name of window opened. Thanks for the help.
- 2 replies
-
- send(^{tab})
- send
-
(and 3 more)
Tagged with:
-
As the title states, is there a way to detect which inputbox is "selected" like: if IsSelectedForWritingEtc($MyInputBox) then xxxx i was searching some without success, all my results were like how to read or and write to a inputbox. /T
- 3 replies
-
- guictrlcreateinput
- tab
-
(and 2 more)
Tagged with:
-
Hi, guys I'm in need of a little advice , help with my coding, I currently have 10 tab Gui pages 1-9 all have the same screen layout, on these screens i have a button that needs to access a function to do some workings out, but I don't want to have to copy this out 9 times all with different variable names is there a way to use a function that can be accessed by multiple screens ? working outs is done within the script but the output from this goes to tab one if button on tab one is used and so on for the 9 screens, sorry if this has been answered before or if im not looking at the correct sections of the help file, if your able to help or even point me to the correct section that tells me how to share a function accorss that would be great
-
How to remove grey area after the tabs? Code: ; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ; #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiButton.au3> #include <GuiTab.au3> $GUI = GUICreate("GUI",350,350,-1,-1,-1,-1) GUISetBkColor(0xFFFFFF,$GUI) $tab = GUICtrlCreatetab(10,10,335,329,-1,-1) GuiCtrlSetState(-1,2048) GUICtrlCreateTabItem("Page 1") GUICtrlCreateTabItem("Page 2") GUICtrlCreateTabItem("Page 3") GUICtrlCreateTabItem("Page 4") GUICtrlCreateTabItem("Page 5") GUICtrlCreateTabItem("") _GUICtrlTab_SetCurFocus($tab,-1) _GUICtrlTab_SetCurFocus($tab,0)
-
I recently had issues with the >_FFTableWriteToArray which turned out to be a bug with the function. I am having troubles again, but with a different FF function for the _FFTabSetSelected. The documentation for this function is contained in the attached picture (and below). Again, this is probably on me but I appreciate the help as I can't tell what I am doing wrong. It seems like the first parameter for this function can be a name or index of the tab and the second can be the parameter type. I also assume that if there is only one instance of FF open you can leave _FFWindowSelect() void of parameters and still select a tab. I also expect that if you if the function works it will select the tab and make it the active tab. My problem: the code only works if I manually select that tab. If another tab is selected it will crash. I can't get this function to work. documentation: $vTab (Optional) Label, index (0-n) or keyword: 0 = (default) index (0-n) of the tab. prev = next tab. next = previous tab. first = first tab. last = last tab. $sMode (Optional) Selection mode: index = (default) index (0-n) of the tab. label = Label (RegExp) of the tab. I am trying to use the label as the first parameter. I have tried this approach with the second parameter $name="3Dcart v6.4.1 Store Manager" _FFConnect() _FFWindowSelect() $setTab=_FFTabSetSelected($name,"label") and without $name="3Dcart v6.4.1 Store Manager" _FFConnect() _FFWindowSelect() $setTab=_FFTabSetSelected($name) No joy. Any help would be greatly appreciated.
- 2 replies
-
- ff.au3
- _FFTabSetSelected
-
(and 2 more)
Tagged with:
-
Hi all, last night I was playing with >MIDI UDF by Ascend4nt, and thought about making a game to learn the notes on the fretboard of the guitar (in the final I did not the game) but I made a guitar tablature tester. (Maybe I I add the game later.) Functions. Play notes. Play notes. while MouseDown+MouseMove Play Tabs. Change Speed. Highlight Note. Note: The tab file are into the tabs folder (see the file format if you want add more tabs) It does not supports sound effects as (slide,bend,pull off) Only clean notes. Update Version 0.1.3 (02/03/2014) Latest version! Version 0.1.3 (02/03/2014) Changed: _PlayTab Funcion rewritten Added: Play/Stop while Tab is sounding Added: Change Timing while Tab is sounding Added: Number Fret marks Added: Some tabs Guitar Tab Tester 0.1.3.rar Update Version 0.1.2 (18/02/2014) Older version! Version 0.1.2 (18/02/2014) Fixed: Notes up 9 fret Doesn't Sound Fixed: Notes Highlighting Added: English Notation Added: Some tabs Changed: GUI Look Changed: Code Structure Guitar Tab Tester 0.1.2.rar Capture: Well I hope You understand it was a hard fight vs Google traslate. (sorry for my English) suggestions, criticism, comments, help are wellcome. Saludos
-
I am looking to have a tab control with no buttons, and no tabs sticking out. I know there has to be a control to handle this, I just don't know what it is. The reason behind this is, in my full GUI, I have an image BG which hides the tab buttons, and so I want to make my own buttons to control the tabs... here is an example I made and have been playing with: #include <GUIConstantsEx.au3> #include <GuiTab.au3> global $muhval = 0 GUICreate("My GUI Tab", 450, 350) $butt = Guictrlcreatebutton("SET",10,10,50,20) $skroll = Guictrlcreatebutton("skroll",10,30,50,20) $bup = Guictrlcreatebutton("up",200,40,50,20) $bdown = Guictrlcreatebutton("down",200,70,50,20) $inp = Guictrlcreateinput("0x0000",70,10, 209, 28) $tab = GUICtrlCreateTab(100, 100, 200, 100) $tab0 = GUICtrlCreateTabItem("tab0") GUICtrlCreateLabel("label0", 30, 80, 50, 20) $tab1 = GUICtrlCreateTabItem("tab1") GUICtrlCreateLabel("label1", 30, 80, 50, 20) $tab2 = GUICtrlCreateTabItem("tab2") GUICtrlCreateLabel("label2", 30, 80, 50, 20) GUISetState() ;_GUICtrlTab_SetCurFocus($tab, 1) ;_GUICtrlTab_SetCurSel($tab, 1) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $butt change() Case $skroll skroll() case $bup up() case $bdown down() endswitch WEnd func change() Guictrlsetstyle($tab, guictrlread($inp)) guictrlsetdata($skroll, guictrlread($inp)) endfunc func skroll() do $MuhVal +=1 $blah = 0x & $muhval Guictrlsetstyle($tab, $blah) guictrlsetdata($skroll, $blah) sleep(100) until $MuhVal = 9999 endfunc func up() $MuhVal +=1 $blah = 0x & $muhval Guictrlsetstyle($tab, $blah) guictrlsetdata($skroll, $blah) endfunc Func down() $MuhVal -=1 $blah = 0x & $muhval Guictrlsetstyle($tab, $blah) guictrlsetdata($skroll, $blah) endfunc Thanks!!
-
Hi, Cant get this RichEdit box to display in in a specific tab...what am I missing? #include <GUIConstantsEx.au3> #include <GuiRichEdit.au3> #include <WindowsConstants.au3> #include <GuiStatusBar.au3> #include <GuiEdit.au3> #include <misc.au3> Opt('MustDeclareVars', 1) Example() Func Example() Local $tab, $tab0, $tab0OK, $tab0input Local $tab1, $tab1combo, $tab1OK Local $tab2, $tab2OK, $msg local $hRichEdit,$hGui $hGui=GUICreate("My GUI Tab", 250, 150); will create a dialog box that when displayed is centered GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) $tab = GUICtrlCreateTab(10, 10, 200, 100) $tab0 = GUICtrlCreateTabItem("tab0") ; GUICtrlCreateLabel("label0", 30, 80, 50, 20) ; $tab0OK = GUICtrlCreateButton("OK0", 20, 50, 50, 20) ; $tab0input = GUICtrlCreateInput("default", 80, 50, 70, 20) $hRichEdit = _GUICtrlRichEdit_Create($hGui, "ss", 80, 50, 70, 20, BitOR($ES_MULTILINE, $WS_VSCROLL)) $tab1 = GUICtrlCreateTabItem("tab----1") GUICtrlCreateLabel("label1", 30, 80, 50, 20) $tab1combo = GUICtrlCreateCombo("", 20, 50, 60, 120) GUICtrlSetData(-1, "Trids|CyberSlug|Larry|Jon|Tylo", "Jon"); default Jon $tab1OK = GUICtrlCreateButton("OK1", 80, 50, 50, 20) $tab2 = GUICtrlCreateTabItem("tab2") GUICtrlSetState(-1, $GUI_SHOW); will be display first GUICtrlCreateLabel("labeqqqql2", 30, 80, 50, 20) $tab2OK = GUICtrlCreateButton("OK2", 140, 50, 50) GUICtrlCreateTabItem(""); end tabitem definition GUICtrlCreateLabel("Click on tab and see the title", 20, 130, 250, 20) GUISetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $tab Then ; display the clicked tab WinSetTitle("My GUI Tab", "", "My GUI Tab" & GUICtrlRead($tab)) EndIf WEnd EndFunc ;==>Example tnx E.
-
I have looked and read for 2 days now without finding what I assume is a simple solution. Can someone please look at the codebelow and help me to understand why when the gui opens the controls on the default tab (tab1) do not show up unless another tab is selected and tab1 is re-selected. I am trying to get the controls to be available when the form opens. This code uses GUIScrollbars_Ex.au3 which I have attached if needed. and reads a MobileMan.ini file the contents wich are below. Thank you, [Groups] ActiveGroups=MobileTest,Mobile [Mobile] ActiveHosts=computer1,computer2,computer3,computer4 [MobileTest] ActiveHosts=computer5,computer6 #include <GuiConstants.au3> #include <GuiEdit.au3> #Include <Date.au3> #include <GUIScrollbars_Ex.au3> #include <Array.au3> $Logfile = @ScriptDir & '\' & @YEAR & "-" & @MON & "-" & @MDAY & "_" & @HOUR & "-" & @min & "-" & @SEC & "_" & 'MobileMan.log' Global $aHosts[1][18] = [[0, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",""]] ;~ Create Gui $sTitle = "Mobile Management Console" $sINI = @ScriptDir & "\MobileMan.ini" $GUI = GUICreate($sTitle,900, 570, -1, -1) $MessageMenu = GUICtrlCreateMenu("&File") $HelpMenu = GUICtrlCreateMenu("Help") GUICtrlCreateTab(160,10,730,310) $tabFreeform = GUICtrlCreateTabItem("tab1") $tabInpMessage = GUICtrlCreateInput("Enter text here...", 180,50,400,40, $ES_MULTILINE ) GUICtrlCreateTabItem("tab2") GUICtrlCreateTabItem("tab3") GUICtrlCreateTabItem("tab4") GUISetState() ;~ Create Child gui $cGUI = GUICreate("Child GUI", 140,525,10,10, $WS_CHILD, $WS_EX_CLIENTEDGE, $Gui) GUICtrlSetResizing($cGUI, $GUI_DOCKALL) Opt("GUICoordMode", 2) $GrpCord = GUISetCoord(5,5) $bToggleAll = GUICtrlCreateButton("Toggle All", -1, 1, 115, 20) GUISetState() FileOpen($Logfile,1) FileWrite($Logfile, _Now() & " - Session started" & @CRLF) ;~ Read ini $aGroups = IniReadSection($sINI, "Groups") If @error Then MsgBox(16, "Error", "Failed to read 'Groups' section.") FileWrite($Logfile, _Now() & " - Failed to read 'Groups' section" & @CRLF) Exit EndIf If ($aGroups[0][0] >= 1) And ($aGroups[1][0] = "ActiveGroups") Then $aActiveGroups = StringSplit($aGroups[1][1], ",") If ($aActiveGroups[0] = 1) And (StringStripWS($aActiveGroups[1], 8) = "") Then Dim $aActiveGroups[1] = [0] Else MsgBox(16, "Error", "Missing or invalid Groups keys.") FileWrite($Logfile, _Now() & " - Missing or invalid Groups keys" & @CRLF) Exit EndIf For $g = 1 To $aActiveGroups[0] $sGroupName = $aActiveGroups[$g] $aGroupSection = IniReadSection($sINI, $sGroupName) If @error Then MsgBox(16, "Error", "Failed to read groups section: '" & $sGroupName & "'.") FileWrite($Logfile, _Now() & " - Failed to read groups section: '" & $sGroupName & "'" & @CRLF) ContinueLoop EndIf If ($aGroupSection[0][0] >= 1) And ($aGroupSection[1][0] = "ActiveHosts") Then $aActiveHosts = StringSplit($aGroupSection[1][1], ",") If ($aActiveHosts[0] = 1) And (StringStripWS($aActiveHosts[1], 8) = "") Then Dim $aActiveHosts[1] = [0] For $h = 1 To $aActiveHosts[0] _AddActiveHost($sGroupName, $aActiveHosts[$h]) Next Else MsgBox(16, "Error", "Missing or invalid keys in group: '" & $sGroupName & "'.") FileWrite($Logfile, _Now() & " - Missing or invalid keys in group: '" & $sGroupName & "'." & @CRLF) ContinueLoop EndIf Next Dim $GrpButton[($aActiveGroups[0] + 1)] $Btn_Start = GUICtrlCreateDummy() For $g = 1 To $aActiveGroups[0] $GrpButton[$g] = GUICtrlCreateButton($aActiveGroups[$g],-1, 1, 115, 20) FileWrite($Logfile, _Now() & " - Group created: '" & $aActiveGroups[$g] & "'" & @CRLF) For $n = 1 To $aHosts[0][0] if $aActiveGroups[$g] = $aHosts[$n][0] then $aHosts[$n][2] = GUICtrlCreateCheckbox($aHosts[$n][1],-1,0,130,15) if $aActiveGroups[$g] = $aHosts[$n][0] then FileWrite($Logfile, _Now() & " - Host created: '" & $aHosts[$n][1] & "'") if $aActiveGroups[$g] = $aHosts[$n][0] then $aHosts[$n][3] = IniRead($sINI, $aActiveGroups[$g], 'Share','C$') ;~ if $aActiveGroups[$g] = $aHosts[$n][0] then $aHosts[$n][4] = ping ($aHosts[$n][1],$PingTimeout) ;~ if not $aHosts[$n][4] = 1 then GUICtrlSetState ($aHosts[$n][2],$GUI_DISABLE) if $aHosts[$n][4] = 1 then GUICtrlSetState ($aHosts[$n][2],$GUI_ENABLE) if $aActiveGroups[$g] = $aHosts[$n][0] and not $aHosts[$n][4] = 1 then FileWrite($Logfile, " -DISABLED" & @CRLF) Elseif $aActiveGroups[$g] = $aHosts[$n][0] Then FileWrite($Logfile, @CRLF) EndIf Next Next $Btn_End = GUICtrlCreateDummy() _GUIScrollbars_Generate($cGUI, 0, ($n * 15) + ($g * 21)) ;number of checkboxes in the list * 15 pixels (height of the checkbox + spacing ???) GUISetState() ;~ _ArrayDisplay($aActiveGroups) ;~ _ArrayDisplay($aHosts) While 1 $msg = GUIGetMsg() Switch $msg ;~ If $msg = $GUI_EVENT_CLOSE Then Case $GUI_EVENT_CLOSE Exit ;~ ElseIf $msg = $bToggleAll Then Case $bToggleAll For $n = 1 To $aHosts[0][0] If $aHosts[$n][0] = True Then If ControlCommand($cGUI, "", $aHosts[$n][2], "IsEnabled") Then If ControlCommand($cGUI, "", $aHosts[$n][2], "IsChecked") Then ControlCommand($cGUI, "", $aHosts[$n][2], "Uncheck") Else ControlCommand($cGUI, "", $aHosts[$n][2], "Check") EndIf EndIf EndIf Next Case $bToggleAll For $n = 1 To $aHosts[0][0] If $aHosts[$n][0] = True Then If ControlCommand($cGUI, "", $aHosts[$n][2], "IsEnabled") Then If ControlCommand($cGUI, "", $aHosts[$n][2], "IsChecked") Then ControlCommand($cGUI, "", $aHosts[$n][2], "Uncheck") Else ControlCommand($cGUI, "", $aHosts[$n][2], "Check") EndIf EndIf EndIf Next Case $Btn_Start To $Btn_End For $n = 1 To $aHosts[0][0] If $aHosts[$n][0] = GUICtrlRead($Msg) Then If ControlCommand($cGUI, "", $aHosts[$n][2], "IsEnabled") Then If ControlCommand($cGUI, "", $aHosts[$n][2], "IsChecked") Then ControlCommand($cGUI, "", $aHosts[$n][2], "Uncheck") Else ControlCommand($cGUI, "", $aHosts[$n][2], "Check") EndIf EndIf EndIf Next EndSwitch WEnd Func _AddActiveHost($sGrp, $sHost) ReDim $aHosts[UBound($aHosts) + 1][UBound($aHosts, 2)] ; Resize the array $aHosts[0][0] = UBound($aHosts) - 1 ; Save count in [0][0] $aHosts[$aHosts[0][0]][0] = $sGrp ; Put group in [n][0] $aHosts[$aHosts[0][0]][1] = $sHost ; Put host in [n][1] EndFunc ;==>_AddActiveHostGUIScrollbars_Ex.au3
-
Hi everyone I have a problem resizing a window when a other tab is selected, the problem is not in resizing it but to keep the windows in the same position here's a example: #include <GUIConstantsEx.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 386, 274) $Tab1 = GUICtrlCreateTab(0, 0, 385, 273) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") GUICtrlSetState(-1, $GUI_SHOW) $input1 = GUICtrlCreateInput("Click in here", 60, 34, 100, 22) $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #endregion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Tab1 $pos = WinGetCaretPos() If GUICtrlRead($Tab1) = 0 Then WinMove($Form1, "", $pos[0] - 3, $pos[1] - 25, 386, 274) GUICtrlSetPos($Tab1, -1, -1, 386, 274) ElseIf GUICtrlRead($Tab1) = 1 Then WinMove($Form1, "", $pos[0] - 3, $pos[1] - 25, 276, 300) GUICtrlSetPos($Tab1, -1, -1, 276, 300) EndIf EndSwitch WEnd As you can see/test, if you change tab without clicking in a control (input1) the window will be resized without moving, but if you click/input in a control it starts moving Any tips?
-
The script below demonstrates my problem. If I run this script all icon buttons save the one created before the tab control are placed behind the tab and only the icon shows. I've tried everything I could think of, setting different styles, states etc. to the GUI, tab, button, icon... Well you get the picture. Nothing has worked thusfar and I'm at a complete loss here. Any help would be much appreciated. This will create a GUI with two tabs and four buttons of which three are behind the tab control. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> Local $iExit, $iGUIMsg GUICreate('Problem...', 180, 150, -1, -1, $GUI_SS_DEFAULT_GUI, $WS_EX_TOPMOST) ; This button will show correctly. $iExit = _IconOnButton('Close', 10, 120, 160, 20, 200) ; Create tab. GUICtrlCreateTab(5, 5, 120, 140) ; First item and button with missing text and borders. GUICtrlCreateTabItem('One') _IconOnButton('First', 10, 30, 160, 20, 3) ; Second item and button with missing text and borders. GUICtrlCreateTabItem('Two') _IconOnButton('Second', 10, 60, 160, 20, 24) ; Close tab control. GUICtrlCreateTabItem('') ; Another button with missing text and borders. _IconOnButton('Third', 10, 90, 160, 20, 1001) GUISetState(@SW_SHOW) While 1 $iGUIMsg = GUIGetMsg() Switch $iGUIMsg Case $iExit, $GUI_EVENT_CLOSE ; Exit Exit EndSwitch WEnd ; By Valuater Func _IconOnButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $BIconNum, $BIDLL = 'shell32.dll') GUICtrlCreateIcon($BIDLL, $BIconNum, $BIleft + 5, $BItop + (($BIheight - 16) / 2), 16, 16) GUICtrlSetState( -1, $GUI_DISABLE) Local $XS_btnx = GUICtrlCreateButton($BItext, $BIleft, $BItop, $BIwidth, $BIheight, $WS_CLIPSIBLINGS) Return $XS_btnx EndFunc