Several Text issues

MisterX b.xavier at internet.lu
Fri Apr 22 15:07:24 EDT 2005


Michael

> I looked at these suggestions still need help

you need to copy to look to find to search to make it work kinda thing it is
you know ;) Like every skill...

> 1 Cannot see how I set the Htmltext when I am putting the 
> text into the field

local mylastsearch
on mouseup
put "http://runrev.com" into thisurl
get url thisurl
# i'll skip the checking for brevity>
put it into thisvariable
set the htmlfield of fld "myhtmlfield" to thisvariable

> 2. I need to search by a user entered search string so it has 
> to be by variable, how Do I use the Find command with a 
> variable, or is there a different way to do this?

-- script continued...
answer "search for what:" with mylastsearch
if it is empty or the result is "cancel" then exit mouseup
put lineoffset(it, fld "myhtmlfield") into x
if x is less than one than 
  answer "sorry '"& it & "' not found, at least you got an htmlfield!"
  exit mouseup
end if
else 
put offset(it,fld "myhtmlfield") into a
set the textcolor of char a to a+length(it) of fld "myhtmlfield" to red
put it into mylastsearch
end mouseup

something like that says my hat. I know it's incomplete but it should send
you on your way to great scripting. The Find command is better used for
stack card searching. In-field searching is done with offset searches and
"text" selection or hiliting (in this case) ;)

> 3. The revgourl seems to open the file, I don't want to open 
> the file, I want to open the Explorer Window to that file 
> location so then the user has access to the file to attach to 
> email or burn to CD ect. This is mainly going to be on Windows XP Pro

if you want a fully featured example, find the DiscreteBrowser on
http://MonsieurX.com which I think does it all but now does even more ;)
Although CD burning... Let's get serious... 

There's also lots of examples in the RevDocs (find revgourl) that you can
find via the "see also" in each 'card' - an exploration of the links and
examples in revdocs usually solves most basic scripting questions...

Xav
http://monsieurx.com
Stacks of nitrous injections for your stacks



More information about the use-livecode mailing list