Sign in to follow this  
Followers 0
jmstubiera

Toggle a form state

2 posts in this topic

Hello team,

Any ideas on how I can have a combo box change it's guistate. Below is my code:

$comboBox = GUICtrlCreateCombo("-- Select Type --", 280, 104, 145, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL, $WS_DISABLED))
GUICtrlSetData(-1, "One|Two|Three|Four")

So basically, once I click on a button, the $combo box's state will change from being disabled to being active again.

 

Thanks in advance.

Share this post


Link to post
Share on other sites



Have you checked out GUICtrlSetState?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • Rammanan
      By Rammanan
      Hi all,
      I new for Autoit.  Below is my code. It all work fine but after set text at drop down box function controlclick not work(No click on button). Please help me to solve this problem. Thanks
      if(WinWaitActive("Clotho -- Next Generation Avago WSD ATE Framework", "", 40)) then
         ControlSetText("Clotho -- Next Generation Avago WSD ATE Framework", "", "[NAME:textboxUserName]", $User)
         ControlClick("Clotho -- Next Generation Avago WSD ATE Framework", "", "[NAME:buttonLogin]")
         Do
         until WinWait ("Clotho -- Next Generation Avago WSD ATE Framework")
         WinActivate("Clotho -- Next Generation Avago WSD ATE Framework")
        ControlClick("Clotho -- Next Generation Avago WSD ATE Framework", "", "[Name:comboBoxPackage]")
        While 1
          Send("{DOWN}")
          $ctext=ControlGetText("Clotho -- Next Generation Avago WSD ATE Framework","","[Name:comboBoxPackage]")
          If $ctext= $Product Then
             ControlClick("Clotho -- Next Generation Avago WSD ATE Framework", "", "[Name:comboBoxPackage]")
             WinActivate("Clotho -- Next Generation Avago WSD ATE Framework")
             ControlClick("Clotho -- Next Generation Avago WSD ATE Framework", "", "[Name:buttonExecutionStart]")
             ExitLoop
          EndIf
       WEnd
       EndIf
    • vikashbitm2010
      By vikashbitm2010
      Hi all,
      I want to return string from autoit script to the python code.
      Autoit:
      Exit("22 FE 45") -> not working
      Exit(1) -> Working
      Exit(0) -> Working
      python:
      import os
      res=os.system(autoitmine.exe)
      print "res",res
      I got some hint of @ExitCode macro, but dont know how to use it to get the string in python variable 'res'.
      Please resolve this issue for me if anyone knows about this.
       
    • QuickWhiteWolf
      By QuickWhiteWolf
      Hi everyone,
       
      I was previously a member of this forum under the username Wombat. It's been years and multiple email accounts closed since then so I decided to start fresh and take a moment to thank you all... (Admins/Mods let me know if we need to discuss this...)
       
      I started programming with AutoIT while working as a scrap catcher for a machine that chopped scrap into pieces for easier moving, I learned styles and gained strengths from some of the best members on this forum by reverse engineering their code. I gained the confidence of our IT manager by making a boast that I could write an application to replace a p.o.s. cobalt based app we were using on the floor at that time, needless to say I was way in over my head but he saw that I had potential and I luckily had built several other apps on the side that were of equal or greater value to the company. I've been working as help-desk for the past 3 years and writing software as well to facilitate the help desk and solve recurring issues with our users. I was given an office and moved out of help-desk about a year ago, after 5 years of hard work I've actually landed the title of Jr. Developer moving into mid level title/pay this year! The company has already set out an improvement path that sees me with 4 certs and a bachelors in 4 more years making great money. Before this I had only ever worked at gas stations, fast food and manual labor jobs. If you're ever worried about your life, want something more, or just want a change you can do it. It's not easy, not at all, but it's possible and software programming is a very rewarding field if you like to make things and see how others interact with them.

      I utilized AutoIT to bring a company into the twenty-first century, away from paper trails and sticky notes improving the quality of life for the employees on the floor (where I started before learning AutoIT). I was given the go ahead to purchase visual studio and I learned VB.Net and built an awesome piece of Zebra labeling software (Utilizing ZPL code translated froma graphical editor) for our shipping department. Now I'm diving head first into C# and we have another programmer on board as we move on to MS Team Services and begin to tackle a sweet new project involving real time awareness of our product on the factory floor utilizing RFID and windows 10 tablets.

      That's a long way to come in just 4 years, and I couldn't have done it without the gigantic heart this community has and the mentorship provided for people looking to get into programming.

      So from the bottom of my heart, with immense respect.... Thank you so much AutoIT community
    • Valnurat
      By Valnurat
      Hi.
      How do you find all printers installed on a computer?
      I'm searching for the name, location and port
       
    • SorryButImaNewbie
      By SorryButImaNewbie
      Hello,
      I try to add a new UDF to my AutoIT library, and it seems I fail. I started to work following the insturctions found on the wiki . 
      I made an extra folder just next to my AutoIT folder, called ExtraUDF, and copied the file CUIAutomation2.au3 in it (I try to use this UDF for automating a program) then I run sciteconfig, set this folder up as User Include Folder, applied the changes, then run the calltip manager and got a msg when I tried to parse it. I attach a few pictures for better present the problem.
      I think I miss something here, should i put anything else on the ExtraUDF folder? I dont think that the CallTip manager added the udf to scite, If I try to run it i get a msg saying that I Scite cant open the include file and naturally after that, It can't use the functions called from it.
      Thank you for your help and insight as always! Please ask, if anything is fuzzy about the problem