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

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

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

Post by Fasasoftware » Sat Apr 27, 2013 5:17 pm

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:

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

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

Post by dunbarx » Sat Apr 27, 2013 10:53 pm

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

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

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

Post by Simon » Sat Apr 27, 2013 11:16 pm

Wow Craig!
If you answered this one correctly you also get a badge for "Deciphering Intent".
Will follow and see :D

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Fasasoftware
Posts: 203
Joined: Mon Oct 31, 2011 9:36 pm
Contact:

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

Post by Fasasoftware » Sun Apr 28, 2013 1:15 pm

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

Post Reply