In the below script I reference a text file that contains:
Sally
Henry
Jones
Harold
(c:\1\data.txt)
So when I run the dialog I want to make sure that MyDialog.MyEdit1 contains one of the values from the array. I receive equals for all input now.
Would you have to read each value individually and write it to an individual file for each name in the array? (which seems to defeat the purpose of an array)
Here's a simple example. Thanks in advance, Ed
Code: Select all
ReadFile>c:\1\data.txt,file
Dialog>MyDialog
Caption=ArrayTest
Width=445
Height=250
Top=CENTER
Left=CENTER
Max=1
Min=1
Close=1
Resize=1
Edit=MyEdit1,13,46,230,
Button=Test Script,64,110,129,20,3
Button=Exit Macro,277,58,100,20,2
Label=Enter Value,16,32,true
EndDialog>MyDialog
Label>MainLoop
Show>MyDialog,result
If>result=2,End
If>result=3,SayHello
Goto>MainLoop
srt>SayHello
If>{(%MyDialog.MyEdit1%<file>Message1
Else
GoSub>Message2
EndIf
End>SayHello
srt>Message1
MDL>In Array
end>Message
goto>End
srt>Message2
MDL>Not in Array
end>Message
goto>End
Label>End