Jump to content
Sign in to follow this  
legiom455

Koda Controls Input ... can "text" be displayed as $oldValue?

Recommended Posts

legiom455

$Input27 = GUICtrlCreateInput($oldGtitle[107], 264, 328, 169, 21)

I'm making a form, and want to show a "previously entered' value in an input box, ... as above ($oldGtitle)

but when I enter the $oldGtitle[107] into the text field, ... and then generate the script, I get

$Input27 = GUICtrlCreateInput("$oldGtitle[107]", 264, 328, 169, 21)

Which has the "quotes" around the text entry, as it should, ... Is there any way to tell Koda that I want to display a variable in that field and to stop putting the "quotes" around the variable?

thanks

Allen

Share this post


Link to post
Share on other sites
martin

$Input27 = GUICtrlCreateInput($oldGtitle[107], 264, 328, 169, 21)

I'm making a form, and want to show a "previously entered' value in an input box, ... as above ($oldGtitle)

but when I enter the $oldGtitle[107] into the text field, ... and then generate the script, I get

$Input27 = GUICtrlCreateInput("$oldGtitle[107]", 264, 328, 169, 21)

Which has the "quotes" around the text entry, as it should, ... Is there any way to tell Koda that I want to display a variable in that field and to stop putting the "quotes" around the variable?

thanks

Allen

There is almost a way to do what you want but it doesn't work with arrays.

If you have

$Input27 = GUICtrlCreateInput($oldGtitle$, 264, 328, 169, 21);note $ before and $ after variable name

and in your script have the line (before the $input27 = )

opt("ExpandVarStrings",1)

then the string will be interpreted as the variable.

I think it might be easier to add a line in your script after the koda section

GuiCtrlSetData($Input27,$oldGtitle[107])

EDIT: I'm wrong, see next post

Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
Lazycat

Koda already have this feature for years ;)

You have to place %-enclosed string anywhere in the text and enable "Expand %var% variables" option in the generating options.

So, text %oldGtitle[107]% will be expanded into $oldGtitle[107] - without quotes. This work for any text properties (text, caption, hint etc).

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  

×