Basically I have a Label named "Name" and a text field call name. I managed to copy what the user enters into the text field name into the text file which is saved on the desktop but I am not able to copy the Label name which is "Name" onto the text file.
Can some please explain the codes to place the Label name "Name" onto the text file and write beside that is the text field called name.
As such the text file will look like this
Name: Helen
Currently with the below code i get this:
Helen
Code: Select all
global yourName
global myText
on mouseUp
// save what the user types into our variables
put field "name" into yourName
// now use them
answer "You are " & yourName
open file specialFolderPath("desktop") & "/vr.txt" for write
put yourName into myText
write label of Name "Name" & return to vr.txt
write myText to file specialFolderPath("desktop") & "/vr.txt"
close file specialFolderPath("desktop") & "/vr.txt"
end mouseUp