On Tuesday, September 28, 2004, at 09:28 PM, Ken Ray wrote:
On 9/28/04 5:42 PM, "Hershel Fisch" <[EMAIL PROTECTED]> wrote:
on mouseUp
answer "What kink of file are you putting ?" with "Tab Delimited"
and
"Comma Delimited" and "Cancel"--and on
put word 1 of it into sFileType
if sFileType is "cancel" then
exit mouseUp
else
answer file "a"
put it into fld "f1"
do " put URL" & quote & "file:"& it & quote &" "&"into fld" &" "&
quote & "f1" & quote
replace sFileType with "'" in fld "f1"
end if
end mouseUp
Hershel, your code above puts the path from 'answer file' into fld
"f1", and
then puts the contentes of the file into the same field, overwriting
it. You
don't need to do that. You also don't need to do the replace action on
the
data *in* the field; it's best to do it in a variable first. To use the
string that came back from the first "answer", you need to use "do" to
resolve it to a variable and not a string. Something like this:
Thanks, the reason I put it into the fld is to see whats going on.
Hershel
answer file "a"
if it <> "" then
put url("file:" & it) into tData
do "replace" && sFileType && "with" && quote & "'" & quote in tData
put tData into fld 1
end if
HTH,
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution