Page 1 of 1

How to Hilite 5 chars In a field and set speed??

Posted: Sat Apr 27, 2013 5:17 pm
by Fasasoftware
Dear friends,

I want to make a stack with a script that open any text..like .txt or -pdf or any type of text and when i push a button then hilite 5 chars per step in that field and also in automatic when i push the button...and also have the possibility to trim the speed till the end of text....

Any scripts Idea???

Can you help me please??

Best regards,

Lestroso.... :oops:

Re: How to Hilite 5 chars In a field and set speed??

Posted: Sat Apr 27, 2013 10:53 pm
by dunbarx
Here is something to get you going.

Start with a button and a field named "testField". Put some text into that field. In the button script:

Code: Select all

on mouseUp
   select5 1,5
end mouseUp

on select5 startChar,endChar
   if endChar > the length of fld "testField" then exit select5
   select char startChar to endChar of fld "testField"
   wait 30
   add 5 to startChar
   add 5 to endChar
   send "select5" &&  startChar & "," & endChar to me
end select5
You need to step though the script and see if it does what you want. It likely need tweaking. Write back with what you learned.

Craig Newman

Re: How to Hilite 5 chars In a field and set speed??

Posted: Sat Apr 27, 2013 11:16 pm
by Simon
Wow Craig!
If you answered this one correctly you also get a badge for "Deciphering Intent".
Will follow and see :D

Simon

Re: How to Hilite 5 chars In a field and set speed??

Posted: Sun Apr 28, 2013 1:15 pm
by Fasasoftware
THANK You Craig!!!!!! You Have guess my Idea!!!

Your script is so useful for me!!!! I Thank you again for your real help!!!

Best Regards,

Lestroso, :D :D :D