Save as dialogue for field contents
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 73
- Joined: Sat Apr 08, 2006 6:51 pm
Save as dialogue for field contents
What is the "save as" equivalent of "ask file" for the user to save the contents of a field as a text file. and choose the location for the file?
In nova fert animus mutatas dicere formas corpora.
Hi Preston
Something like:
Would do the trick. HTH.

Something like:
Code: Select all
on exportText
ask file "Name the export file:" with "ISaGo.txt"
if it is empty then exit exportText
put it into savedTextPath
put field "FieldAll" into ResultList
put ResultList into url ("file:" & savedTextPath)
end exportText

Last edited by gyroscope on Sat Mar 14, 2009 12:02 am, edited 1 time in total.
Code: Select all
Yay, Jan, you've started a meme!

-
- Posts: 73
- Joined: Sat Apr 08, 2006 6:51 pm
I have no idea what a meme is, but thanks very much for the nice function to save a text field as a file.
How do I insert some text into the midst of a field of text? I know how to use the clickChunk to get the position where I want to insert text, but how do I move the rest of the text over (I don't want to replace it)?
Thanks again for all your help.
How do I insert some text into the midst of a field of text? I know how to use the clickChunk to get the position where I want to insert text, but how do I move the rest of the text over (I don't want to replace it)?
Thanks again for all your help.
In nova fert animus mutatas dicere formas corpora.
Wikipedia will give a more technical definition, but for the simple purposes, a meme is:Preston Shea wrote:I have no idea what a meme is, but thanks very much for the nice function to save a text field as a file.
How do I insert some text into the midst of a field of text? I know how to use the clickChunk to get the position where I want to insert text, but how do I move the rest of the text over (I don't want to replace it)?
Thanks again for all your help.
- An idea that, like a gene, can replicate and evolve.
A unit of cultural information that represents a basic idea that can be transferred from one individual to another, and subjected to mutation, crossover and adaptation.
A cultural unit (an idea or value or pattern of behavior) that is passed from one generation to another by nongenetic means (as by imitation); "memes are the cultural counterpart of genes".
I started to do the same (sometimes with a credit to Jan and acknowledgement that I'd "stolen" the signoff from him) and I was amused to see gyro do the same this time.
Anyway, if you're using the clickChunk you will find the char range that's selected. If you note the first char position of the clickChunk, you can replace that with the entire new text (and the original char in that position) thus:
Code: Select all
put word 2 of the clickChunk into theChar
put theNewText & char theChar of field "targetField" into char theChar of field "targetField"
-
- Posts: 73
- Joined: Sat Apr 08, 2006 6:51 pm