• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: dealing with tex-edit plus F
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dealing with tex-edit plus F


  • Subject: Re: dealing with tex-edit plus F
  • From: John Delacour <email@hidden>
  • Date: Sat, 8 Feb 2003 15:12:26 +0000
  • Mac-eudora-version: 6.0a5

At 1:20 pm +0000 8/2/03, fabrice wrote:

tell application "Tex-Edit Plus F"
tell window 1 of application "Tex-Edit Plus F"
activate
make new window at behind window 1
copy (text returned of (display dialog "Mot recherchi?" default answer

" ")) to motRech
set nombLignes to count of lines
set x to 1
repeat while (x < nombLignes)
set nombMots to count words of line x
set y to 1
repeat while (y < nombMots)
set motControle to word y of line x
if motControle is motRech then
set motSuivant to a reference to word after word y of line x
copy motSuivant to end of window 2
copy return to end of window 2
end if
set y to y + 1
set x to x + 1
end repeat
end repeat
display dialog "Fini"
end tell
end tell


Perhaps I'm missing something but I don't see why you need to loop through the lines.


tell app "Tex-Edit Plus F"
activate
set resultsWindow to make window at the back of the front window
set dd to display dialog "Search for..." default answer ""
set searchString to dd's text returned
tell the front window
repeat with i from 1 to count its words
set the nextword to word (i + 1)
if the nextword is the searchString then
copy the nextword & return to the end of the resultsWindow
end
if the nextword is "" then exit repeat
end
end
end

JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: dealing with tex-edit plus F
      • From: Richard Smykla <email@hidden>
References: 
 >dealing with tex-edit plus F (From: fabrice <email@hidden>)

  • Prev by Date: Re: dealing with tex-edit plus F
  • Next by Date: Re: dealing with tex-edit plus F
  • Previous by thread: Re: dealing with tex-edit plus F
  • Next by thread: Re: dealing with tex-edit plus F
  • Index(es):
    • Date
    • Thread