Jump to content

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


legiom455
 Share

Recommended Posts

$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

Link to comment
Share on other sites

$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.
Link to comment
Share on other sites

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).

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...