Code: Select all
hFile = Open Application.Path & "/test.html" For Create
Print #hFile, "<!--"
Print #hFile, "You are free to copy and use this sample in accordance with the terms of the"
Print #hFile, "Apache license (http://www.apache.org/licenses/LICENSE-2.0.html)"
Print #hFile, "-->"
Print #hFile, ""
Print #hFile, "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>"
Print #hFile, "<html xmlns='http://www.w3.org/1999/xhtml'>"
Print #hFile, "<head>"
Print #hFile, "<meta http-equiv='content-type' content='text/html; charset=utf-8'/>"
Print #hFile, "<title>"
Print #hFile, "test"
Print #hFile, "</title>"
Code: Select all
on mouseUp
local myVar
open file specialFolderPath("desktop") & "/myData.html" for write -- creates a file for Revolution to write to
put "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>" & CR into myVar
put myGoo into field "Field1"
write myVar to file specialFolderPath("desktop") & "/myData.html" -- writes the text placed in the local variable into the open text file we created
close file specialFolderPath("desktop") & "/myData.html" -- closes/saves the text file containing the text form the field/local variable into a text file on the desktop
end mouseUp