need help with strings

Jim Ault JimAultWins at yahoo.com
Sun Jun 18 10:31:28 EDT 2006


You could build a little LibStackJaredJava.rev

and include a STACK script two handlers

function tabString cnt
   set the itemDel to tab
   put tab into item cnt-1 of str
   return str
end tabString 

on openstack
   start using stack (the short name of me)
end openstack

--save stack in the Revolution Plugins folder
--go to the Rev menu Development:Plugins:Plugin Settings
--use the drop down menu to select your stack
--then choose "Revolution starts up"
--choose "invisible"
--close the dialog box
--quit Rev
--relaunch Rev... 
--type " put the stacksinuse" into the msg box

and there you are... now you have your own lib routine ready whenever you
start Rev. (Note:  This library routine may NOT be compiled when saving as a
stand alone app.  I am not sure how this part works.  I think you have to
include the lib stack as a sub stack.)

and now use

put tabString(4) & "Hello"


Jim Ault
Las Vegas


On 6/17/06 10:03 PM, "Jared Smith" <smith.sgt at gmail.com> wrote:

> Hi everyone,
> 
> As I was trying to make a string, I instinctively wrote something like:
> 
> put tab * 2 & "Hello" into field "Field"
> 
> This returned an error. Why can't I tell it to put in two tabs this
> way? I need this functionality so I can make the number of tabs vary
> according to a variable. Is there a way to do this?
> 
> I guess I could use a repeat loop, but I don't know how to do it. My
> Java mentality kicked in and wrote something like the following, which
> doesn't work:
> 
> repeat for myVariable times
> tabCount = tabCount+tab
> end repeat
> put tabCount & "Hello" into field "Field"
> 
> My Transcript learning process is admittedly trial & error :-(
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list