livecode - How i write file into home(In linux system) -
i trying write file in home folder(i using linux operating system) while writing file temp it's working
put shell("echo $home") last1
the above code getting home folder , place path variable last1
put text of field "bash1" url "file:last1/dic.sh"
here bash1 text field , it's contains shell script want write home directory
the below code works
put text of field "bash1" url "file:/tmp/dic.sh"
how rewrite code
as last1 variable enclosed in quotes, it's getting treated literal string rather variable. following work:
put field "bash1" url ("file:" & last1 & "/dic.sh")
note not have refer explicitly text property when putting texts fields - can above. furthermore, if you're on linux, can use ~ shortcut refer user's home directory:
put field "bash1" url "file:~/dic.sh"
Comments
Post a Comment