How to update a field with "Form" variable
Been having a really hard time to do the following which should be a piece of cake with all the great instructions in Nick's tutorial.
I have some command line options in a field and I want to change one of the items in that field then update the gui. I've tried using a block also but still can't get it in my head. Here is the string method I've been trying.
label black "Select option:" option: drop-down 100 data ["20" "18" "19" "21" "25"] [replace f5/text "20" value show gui]
label black "Command Line:" tab f5: field 600 "--op 20 --preset 6 --tune 4" return
I want to update the "--op 20" in the f5 field by just changing the number not the "--op" part by the above drop-down selection. The above does work just fine but in this example. The 20 is changed to whatever the drop-down selects. Once a new number is selected the script no longer sees the "20" because it's been replaced.
I could do this with searching for a character at a certain location but I don't want to do it that way because the location of the "--op 20" may change in that field in the future when I add more options.
I would like the script to be able to just search for the number after the "--op" and update that number in the f5 field with whatever I selected in the drop-down.
posted by: Tony 8-Dec-2011/11:35:26-8:00