Re: dealing with tex-edit plus F
Re: dealing with tex-edit plus F
- Subject: Re: dealing with tex-edit plus F
- From: Richard Smykla <email@hidden>
- Date: Sat, 8 Feb 2003 09:37:32 -0500
Fabrice,
Hmm. Just noticed the mailserver screwed up my "less-than-or-equal'
signs in my script, turning them into 'greater than' signs. So try
changing them in the two 'repeat' command lines. Looks OK otherwise.
Cheers. . .
Rick
Fabrice,
Your nesting of loops was incorrect. I also added a loop exit
command to stop the script once it found the matching word. Is this
something close to what you wanted?
tell application "Tex-Edit Plus"
tell window 1 of application "Tex-Edit Plus"
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
set x to nombLignes + 1
exit repeat
end if
set y to y + 1
end repeat
set x to x + 1
end repeat
display dialog "Fini"
end tell
end tell
Rick
hi , could you help me by telling me what's wrong with this script?
It's hard for a frenchman to solve the syntax problems. Thanks.
--
Rick Smykla
http://rsmykla.home.pipeline.com/index.htm
_______________________________________________
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.