Re: on-rev urgent problem -- Livecode contact address?

2012-03-10 Thread Guglielmo Braguglia

This is what they wrote to me some time ago 

To use the urgent ticketing system, please send your email with 
urgent in the
subject line, from the email address you are registered with for on-rev. 
This will

ensure that the ticket is seen and read immediately, 24/7.

Guglielmo


On 10.03.2012 04:00, Nicolas Cueto wrote:

Sorry but, does anyone know the urgent contact address for 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


Re: Passing parameters by reference

2012-03-10 Thread Dick Kriesel
On Mar 9, 2012, at 5:05 PM, Dar Scott wrote:

 Maybe the array could be global (or passed as a parameter) and the subscript 
 passed. ... There might be problems I don't see right off, such as access to 
 the same array at two different levels at the same time. 


Hi, Dar.  LC has a way to get and set a node at any level of an array, without 
code that concatenates [ ] to specify the node.  In an array reference a single 
[ ] can enclose an array of keys, as you can see in the code below.  Put the 
following into a button and click it.  The code invokes the debugger so you can 
see the array and the result string on the variables tab.

I agree it'd be good if LC could accept any array reference for invoking a 
handler that specifies pass-by-reference.  Pete, I'd be glad to vote for your 
enhancement request.

-- Dick


script
on mouseUp
   local tArray, tString
   put 4 into tArray[ 1 ][ 2 ][ 3 ]
   put getNodeViaListOfKeys( tArray, ( 1, 2, 3 )) after tString -- that is, get 
tArray[ 1 ][ 2 ][ 3 ]
   setNodeViaListOfKeys tArray, ( 5, 6, 7, 8 ), 9 -- that is, put 9 into 
tArray[ 5 ][ 6 ][ 7 ][ 8 ]
   put comma  getNodeViaListOfKeys( tArray, ( 5, 6, 7, 8 )) after tString -- 
4,9
   breakpoint
end mouseUp

function getNodeViaListOfKeys @pArray, pList
   local tKeys
   put pList into tKeys
   split tKeys by comma and null
   return getNodeViaArrayOfKeys( pArray, tKeys )
end getNodeViaListOfKeys

function getNodeViaArrayOfKeys @pArray, @pKeysArray
   return pArray[ pKeysArray ]
end getNodeViaArrayOfKeys

command setNodeViaListOfKeys @rArray, pList, pValue
   local tKeys
   put pList into tKeys
   split tKeys by comma and null
   setNodeViaArrayOfKeys rArray, tKeys, pValue
end setNodeViaListOfKeys

command setNodeViaArrayOfKeys @rArray, @pKeysArray, @pValue
   put pValue into rArray[ pKeysArray ]
end setNodeViaArrayOfKeys
/script

___
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


Re: Enlarge with sample

2012-03-10 Thread Richmond

On 03/04/2012 02:25 PM, Paul Hibbert wrote:

See 'resizeable' in the dictionary for a full explanation, you can set the 
property in any script, (preOpenStack makes sense) with…

set the resizable of this stack to true


and would that be 'resizeable'or 'resizable'? or, to be a bit eighteenth 
century: 'Inlarge' or 'Enlarge'?




…or use the checkbox in the 'size  position' pane of the stack inspector.

Whichever setting you use for the stack should translate to the standalone, you 
should see the same re-size handle in the lower right corner on a Mac or see 
the same re-size cursors when you mouse over the window extremities on Windows.

If it's not working for you, check that you have the Geometry script library 
included or use the automatic search for required inclusions under File  
Standalone Application Settings.

I'm not sure that the Geometry script library affects the standalone window 
re-sizeing, but it certainly affects the controls on the cards.

HTH

Paul

On 4 Mar 2012, at 10:21, Richmond wrote:


Almost every day I get these marvellous e-mail messages from well-wishers that 
spur me onto new ideas
with Livecode!

Well, for want of anything else to do, I have been trying to enlarge . . .

. . . a standalone, after it has been built as a standalone:

While a stack is a stack one can drag the lower-right-hand corner if resizeable 
is set to true, and the stack will resize.

Now, at the risk of looking very inexperienced, how can one set a standalone so 
the end-user can resize that stack?

___
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



___
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


Re: on-rev urgent problem -- Livecode contact address?

2012-03-10 Thread Andre Garzia
Nicolas,

I don't know what happened now but if the problem is loading dbmysql.so
database driver then there might be a work around. Upload your own versions
of the database drivers and use revSetDatabaseDriverPath to load them
yourself.

If that is what you're doing right now, then try acquiring the output from

shell(ldd /path/to/dbmysql.so)

This will tell you what shared libraries are being loaded, you may see a
missing dependency there. If there is a missing lib, then, contact support
and request it installed or at least a symbolic link to it.

Cheers
andre

On Sat, Mar 10, 2012 at 1:05 AM, Nicolas Cueto nicon...@gmail.com wrote:

  Anything we mere mortals can check for you, in case it helps?

 Colin, I wish! But, the problem is server-side, so it needs someone
 with access to the server.

 Things seem to be back to normal. But the log page still shows an
 error when loading the dbmysql.so driver.

 Looking thru the archives, this dbmysql.so problem has happened
 before. Case-sensitivity was noted on by Andre Garzia, but, as I
 wrote, the setup has worked fine for years. So, why the hiccup now?
 And why at the same day of the week and time?

 If someone, mortal or not, has advice, please!

 P.S. Ditto on the still-unresolved problem with Android and post.

 Thanks.
 --
 Nicolas Cueto

 ___
 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




-- 
http://www.andregarzia.com -- All We Do Is Code.
http://fon.nu -- minimalist url shortening service.
___
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


Re: on-rev urgent problem -- Livecode contact address?

2012-03-10 Thread Nicolas Cueto
Thank you all for the contact addresses.

Things are back to normal. But, should it happen again, specially at
the same time, I know where to contact.

--
Nicolas Cueto

___
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


Re: on-rev urgent problem -- Livecode contact address?

2012-03-10 Thread Nicolas Cueto
Andre,

Maybe I recall wrong, but I did upload the drivers myself. I'll double
check, though. Plus, did not know about the shell function, so I'll
give that a try, too. Thank you.

I'm worried though that dbmysql.so might not be the reason for today's
and last week's down-times. Even though things are working now, the
error logs still show a problem related to dbmysql.so.

Cheers.
--
Nicolas Cueto

___
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


Re: Editing very wide and tall stacks.

2012-03-10 Thread Richard Gaskin

Pete wrote:


Wouldn't it be great if LC provided scrollbars at the card level...


It would be great but only for a relatively few edge cases.  Most apps 
that have scrolling regions also have non-scrolling ones, such as a 
toolbar or other controls, so with groups we're in control of what can 
be scrolled and what remains stationary.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

___
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


Re: Editing very wide and tall stacks.

2012-03-10 Thread Colin Holgate
That was a pun, wasn't it!


On Mar 10, 2012, at 10:20 AM, Richard Gaskin wrote:

 Wouldn't it be great if LC provided scrollbars at the card level...
 
 It would be great but only for a relatively few edge cases.

___
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


Re: Editing very wide and tall stacks.

2012-03-10 Thread Richmond

On 03/10/2012 05:50 PM, Colin Holgate wrote:

That was a pun, wasn't it!


On Mar 10, 2012, at 10:20 AM, Richard Gaskin wrote:


Wouldn't it be great if LC provided scrollbars at the card level...

It would be great but only for a relatively few edge cases.

___
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


Of course, if one wanted, one could select all the controls on a card, 
group them, and set them up

with scrollbars to conform to one's monitor resolution.

Then make the card conform to the monitor res., but have larger real 
estate available.


___
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


Re: Editing very wide and tall stacks.

2012-03-10 Thread Dar Scott
An alternative for developing high area stacks would be a half resolution mode. 
 The stack rect and other sizes would be in real pixels but the other pixels 
would be in virtual pixels, two for each real pixel.

I'm doing something like that scripted.  I'm developing at half size and the 
thing doubles in size when put into a full screen.  It learns the half size 
properties so I can do a crude test on the wrong monitor and then go back.

I'm now thinking that using Parallels at full screen to allow oversized 
resolution might also be a solution, but Parallels has rendering problems in 
that case.  That might also be nice for the final monitor testing, but 
Parallels is limited to only a few size settings from within Windows, though it 
can do a lot by resizing in window mode.  And the Parallels Display Adapter 
does not rotate.  

I'm also thinking of scrollbars that hang outside the window.

And I'm still thinking about Mark Schonewille's idea.

Dar

On Mar 10, 2012, at 8:20 AM, Richard Gaskin wrote:

 Pete wrote:
 
 Wouldn't it be great if LC provided scrollbars at the card level...
 
 It would be great but only for a relatively few edge cases.  Most apps that 
 have scrolling regions also have non-scrolling ones, such as a toolbar or 
 other controls, so with groups we're in control of what can be scrolled and 
 what remains stationary.
 
 --
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 LiveCode Journal blog: http://LiveCodejournal.com/blog.irv
 
 ___
 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

---
Dar Scott
dba 
Dar Scott Consulting
8637 Horacio Place NE
Albuquerque, NM 87111

Lab, home, office phone: +1 505 299 9497
For Skype and fax, please contact.
d...@swcp.com

Computer Programming and tinkering,
often making LiveCode libraries and
externals, sometimes writing associated
microcontroller firmware.  
---



___
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


Re: Editing very wide and tall stacks.

2012-03-10 Thread Richmond

On 03/10/2012 06:04 PM, Dar Scott wrote:

An alternative for developing high area stacks would be a half resolution mode. 
 The stack rect and other sizes would be in real pixels but the other pixels 
would be in virtual pixels, two for each real pixel.


???

Virtual pixels

???

Are these something like fairies at the bottom of the garden (virtually 
pixies). Err; sorry, that one just slipped out.


???

Would be grateful if you could explain what 'virtual pixels' are, and 
how one can do all that.




I'm doing something like that scripted.  I'm developing at half size and the 
thing doubles in size when put into a full screen.  It learns the half size 
properties so I can do a crude test on the wrong monitor and then go back.

I'm now thinking that using Parallels at full screen to allow oversized 
resolution might also be a solution, but Parallels has rendering problems in 
that case.  That might also be nice for the final monitor testing, but 
Parallels is limited to only a few size settings from within Windows, though it 
can do a lot by resizing in window mode.  And the Parallels Display Adapter 
does not rotate.

I'm also thinking of scrollbars that hang outside the window.

And I'm still thinking about Mark Schonewille's idea.

Dar

On Mar 10, 2012, at 8:20 AM, Richard Gaskin wrote:


Pete wrote:


Wouldn't it be great if LC provided scrollbars at the card level...

It would be great but only for a relatively few edge cases.  Most apps that 
have scrolling regions also have non-scrolling ones, such as a toolbar or other 
controls, so with groups we're in control of what can be scrolled and what 
remains stationary.

--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

___
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

---
Dar Scott
dba
Dar Scott Consulting
8637 Horacio Place NE
Albuquerque, NM 87111

Lab, home, office phone: +1 505 299 9497
For Skype and fax, please contact.
d...@swcp.com

Computer Programming and tinkering,
often making LiveCode libraries and
externals, sometimes writing associated
microcontroller firmware.
---



___
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


Re: Editing very wide and tall stacks.

2012-03-10 Thread Mark Schonewille
Hi Scott,

If you group all controls and groups and set Select Grouped Controls to false 
(in the Edit menu) you can only select the main group and not the nested groups.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Download the Installer Maker Plugin 1.7 for LiveCode here http://qery.us/za

On 10 mrt 2012, at 04:37, Dar Scott wrote:

 Hi, Mark!
 
 I don't understand the problem with select Grouped Controls.  Mental block I 
 guess.  What is the issue here?
 
 Dar


___
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


Re: Passing parameters by reference

2012-03-10 Thread Pete
Dick:

Thanks for the script, another little nugget of knowledge added to my LC
store!

I have entered an enhancement request - it's # 10070

Dar:

The function in question is a general purpose one that gets called from
many places.  Sometimes I need to pass an array element and other times
just a simple variable so I'd rather not complicate things by passing in an
extra parameter that holds the array key if it is an array that's being
passed.  But that is a possible solution so thanks for the suggestion.

Bob:

Creating a temporary array works, of course, and that's what I'm doing for
now.  But it defeats the whole purpose of passing the parameter by
reference since now I have to put the temporary array back into the real
array after the call.  I may as well just change the function to return the
result of its code and pass the parameter by value instead of reference.

Pete

On Sat, Mar 10, 2012 at 12:06 AM, Dick Kriesel dick.krie...@mail.comwrote:

 Hi, Dar.  LC has a way to get and set a node at any level of an array,
 without code that concatenates [ ] to specify the node.  In an array
 reference a single [ ] can enclose an array of keys, as you can see in the
 code below.  Put the following into a button and click it.  The code
 invokes the debugger so you can see the array and the result string on the
 variables tab.

 I agree it'd be good if LC could accept any array reference for invoking a
 handler that specifies pass-by-reference.  Pete, I'd be glad to vote for
 your enhancement request.

 -- Dick




-- 
Pete
Molly's Revenge http://www.mollysrevenge.com
___
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


Re: Apple iPad announcement evokes yawn

2012-03-10 Thread Richard Gaskin

Andre Garzia wrote:

I've heard that Google is dealing with that by shipping a new Android
Emulator in the SDK. This new emulator will randomize the rect of the
device upon every launch with values between 124 and 2048.

=)


That would actually be a very value feature, as it would reduce the 
number of lazy developers who live in a vacuum in which they assume the 
world has only the devices they personally test with.


In this regard the modern mobile arena isn't much different from 
designing for the desktop for the last 20 years.


The Mac premiered with no choice but a 512x342 BW screen, and it became 
stupid to design only for one fixed resolution not long after when VGA 
connectors were introduced.


Today monitors commonly range from 800x600 to 2560x1440 and beyond, and 
we just write resizeStack handlers to work with 'em all.


With mobile the only real difference is that pixel density also varies 
more than on desktop displays currently, so we need to take that into 
account as well.


Fortunately the hard work of figuring out the logistics has already been 
done and guidelines are provided in the Android HIG:

http://developer.android.com/guide/practices/screens_support.html

Today both iOS and Android support devices with multiple physical sizes 
and resolutions, and there's no reason to believe Apple will limit iOS 
to only two form factors forever.


So those using Android are getting a head start on where every major 
player in the industry is headed:  smart devs are designing with dynamic 
metrics to deliver an optimal experience across all possible devices...


...just like we've always been doing on the desktop.

It hasn't been a good idea to presume a fixed display size since 1986.

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

___
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


Re: Passing parameters by reference

2012-03-10 Thread Dar Scott

On Mar 10, 2012, at 11:21 AM, Pete wrote:
 I may as well just change the function to return the
 result of its code and pass the parameter by value instead of reference.

Hmm.  Like this?

put modified(a[s]) into a[s]

This might be the best for now.  

Dar

---
Dar Scott
dba 
Dar Scott Consulting
8637 Horacio Place NE
Albuquerque, NM 87111

Lab, home, office phone: +1 505 299 9497
For Skype and fax, please contact.
d...@swcp.com

Computer Programming and tinkering,
often making LiveCode libraries and
externals, sometimes writing associated
microcontroller firmware.  
---



___
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


Re: a little help with find script

2012-03-10 Thread Timothy Miller

On Mar 9, 2012, at 12:28 PM, Timothy Miller wrote:

 Oops. Forgot how to do this. Knew it once. I don't write scripts every day. 
 Not even every month.
 
 Please remind me how to write a script that finds and records every instance 
 of a string in field foo I know how to write repeat loops, but can't 
 remember how to keep finding and then exit when the last instance is found.

Predictably, I didn't understand the advice I got, though I do appreciate it. 
With enough study, I could have figured it out. Instead, I tried to remember 
the way I've done it in the past, combined with trial and error.

The string I want to find is Card ID

I came up with this

repeat
  find string card ID in field narrative
  if the foundChunk is not empty then
 put the foundChunk  of card ID  the short Id of this card into 
tVar
 if tVar is not among the lines of bigVar then
put tVar  return after bigVar
 else
exit repeat
 end if
  end if
   end repeat

This is primitive, hyperCard-like scripting I suppose. That's how homey rolls. 
It seems to work. Is this a bad way to do it? Is there a clearly better way?

As far as I can tell, in a repeat loop, the find command somehow keeps track 
of the last found item and moves on to find the next one, but repeats forever 
unless you script some way to detect duplicate foundChunks and exit. Correct? 

I have another question before I can make this script do what I want, but I'll 
start a new thread, to avoid confusion.

Tim
___
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


A little help with the foundChunk

2012-03-10 Thread Timothy Miller
So I've got a list of foundChunks in the form --

char 10 to 16 of field 1 of card ID 1586

How do I convert them to the form --

word 3 to 4 of field 1 of card ID 1586

I want to do that, because I want to include the next word in each foundChunk 
by adding 1 to word 4 of each line.

Alternately, is there a simple way to write the find command so I end up with 
a list of found words in the desired format, instead of a list of found chars?

I don't need a working script, just a hint or two.

Thanks again. Not so many amateurs and newbies here anymore, mostly pros. Hope 
not to be a pest.

Tim
___
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


Re: a little help with find script

2012-03-10 Thread Mike Bonner
The result will contain not found if there is no match, and also on the
find after the last chunk is found at which points it resets to the start.

Something like the following is pretty straight forward, could be adjusted
to accept card names as an additional argument so you could loop through
all the cardnames (think thats already been suggested?)

And then have the inner loop call the find function to build up your lists
of foundchunks.

on mouseUp
-- could add a repeat for each line tName in the cardnames of this stack..
   repeat until (findIt(asd,foo)) is not found
  put the foundchunk  return after tVar
   end repeat
end mouseUp

function findit tString,tField --could add a card name argument and adjust
the find.
   find tstring in field tField
   return the result
end findit



On Sat, Mar 10, 2012 at 6:05 PM, Timothy Miller 
gand...@doctortimothymiller.com wrote:


 On Mar 9, 2012, at 12:28 PM, Timothy Miller wrote:

  Oops. Forgot how to do this. Knew it once. I don't write scripts every
 day. Not even every month.
 
  Please remind me how to write a script that finds and records every
 instance of a string in field foo I know how to write repeat loops, but
 can't remember how to keep finding and then exit when the last instance is
 found.

 Predictably, I didn't understand the advice I got, though I do appreciate
 it. With enough study, I could have figured it out. Instead, I tried to
 remember the way I've done it in the past, combined with trial and error.

 The string I want to find is Card ID

 I came up with this

 repeat
  find string card ID in field narrative
  if the foundChunk is not empty then
 put the foundChunk  of card ID  the short Id of this card
 into tVar
 if tVar is not among the lines of bigVar then
put tVar  return after bigVar
 else
exit repeat
 end if
  end if
   end repeat

 This is primitive, hyperCard-like scripting I suppose. That's how homey
 rolls. It seems to work. Is this a bad way to do it? Is there a clearly
 better way?

 As far as I can tell, in a repeat loop, the find command somehow keeps
 track of the last found item and moves on to find the next one, but repeats
 forever unless you script some way to detect duplicate foundChunks and
 exit. Correct?

 I have another question before I can make this script do what I want, but
 I'll start a new thread, to avoid confusion.

 Tim
 ___
 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


Re: A little help with the foundChunk

2012-03-10 Thread Mike Bonner
Maybe something like this?

on mouseUp
   put card id into tString
   put foo into tField
   put word [[tFirstWord]] to [[tLastWord]] of  [[word -2 to -1 of the
foundchunk]] into tMergit
   repeat until (findIt(tString,tField)) is not found
  put word 2 of the foundChunk into tStart
  put the number of words in char 1 to tStart of field 1 into tFirstWord
  put tFirstWord + (the number of words in tString) into tLastWord
  put merge(tMergit)  return after msg
   end repeat
end mouseUp

function findit tString,tField
   find tstring in field tField
   return the result
end findit


On Sat, Mar 10, 2012 at 6:19 PM, Timothy Miller 
gand...@doctortimothymiller.com wrote:

 So I've got a list of foundChunks in the form --

 char 10 to 16 of field 1 of card ID 1586

 How do I convert them to the form --

 word 3 to 4 of field 1 of card ID 1586

 I want to do that, because I want to include the next word in each
 foundChunk by adding 1 to word 4 of each line.

 Alternately, is there a simple way to write the find command so I end up
 with a list of found words in the desired format, instead of a list of
 found chars?

 I don't need a working script, just a hint or two.

 Thanks again. Not so many amateurs and newbies here anymore, mostly pros.
 Hope not to be a pest.

 Tim
 ___
 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


Re: a little help with find script

2012-03-10 Thread Timothy Miller
Thankya Mike,

If I understand you correctly, my script probably works right, might be a 
little kludgy. Another way to end the search is to look for not found in the 
result.

Hope I got that right.

I'm still studying your foundChunk script.

Cheers,

Tim


On Mar 10, 2012, at 5:23 PM, Mike Bonner wrote:

 The result will contain not found if there is no match, and also on the
 find after the last chunk is found at which points it resets to the start.
 
 Something like the following is pretty straight forward, could be adjusted
 to accept card names as an additional argument so you could loop through
 all the cardnames (think thats already been suggested?)
 
 And then have the inner loop call the find function to build up your lists
 of foundchunks.
 
 on mouseUp
 -- could add a repeat for each line tName in the cardnames of this stack..
   repeat until (findIt(asd,foo)) is not found
  put the foundchunk  return after tVar
   end repeat
 end mouseUp
 
 function findit tString,tField --could add a card name argument and adjust
 the find.
   find tstring in field tField
   return the result
 end findit
 
 
 
 On Sat, Mar 10, 2012 at 6:05 PM, Timothy Miller 
 gand...@doctortimothymiller.com wrote:
 
 
 On Mar 9, 2012, at 12:28 PM, Timothy Miller wrote:
 
 Oops. Forgot how to do this. Knew it once. I don't write scripts every
 day. Not even every month.
 
 Please remind me how to write a script that finds and records every
 instance of a string in field foo I know how to write repeat loops, but
 can't remember how to keep finding and then exit when the last instance is
 found.
 
 Predictably, I didn't understand the advice I got, though I do appreciate
 it. With enough study, I could have figured it out. Instead, I tried to
 remember the way I've done it in the past, combined with trial and error.
 
 The string I want to find is Card ID
 
 I came up with this
 
 repeat
 find string card ID in field narrative
 if the foundChunk is not empty then
put the foundChunk  of card ID  the short Id of this card
 into tVar
if tVar is not among the lines of bigVar then
   put tVar  return after bigVar
else
   exit repeat
end if
 end if
  end repeat
 
 This is primitive, hyperCard-like scripting I suppose. That's how homey
 rolls. It seems to work. Is this a bad way to do it? Is there a clearly
 better way?
 
 As far as I can tell, in a repeat loop, the find command somehow keeps
 track of the last found item and moves on to find the next one, but repeats
 forever unless you script some way to detect duplicate foundChunks and
 exit. Correct?
 
 I have another question before I can make this script do what I want, but
 I'll start a new thread, to avoid confusion.
 
 Tim
 ___
 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


___
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


Re: a little help with find script

2012-03-10 Thread Mike Bonner
Yeah same difference.

On Sat, Mar 10, 2012 at 8:06 PM, Timothy Miller 
gand...@doctortimothymiller.com wrote:

 Thankya Mike,

 If I understand you correctly, my script probably works right, might be a
 little kludgy. Another way to end the search is to look for not found in
 the result.

 Hope I got that right.

 I'm still studying your foundChunk script.

 Cheers,

 Tim


 On Mar 10, 2012, at 5:23 PM, Mike Bonner wrote:

  The result will contain not found if there is no match, and also on the
  find after the last chunk is found at which points it resets to the
 start.
 
  Something like the following is pretty straight forward, could be
 adjusted
  to accept card names as an additional argument so you could loop through
  all the cardnames (think thats already been suggested?)
 
  And then have the inner loop call the find function to build up your
 lists
  of foundchunks.
 
  on mouseUp
  -- could add a repeat for each line tName in the cardnames of this
 stack..
repeat until (findIt(asd,foo)) is not found
   put the foundchunk  return after tVar
end repeat
  end mouseUp
 
  function findit tString,tField --could add a card name argument and
 adjust
  the find.
find tstring in field tField
return the result
  end findit
 
 
 
  On Sat, Mar 10, 2012 at 6:05 PM, Timothy Miller 
  gand...@doctortimothymiller.com wrote:
 
 
  On Mar 9, 2012, at 12:28 PM, Timothy Miller wrote:
 
  Oops. Forgot how to do this. Knew it once. I don't write scripts every
  day. Not even every month.
 
  Please remind me how to write a script that finds and records every
  instance of a string in field foo I know how to write repeat loops,
 but
  can't remember how to keep finding and then exit when the last instance
 is
  found.
 
  Predictably, I didn't understand the advice I got, though I do
 appreciate
  it. With enough study, I could have figured it out. Instead, I tried to
  remember the way I've done it in the past, combined with trial and
 error.
 
  The string I want to find is Card ID
 
  I came up with this
 
  repeat
  find string card ID in field narrative
  if the foundChunk is not empty then
 put the foundChunk  of card ID  the short Id of this card
  into tVar
 if tVar is not among the lines of bigVar then
put tVar  return after bigVar
 else
exit repeat
 end if
  end if
   end repeat
 
  This is primitive, hyperCard-like scripting I suppose. That's how homey
  rolls. It seems to work. Is this a bad way to do it? Is there a clearly
  better way?
 
  As far as I can tell, in a repeat loop, the find command somehow keeps
  track of the last found item and moves on to find the next one, but
 repeats
  forever unless you script some way to detect duplicate foundChunks and
  exit. Correct?
 
  I have another question before I can make this script do what I want,
 but
  I'll start a new thread, to avoid confusion.
 
  Tim
  ___
  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


 ___
 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