Dana Posted May 10, 2012 Share Posted May 10, 2012 When creating an input box (or any other control, for that matter) in Koda, there seems to be no way to use a variable as the initial text... as far as I can see it has to be changed after inserting it into the script and then redoing that change every time the GUI is changed in Koda and the script is updated? If I put the $variable name into Koda it treats it as static text and puts quotes around it. I realize I can create the form with dummy text and then use GUICtrlSetData, but that seems kludgy. Link to comment Share on other sites More sharing options...
Mat Posted May 10, 2012 Share Posted May 10, 2012 It can't do everything. It's designed more as a prototyping tool that the user then modifies with their own code, rather than doing everything. Quick hack is to replace "$..." with the actual variable name, simple regex would do it easily if you have lots of variables as text. AutoIt Project Listing Link to comment Share on other sites More sharing options...
Mechaflash Posted May 10, 2012 Share Posted May 10, 2012 Think of Koda as a template maker. It's really good at buildling a base for you to work on, but it requires tweaking to get exactly what you want. Sure beats typing it all out every time you go make a GUI. Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.” Link to comment Share on other sites More sharing options...
Zedna Posted May 10, 2012 Share Posted May 10, 2012 When creating an input box (or any other control, for that matter) in Koda, there seems to be no way to use a variable as the initial text... You are wrong. Koda can do it, switch ON: Options/Code Generator/Expand %var% variables Then place %a% into Input control's Text property. In generated code will be $Input1 = GUICtrlCreateInput($a, 120, 80, 121, 21) Mat 1 Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Dana Posted May 10, 2012 Author Share Posted May 10, 2012 Thanks Zedna, that's exactly what I was looking for. 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