TGxANAHEiiMx Posted December 10, 2010 Share Posted December 10, 2010 Greetings! I am in a corner at the moment. I am trying to create a app launcher and need some help--Overview, I want to have a combo that lists years (07, 08, 09...) and then a button that launches an external program for the year selected. Additionally I would like to use a RegRead for the path. This way I can pass around the launcher and regardless of the individual's install they can use it. A bit more info below... It is a tax program and the exe is "tax09.exe" In this example it is for the year 2009. (2008 would be tax08.exe...) So that is the combo question. The dir is ?:\wfx32\ (where ?=drive) It will always be installed to the root of a drive. There is a registry key that is created with the path listed above, so I want to use the RegRead to get this path. So; RegRead for the path + Combo for the year + Button to execute = me grateful for any help! Thanks!!! Link to comment Share on other sites More sharing options...
Realm Posted December 10, 2010 Share Posted December 10, 2010 Hello TGxANAHEiiMx, Welcome to the AutoIt Forums Good job detailing what it is your attempting to do!!! What is your question or problem that your having with your code? In order to receive prompt help with your problems, you must do 3 things: 1. Describe what it is your attempting to achieve with your code. 2. Describe what problem your having with your code 3. It always helps to provide code with your post or at least an example of it. Without the last 2 items, it's difficult to tell what you need Realm My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. Link to comment Share on other sites More sharing options...
ZacUSNYR Posted December 10, 2010 Share Posted December 10, 2010 Sounds simple enough, what are you being hung up on? Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 10, 2010 Share Posted December 10, 2010 Start with the basic functions in the help file, like GuiCtrlCreateCombo(), GuiCtrlSetData(), and RegRead()/RegWrite(). Try out the example scripts there to get a feel for them and try your script. If you get stuck, post what doesn't work and you'll get lots of help. And welcome to AutoIt. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
ZacUSNYR Posted December 10, 2010 Share Posted December 10, 2010 Simple GUI template to get you started if that's what you're looking for. A bunch of different ways to something like this - heres one way that came to my mind. expandcollapse popup#include <GUIConstantsEx.au3> Opt('GUIOnEventMode', 1) Global $mainGUI, $mainGUICombo1 MainGUI() Func MainGUI() $mainGUI = GUICreate("Tax Combo", "200", "100") GUISetOnEvent($GUI_EVENT_CLOSE, "MainGUI_On_Close") $mainGUICombo1 = GUICtrlCreateCombo("", 10, 30, 100, 200) GUICtrlSetData(-1, "2010|2009|2008|2007|2006|2005", "2010") $mainGUIButton1 = GUICtrlCreateButton("Launch", 125, 30, 70, 22) GUICtrlSetOnEvent(-1, "MainGUI_On_Button1") GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd EndFunc Func MainGUI_On_Button1() Local $selection = GUICtrlRead($mainGUICombo1) Switch $selection Case "2010" MsgBox(0, "2010", "2010 Selected - generate path code here") Case "2009" MsgBox(0, "2009", "2009 Selected - generate path code here") Case "2008" MsgBox(0, "2008", "2008 Selected - generate path code here") Case Else MsgBox(0, "Year not available", "Year is not currently Available") EndSwitch EndFunc Func MainGUI_On_Close() Exit EndFunc Link to comment Share on other sites More sharing options...
telmob Posted November 18, 2012 Share Posted November 18, 2012 (edited) This way works but all controls have to be set use to 'GuiSetOnEvent' or the GUI stalls. Is there another way to do this? Don't think i'm lazy but i have almost two hundred controls..... I need to use GuiSetOnEvent in one combo alone... Edited November 18, 2012 by telmob Link to comment Share on other sites More sharing options...
telmob Posted November 19, 2012 Share Posted November 19, 2012 Nevermind. This solved my problem 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