Mark,
This is why personal functions are so important. You like having all the
words within quotes being seen as a single word for commandline calls.
On the other hand, it is giving me fits having to go from regular quotes to
curly quotes (for counting) and then back to regular quotes for display
(since LC displays a curly quote as some oddball char). But if I could
write my own function for that stuff, wow.
I do not have ANY experience with frontscripts, backscripts, plug-ins,
whatever. Maybe some day. In the meantime, if anyone wants to write/point
to a detailed explanation of how to do it, that will be great.
I would say that an ability for me to write functions and have them
available for scripting would be #1 on my wish list.
Larry
----- Original Message -----
From: "Mark Wieder" <mwie...@ahsoftware.net>
To: "How to use LiveCode" <use-livecode@lists.runrev.com>
Sent: Sunday, October 12, 2014 6:32 PM
Subject: Re: problem with counting words
larry-
Sunday, October 12, 2014, 5:16:45 PM, you wrote:
Hello Mark,
It truly pleases me that you explained a reason for text within quotes
being
a single word.
Glad I could help.
I don't have enough experience (actually none) in defining arguments for
commandline syntax and would never have thought of that.
So now I must say, "OK, there is a reason."
It's pretty simple, really. If I have a program that counts lines in a
file (let's call it linecount) and I want to call it with a file to
work on, then from a command prompt I would say something like
linecount fileToWorkOn.txt
However, if someone made a file with a name that had embedded spaces,
linecount some file with spaces.txt
wouldn't work because the first thing that would happen is the
linecount program would try to work on file "some". What I'd need to
do in that case is say
linecount "some file with spaces.txt"
And then the operating system would treat everything within the quotes
as a single parameter. So I can extrapolate from that to xtalk
languages treating everything within quotes as a single entity.
If anyone knows how to do that for the IDE so that the function I write
is
now available to me for ANY script of ANY stack, I would love to hear
about
it.
Well, my first advice would be to wait for the next major version of
LiveCode, because the new initiative (I'm too tired and lazy at the
moment to look up the name) is designed to give you exactly that
capability.
But if you want to play around with it now, you'll want to read up on
frontscripts and backscripts. If you, for example, put a function into
a script and then insert the script into the backscripts, the function
will be available to any stack. This is a large part of how the IDE
itself works.
--
-Mark Wieder
ahsoftw...@gmail.com
This communication may be unlawfully collected and stored by the National
Security Agency (NSA) in secret. The parties to this email do not
consent to the retrieving or storing of this communication and any
related metadata, as well as printing, copying, re-transmitting,
disseminating, or otherwise using it. If you believe you have received
this communication in error, please delete it immediately.
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode