I need to retreive values from a txt file and send them to the command “TypeText”. For this I started, with basically getting the values from the txt file to a variable, then send the value to TypeText.
Now the issue is, with a simple example, Iam trying to read in values to var from another data file. However, the value is not being loaded to the variable “var”. Always the message “Not equal to 2002” is being logged.
The data file has only 3 values - 2002, test, 2003
Note that the file search.txt is in the scripts folder itself.
open file "search.txt" read from file "search.txt" until end put the first word of it into var put var --doesnot display any value in log put 2002 into var1 Log"value of var1" & var1 if ( var is equal to var1) then Log "equal to 2002" else LogError "Not equal to 2002" end if close file "search.txt"
Is there a simpler way?
Thanks in advance.