atnextc Posted July 19, 2009 Share Posted July 19, 2009 I have a question..... Is it possible for me to create an AutoIt Script that will open up a popup window with the title "Select Subject Below" and have it have a drop down box that has say 5 "subjects" in it. Once said subject is selected hit OK button, and then is it able to "print out" the subject that was selected into a notepad file? Thanks in Advance Please let me know if you need better clarification. Link to comment Share on other sites More sharing options...
Mat Posted July 19, 2009 Share Posted July 19, 2009 What have you tried? MDiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
atnextc Posted July 19, 2009 Author Share Posted July 19, 2009 nothing as of yet I would just like to know if its possible first. I like to plan my scripts out before I just start to blindly write them. Link to comment Share on other sites More sharing options...
atnextc Posted July 19, 2009 Author Share Posted July 19, 2009 thanks for the reply.....that being said I'm no coder. I just use auto it to make my job a little more easier.... so would it be possible for you to point me in the right direction of how I would go about doing said list please? The gui i think i can handle.....but as far as the "actual coding" portion im sure to need help with I can never figure out how to start them but I can read other and "borrow" the information that I need to make mine work. Make sense? Link to comment Share on other sites More sharing options...
atnextc Posted July 20, 2009 Author Share Posted July 20, 2009 Ok this is what I have so far #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> GUICreate("Close CRM Cases", 276, 204, 541, 363) $Label1 = GUICtrlCreateLabel("Please Select The Case Subject Below", 48, 56, 189, 17) $Combo1 = GUICtrlCreateCombo("", 64, 104, 161, 25) GUICtrlSetData($Combo1,"Active Directory |Alert |Backups|Database|Default Subject|DNS|Domain Name Registeration|Firewall|FTP|General/OS|Hardware|Mail|Networking|Patch Management|SAN|Security Issues|SharePoint|Solution - New|Solution - Upgrade|SSL Purchase/Renewal") $BtnOK = GUICtrlCreateButton("OK", 32, 152, 81, 33, $WS_GROUP) $BtnExit = GUICtrlCreateButton("Exit", 152, 152, 81, 33, $WS_GROUP) GuiSetState () While 1 $nMsg = GUIGetMsg() If $nMsg = $BtnOK Then Send ("^c") ;Exit WEnd While 1 $nMsg = GUIGetMsg() If $nMsg = $BtnExit Then Exit WEnd What I want to happen if you click ok is that it will Copy the selected text and exit the program as well as remember it as to paste its value somewhere else. I can't figure out how to get it to copy. Please keep in mind im no coder. Also this was working but no for some reason its not. Link to comment Share on other sites More sharing options...
atnextc Posted July 20, 2009 Author Share Posted July 20, 2009 Thanks for the reply....that works great However when I attempt to add on more that to script to run programs and such and then copy the "variable" into it none of that works it stops after I click on the OK button on the GUI. Any ideas? Link to comment Share on other sites More sharing options...
atnextc Posted July 21, 2009 Author Share Posted July 21, 2009 Just as a quick example.. #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> GUICreate("Close CRM Cases", 276, 204, 541, 363) Local $Label1 = GUICtrlCreateLabel("Please Select The Case Subject Below", 48, 56, 189, 17) Local $Combo1 = GUICtrlCreateCombo("", 64, 104, 161, 25) GUICtrlSetData($Combo1, "Active Directory |Alert |Backups|Database|Default Subject|DNS|Domain Name Registeration|Firewall|FTP|General/OS|Hardware|Mail|Networking|Patch Management|SAN|Security Issues|SharePoint|Solution - New|Solution - Upgrade|SSL Purchase/Renewal") Local $BtnOK = GUICtrlCreateButton("OK", 32, 152, 81, 33, $WS_GROUP) Local $BtnExit = GUICtrlCreateButton("Exit", 152, 152, 81, 33, $WS_GROUP) GUISetState() While 1 Local $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $BtnExit Exit Case $msg = $BtnOK Local $string = GUICtrlRead($Combo1) ClipPut($string) Exit EndSelect WEnd Run ("notepad.exe") Send ($string) BTW does anyone have an issue with copying code from the site in Scite that it puts it all onto one line instead of spacing it all out like its supposed to? Thanks, Link to comment Share on other sites More sharing options...
atnextc Posted July 21, 2009 Author Share Posted July 21, 2009 Thanks for the reply...works great now and about the popup on the code much easier now. 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