Jump to content

jedliu

Active Members
  • Posts

    21
  • Joined

  • Last visited

jedliu's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $main_GUI = GUICreate("Form1", 570, 292, 193, 125, BitOr($GUI_SS_DEFAULT_GUI,$WS_CLIPSIBLINGS)) $win_btn_1 = GUICtrlCreateButton("Window 1", 24, 40, 75, 25, 0) $win_btn_2 = GUICtrlCreateButton("Window 2", 24, 80, 75, 25, 0) GUISetState() $child1 = GUICreate("", 600, 300, 0, 0,BitOr($WS_CHILD,$WS_TABSTOP),-1,$main_GUI) $Group1_1 = GUICtrlCreateGroup("", 168, 16, 385, 257) $Group2_1 = GUICtrlCreateGroup("Group 1", 240, 56, 169, 97) $Label1 = GUICtrlCreateLabel("I am in window 1", 256, 88, 104, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState() $child2 = GUICreate("", 600, 300, 0, 0,BitOr($WS_CHILD,$WS_TABSTOP),-1,$main_GUI) $Group2_1 = GUICtrlCreateGroup("", 168, 16, 385, 257) $Group2_2 = GUICtrlCreateGroup("Group 2", 240, 56, 169, 97) $Label2 = GUICtrlCreateLabel("I am in window 2", 256, 88, 104, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISwitch($main_GUI) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $win_btn_1 GUISetState(@SW_SHOW, $child1) GUISetState(@SW_HIDE, $child2) Case $win_btn_2 GUISetState(@SW_HIDE, $child1) GUISetState(@SW_SHOW, $child2) EndSwitch WEnd This is use the child container. Works nice for me. @ ReFran Thanks for your offer of the link, I will check that too. Thanks!
  2. I have checked that post and I will test that code, seems it is great. Child window! Thanks, Martin. I will post the last code here when it is finished.
  3. still waiting for the help, thanks!
  4. Or maybe there is a some kind of container which I can put all the child controls in it. When I hide the parent container, all the child controls in it hide as well. I hope my explanation is clear. Thanks!
  5. @martin Thanks for your reply. You add the $hide_label2, that's nice, it make the tab looks better. Thanks. Re. the hidden state of the control, your code is more logical, I will use it. Regards my first question, I hope there could be a solution as well. Thanks to Martin!
  6. I have a couple of questions about the tab control. Please check the following example code, I have checked the helpfile but I am afraid I haven't gotten it. #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1_1 = GUICreate("Form1", 426, 297, 196, 128) $hide_label = GUICtrlCreateLabel("", 104, 8, 300, 36) $Tab1 = GUICtrlCreateTab(112, 24, 289, 193) ;GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") GUICtrlCreateLabel("I'm in TabSheet 1", 144, 106, 200, 50) $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") GUICtrlCreateLabel("I'm in TabSheet 2", 144, 106, 200, 50) $TabSheet3 = GUICtrlCreateTabItem("TabSheet3") GUICtrlCreateLabel("I'm in TabSheet 3", 144, 106, 200, 50) GUICtrlCreateTabItem("") $btn_TabSheet1 = GUICtrlCreateButton("TabSheet1", 16, 64, 75, 25) $btn_TabSheet2 = GUICtrlCreateButton("TabSheet2", 16, 104, 75, 25) $btn_TabSheet3 = GUICtrlCreateButton("TabSheet3", 16, 144, 75, 25) $Checkbox1 = GUICtrlCreateCheckbox("show the default tab buttons", 32, 240, 241, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $btn_TabSheet1 GUICtrlSetState($TabSheet1, $GUI_SHOW) Case $btn_TabSheet2 GUICtrlSetState($TabSheet2, $GUI_SHOW) Case $btn_TabSheet3 GUICtrlSetState($TabSheet3, $GUI_SHOW) Case $Checkbox1 If GUICtrlGetState($hide_label) = 96 Then GUICtrlSetState($hide_label, $GUI_SHOW) Else GUICtrlSetState($hide_label, $GUI_HIDE) EndIf EndSwitch WEnd Here are my questions: 1. I put a label control to cover the tab buttons. Is there way to hide them by styles or something else? PS: I want to use the buttons to switch the tab selected, so I want to hide the default tab item buttons. 2. How to switch the tab? here I use GUICtrlSetState($TabSheet3, $GUI_SHOW), I am not sure whether this is correct. 3. When I try to switch the state of the label control, I use this code at the beginning If GUICtrlGetState($hide_label) = $GUI_SHOW Then GUICtrlSetState($hide_label, $GUI_SHOW) Else GUICtrlSetState($hide_label, $GUI_HIDE) EndIfbut it can't work and then I changed to the following. How this come? I can't understand this. If GUICtrlGetState($hide_label) = 96 Then GUICtrlSetState($hide_label, $GUI_SHOW) Else GUICtrlSetState($hide_label, $GUI_HIDE) EndIf Thanks!
  7. This is great and it is really fast. Thanks! I will use it into my program, thx for sharing!
  8. Thanks for your reply. First of all, it is compiled exe file. With the /AutoIt3ExecuteScript Parameter, the EXE application can output the error to the cmd line. I haven't plan this will be illegal. Thanks for all your concerns. I will put this idea on a side. Thanks!
  9. Yes, I found this and tried to kill the first process with Processclose. And then it turns out not work if I did this. I don't quite understanding this, and does this two processes run the the same functions at the same time? Looking forward to hear some explanation, thanks!
  10. wow, I couldn't know whom I can ask for the permission. And if it is allowed, I don't know how to make it either. Any suggestions or advices? Thanks!
  11. @trancexx Thanks for your reply. I agree with you that AutoIt is really powerful. I am not sure change the AUTOIT parameter will break rights granted by license. (I am not expert at all) But if it won't, i hope some one can help me to make this idea to be fulfilled. Thanks.
  12. Oh, excuse me for the wrong post place. Thanks for moving this post to General Help and Support. I am really appreciated of this action. Thanks.
  13. I would like to change the AUTOIT parameter to another one, caz I don't want the people to see the parameter from the task manager when run this script. shall the param of "/AutoIt3ExecuteScript" to be changed? Don't want them to notice it is "AutoIt" script. first of all, I came up an idea to recompile the AUTOIT exe file. I downloaded the AUTOIT script autoit-v3.1.0-src.exe, But I couldn't find the words in these files. Is it possible? Any one can help me? Thanks so much!
  14. @ NerdFencer @ azure Thx, seems I have to think another way apply AutoIt into our application. Thx to your guys
  15. @Valuater Thanks, it will applied to IE global setting, I just hope it could effect in the AutoIt GUI. @KentonBomb Thanks, get the source code and replace the img tags, it will not show the images to the users. I am doing this for submitting some data to the server, and what I want is to ease the load of the server, Maybe this couldn't be achieved at the moment. I am wondering there will option when create IE obj to change the properites at that moment. hope there some way to solve this, Thx
×
×
  • Create New...