Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 questions

Status
Not open for further replies.

manfishj

Programmer
May 30, 2002
44
US
Hi,

Can anyone steer me in the right direction here?
1st question:
I'm creating a slide presentation. What I would like to do is: Have a button that would open "notepad" or whatever text editor is on their machine, so that the user can take notes while watching the presentation. Is notepad on all PC's?

2nd question:
I would like a "search engine" feature, in which the user can type in a keyword, and it would bring up a list of all of the slides that have this keyword. Any ideas?

Thanks in advance.

manfishj
 
Answer #1

Yes, every windows based computer has notepad. To open it from director you'd do this:

open "c:\winnt\system32\notepad.exe"

I think for winME or older machines the path would be:

open "c:\windows\system\notepad.exe"

Answer #2

Here's a Function that searches a text member for a word:

on findWord (theWord, theMember)
matches = [:]
repeat with i = 1 to member(theMember).word.count
if member(theMember).word = theWord then
matches.addprop("match", i)
end if
end repeat
if matches.count <> 0 then
return matches
else
return 0
end if
end

This function returns a list of the number of the words that contain dogs. If dog appears nowhere in the member, the function returns 0. So you could do:

hits = findWord(&quot;the&quot;, &quot;myText&quot;)

This will set hits equal to the list the function returns.
So if the returned list looks liek this:

[#match:1, #match:5, #match:6]

That means words 1, 5, and 6 all match the word searched for. You can adapt this basic search script to however you need it.
 
Thanks, Fugigoose. The answer to question #2 is confusing me though. Basically, what I'd like to do is this:
Since the slides are not using director text, I'm going to make a text field that corresponds to each one of the slides. In these text fields, I'll put in the keywords. I need for the user to be able to type in the keyword and have a list of the slides(or the text fields, which I assume should have the same names as the slide names) that contain these keywords. Then, they should be able to click on one to take them to that particular slide.

Any chance you can spell it out more clearly for me? I'd appreciate it. Thanks.:

manfishj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top