I cannot get my head around this problem. Basically I have this code below so that when a file is selected from a field, it sets the delimiter to "/" and clears the previous selection. I then press the new selection from another field and it put into the new field after my item delimiter. The problem is that after this I need to also insert "} which finishes the path off for file. However I cannot seem to get what I need to add it to the end after the file selection has been inserted. Below is the code:
Code: Select all
on selectionchanged
set the itemdelimiter to "/"
put the hilitedtext of me into gSelectedFile
put empty into item 6 in fld "Header_files-download"
put item 1 of gSelectedFile into tSelectedFile
put tSelectedFile into item 6 in fld "Header_files-download"
show button "View"
end selectionchanged
Code: Select all
{"path":"/apps/h&s app/apps/myapp/THIS TEXT IS CHANGED"}
Thanks
Jamie