select after the selectedText

2011-07-06 Thread Richmond Mathewson
a.k.a. Richmond's longest-lasting headache imagine this sort of script: on mouseUp set the useUnicode to true set the unicodeText of the selectedText to numToChar(2340) select after the selectedText end mouseUp all looks straightforward (nicht?), but 'tis not to be . . . :( because

autoHilite and focus (following Jacque's solution)

2011-07-06 Thread Slava Paperno
My user types a search target and presses Enter or clicks the Find button, and his target is found. At that point I want the focus to return to the input field so the user can type another target. I find this surprisingly difficult to achieve. At the bottom of the mouseUp handler on the Find

Re: select after the selectedText

2011-07-06 Thread Richmond Mathewson
On 07/06/2011 10:10 AM, Slava Paperno wrote: The selectedText doesn't work with Unicode. I have a very similar thing working fine: I use select after char -1 of field X. Slava set the unicodeText of the selectedText to numToChar(2340) works 100% and THAT is not my problem. My problem is

Re: select after the selectedText

2011-07-06 Thread Mark Wieder
Richmond- Wednesday, July 6, 2011, 12:19:41 AM, you wrote: I have just tried this: on mouseUp set the useUnicode to true set the unicodeText of the selectedText to numToChar(2340) select after char -1 of field X end mouseUp Untested, but what about on mouseUp local

Unzipping Mac apps with revZip

2011-07-06 Thread Terry Judd
I¹m trying to extract and save files from a zip archive using Livecodes built in zip routines. It all seems to work well (I open the archive for reading, list the contents using the enumerateItems function and write them out to file, creating any nested folders where necessary) except that Mac

Re: select after the selectedText

2011-07-06 Thread Richmond Mathewson
On 07/06/2011 10:38 AM, Mark Wieder wrote: Richmond- Wednesday, July 6, 2011, 12:19:41 AM, you wrote: I have just tried this: on mouseUp set the useUnicode to true set the unicodeText of the selectedText to numToChar(2340) select after char -1 of field X end mouseUp Untested,

Gottit!

2011-07-06 Thread Richmond Mathewson
a.k.a Richmond finally finds the paracetemol put the selectedChunk into CHUNGK select after CHUNGK Yippee-Doo, Caloo-Caleh, and other foolish noises demonstrating that after a year I have finally found the cure to a besetting problem. Thanks Slava and Mark for getting it wrong in such a way

Can't pick the mousecolor with brush tool while mousedown

2011-07-06 Thread Tiemo Hollmann TB
Hello, I want to draw a line on an image with the brush tool. Depending on the mousecolor I have to change the brushcolor to get a good contrast. Lets make it easy with black and white. On the black parts of the image I want to draw a white line and on the white parts of the image I want to draw

Re: Unzipping Mac apps with revZip

2011-07-06 Thread Terry Judd
On 06/07/2011 05:41 PM, Terry Judd t...@unimelb.edu.au wrote: I¹m trying to extract and save files from a zip archive using Livecodes built in zip routines. It all seems to work well (I open the archive for reading, list the contents using the enumerateItems function and write them out to

Re: Unzipping Mac apps with revZip

2011-07-06 Thread Roger Eller
On Wed, Jul 6, 2011 at 6:54 AM, Terry Judd wrote: On 06/07/2011 05:41 PM, Terry Judd wrote: I¹m trying to extract and save files from a zip archive using Livecodes built in zip routines. It all seems to work well (I open the archive for reading, list the contents using the enumerateItems

Re: select after the selectedText

2011-07-06 Thread Peter Brigham MD
On Jul 6, 2011, at 3:47 AM, Richmond Mathewson wrote: On 07/06/2011 10:38 AM, Mark Wieder wrote: Richmond- Wednesday, July 6, 2011, 12:19:41 AM, you wrote: I have just tried this: on mouseUp set the useUnicode to true set the unicodeText of the selectedText to numToChar(2340)

Re: autoHilite and focus (following Jacque's solution)

2011-07-06 Thread Ken Ray
With the focus gone, my user will probably try to press Tab to return the focus to the input field. But when the focus is on the card, none of my buttons receives that Tab keypress. Is there no way to achieve what I want (see first sentence of this email)? Slava, instead of turning the

Re: record sound problem on windows

2011-07-06 Thread Alex Shaw
Hi Slava I found a standalone xp machine to test on things worked ok. Well most of the time. There still seem to be issues when recording short sounds that would come out repeated or slightly garbled or crash the application quite frequently. Also, recording in stereo seems to work in

Re: Unzipping Mac apps with revZip

2011-07-06 Thread Terry Judd
On 06/07/2011, at 9:26 PM, Roger Eller roger.e.el...@sealedair.com wrote: On Wed, Jul 6, 2011 at 6:54 AM, Terry Judd wrote: On 06/07/2011 05:41 PM, Terry Judd wrote: I¹m trying to extract and save files from a zip archive using Livecodes built in zip routines. It all seems to work

autoHilite and focus (following Jacque's solution)

2011-07-06 Thread Slava Paperno
Thanks, Ken--but I do want traversalOn to be true: that's the natural behavior of a search field and the Find button: type your target, then --click Find or --press Enter or --press Tab to focus on the Find button, then press Enter That's why I have, at the bottom of the Find button's mouseUp

AW: Can't pick the mousecolor with brush tool while mousedown

2011-07-06 Thread Tiemo Hollmann TB
Hallo Björnke, good approach, I never would have thought about this. I am still struggeling with the funny (but understandable) zebra effect, but perhaps I'll find a way. I think I have to find a way to check if I am already outside of the range of the pixels (size of the brush tool) I just have

Re: default textsize and textfont?

2011-07-06 Thread J. Landman Gay
On 7/6/11 8:07 AM, Björnke von Gierke wrote: note that revCommon is added to every built standalone, therefore building on macos and then checking the effective font in a windows standalone will only show that revcommon works as expected ;) You probably remember those problems from standalones

Re: autoHilite and focus (following Jacque's solution)

2011-07-06 Thread J. Landman Gay
On 7/6/11 2:06 AM, Slava Paperno wrote: But then I added other buttons to the same card, and found that if any of them has AutoHilite set to true, my focus command is undone, and the focus moves to the card itself as soon as the mouseUp handler is done in the Find button. I do want the user to

Re: default textsize and textfont?

2011-07-06 Thread Kee Nethery
Thank you Terry. On Mac OS X this command: put the effective textfont of this stack the effective textsize of this stack returns: Lucinda Grande 11 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe,

Re: default textsize and textfont?

2011-07-06 Thread Ken Ray
So if a script wants to find out the system font, and the above is added to every standalone, then we could call revFontGetSystemFont in our scripts whenever we needed to know that info. That's handy. Keep in mind though that it's not the *true* system font (as the OS would give you); it's a

Re: Gottit!

2011-07-06 Thread Richmond Mathewson
-- a.k.a Richmond finally finds the paracetemol put the selectedChunk into CHUNGK select after CHUNGK Yippee-Doo, Caloo-Caleh, and other foolish noises demonstrating that after a year I have finally found the cure to a besetting

Re: default textsize and textfont?

2011-07-06 Thread Richard Gaskin
Ken Ray wrote: Keep in mind though that it's not the *true* system font (as the OS would give you); it's a font name constant that the revFontGetSystemFont handler returns. So if tomorrow, OS X switches from Lucida Grande to Futura, calling revFontGetSystemFont would still hand you Lucida

Re: Gottit!

2011-07-06 Thread stephen barncard
Richmond, this is off-topic, but I use google mail and your messages are being tagged as not being you: http://fulton.barncard.com/bugz/richmond.png with an explanation from google http://mail.google.com/support/bin/answer.py?hl=en-GBctx=mailanswer=185812 Now I don't have to read the headers

Re: autoHilite and focus (following Jacque's solution)

2011-07-06 Thread Peter Brigham MD
On Jul 6, 2011, at 12:52 PM, J. Landman Gay wrote: On 7/6/11 2:06 AM, Slava Paperno wrote: But then I added other buttons to the same card, and found that if any of them has AutoHilite set to true, my focus command is undone, and the focus moves to the card itself as soon as the mouseUp

Re: Clipboard in version 4.0

2011-07-06 Thread Jonathan Lynch
I ultimately did do some kludging. It was grim. I use VBscript to open up a notepad document, then use sendkeys within the vbscript to paste, select all, copy, and close the notepad document. This works, but it has to be visible in order to work, so it is not very elegant. On Wed, Oct 13, 2010 at

autoHilite and focus (following Jacque's solution) SOLVED, THANKS

2011-07-06 Thread Slava Paperno
I love this list for the education I get as much as for the practical advice. After hearing everything that has been said in this thread (mostly by Jacque, but also by others), here is the solution that works. To recap briefly, the problem is what Jacque calls the engine's long-standing behavior

Re: object beneath mouseLoc?

2011-07-06 Thread Nicolas Cueto
Thank you, Dick. Didn't try out your latest variation, but I appreciate the detailed explanation and learning about what frontscripts are and how they can be used. Completely new concept. Cheers. -- Nicolas Cueto -- Nicolas Cueto ___ use-livecode

scripting QuickTime player

2011-07-06 Thread Timothy Miller
Hello, I've never tried scripting for a quicktime player. Tricky. A few tips would be helpful. In the stack I'm working on, there's only one QT player per card. The filename of the player is already established at openCard, the sound files stored on a local volume. They are in m4a format if

Re: scripting QuickTime player

2011-07-06 Thread Scott Rossi
Hi Tim: Try setting the startTime of the player to what you need (you may need to do a conversion from player units to seconds). Alternatively, you can set the playLoudness property of the player to 0 (although I seem to remember someone running into an issue where setting playLoudness to 0

Re: autoHilite and focus (following Jacque's solution)

2011-07-06 Thread Bob Sneidar
So THAT is how I got out there! Bob On Jul 6, 2011, at 2:48 PM, Peter Brigham MD wrote: On OS X, where buttons by default don't respond the same way, it's a field. This has been known to drive developers gibbering into the streets, and I wish there were a way to turn that off.

Re: autoHilite and focus (following Jacque's solution) SOLVED, THANKS

2011-07-06 Thread Bob Sneidar
This works because you are sending in time, after everything that would have automatically reset the focus is finished. Good catch. Bob On Jul 6, 2011, at 2:56 PM, Slava Paperno wrote: I love this list for the education I get as much as for the practical advice. After hearing everything

OpenField and keeping the focus on the field

2011-07-06 Thread Tom Johnson
Hello, I'm running into a similar problem as another that's currently on the list. What I'm trying to do is keep the focus on the field where the script below lives. If I do a simple focus on me or something similar it goes into a loop of openField. If there's a way to keep the focus in the field

Re: Gottit!

2011-07-06 Thread Mark Wieder
Richmond- Wednesday, July 6, 2011, 11:50:38 AM, you wrote: Thanks Slava and Mark for getting it wrong in such a way that it goaded me into cracking the thing at least . . . :) two wrongs don't make a right, but three lefts do -Steven Wright -- -Mark Wieder mwie...@ahsoftware.net

defining and using globals in an application

2011-07-06 Thread Mark Stuart
Hi all, To me, once globals are defined and put with a value, their value should be available from any stack within the application. So far, so good. But the problem arises where, within other stacks script, if you don't define the required global again, the desired value is not there. The

Re: defining and using globals in an application

2011-07-06 Thread dunbarx
Do you mean that if you declare and load a global, say yourGlobal, that you should be able, in any other script, to just write: answer yourGlobal and retrieve that data? I find that variables, script local variable and globals are treated just right. I could be old-fashioned, though.

RE: defining and using globals in an application

2011-07-06 Thread Slava Paperno
Mark, When I define a global in the main stack, it is available to all its substacks. Are you sure this is not the case in your application? You may have already seen this in User Guide: 2.2.4 Main Stacks and Substacks The first stack created in a stack file is called the mainstack. Any other

RE: defining and using globals in an application

2011-07-06 Thread Slava Paperno
if you don't define the required global again, the desired value is not there. You have to declare the global in the script where you want to use its value, but you don't have to define the value again. from the Main Stack script: global gMyName put Slava into gMyName from a substack, any

RE: OpenField and keeping the focus on the field

2011-07-06 Thread Slava Paperno
Tom, I attach a stack that does what I think you were trying to do. Slava -Original Message- From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode- boun...@lists.runrev.com] On Behalf Of Tom Johnson Sent: Wednesday, July 06, 2011 8:42 PM To: LC Questions Subject:

RE: defining and using globals in an application

2011-07-06 Thread Slava Paperno
I don't know many programming languages, but in those I do know, I notice a distinction between defining a variable and declaring a variable. You define a variable when you put a value in it. You may still need to declare it before you use it elsewhere. LiveCode keeps you from terrible debugging

Re: defining and using globals in an application

2011-07-06 Thread J. Landman Gay
On 7/6/11 10:29 PM, Mark Stuart wrote: I think it is unnatural to call it a global and the value of that global not be available anywhere else (in other stacks), unless you define that global again. The engine is very forgiving about variable names. It is okay (technically, anyway) to have

Re: scripting QuickTime player

2011-07-06 Thread Devin Asay
On Jul 6, 2011, at 4:33 PM, Timothy Miller wrote: Hello, I've never tried scripting for a quicktime player. Tricky. A few tips would be helpful. In the stack I'm working on, there's only one QT player per card. The filename of the player is already established at openCard, the sound

Re: defining and using globals in an application

2011-07-06 Thread Mark Wieder
Jacque- Wednesday, July 6, 2011, 8:50:09 PM, you wrote: It is okay (technically, anyway) to have identically-named global, script local, and handler local variables. No. It isn't. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode

RE: defining and using globals in an application

2011-07-06 Thread Slava Paperno
It is okay (technically, anyway) to have identically-named global, script local, and handler local variables. You can't have identically named local variable within the scope of the variable, but you can have identically named script variables in different scripts and identically named local

defining and using globals in an application

2011-07-06 Thread Mark Stuart
Hi Slava, You wrote: You said the value of that global not be available anywhere else, but the value IS available everywhere else. You just have to declare that this is a global variable before using it, so LC knows where to fetch that value. Again, my point exactly. You HAVE to declare the

a color picker widget?

2011-07-06 Thread Slava Paperno
Is there a color-picker widget that I could insert into my stack? I want the user to be able to choose a color. I know I can simply display a graphic with a color wheel and tell the user to click (and test the color under the mouse), but a conventional interface for choosing a color would be

Re: a color picker widget?

2011-07-06 Thread Jan Schenkel
--- On Wed, 7/6/11, Slava Paperno sl...@lexiconbridge.com wrote: Is there a color-picker widget that I could insert into my stack? I want the user to be able to choose a color. I know I can simply display a graphic with a color wheel and tell the user to click (and test the color under the

Re: a color picker widget?

2011-07-06 Thread Ken Ray
On Jul 6, 2011, at 11:58 PM, Slava Paperno wrote: Is there a color-picker widget that I could insert into my stack? I want the user to be able to choose a color. I know I can simply display a graphic with a color wheel and tell the user to click (and test the color under the mouse), but a

Re: defining and using globals in an application

2011-07-06 Thread Scott Rossi
Hi Mark: If I understand what you're looking for, there are other ways to get what you want if you don't want to declare a global: you could use a custom property or a function. the specialGlobalValue of this stack specialGlobalValue() I disagree with your assessment of declaring globals as

Re: defining and using globals in an application

2011-07-06 Thread J. Landman Gay
On 7/6/11 11:22 PM, Slava Paperno wrote: It is okay (technically, anyway) to have identically-named global, script local, and handler local variables. You can't have identically named local variable within the scope of the variable, but you can have identically named script variables in

Re: scripting QuickTime player

2011-07-06 Thread Timothy Miller
It totally helped, Devin. Works great. Thanks a bunch. Tutorial appreciated. I didn't check the timescale property immediately. I guessed maybe 30 frames per second. Hahaha. By trial and error the ideal value turned out to be 6. Now I get it. Tim On Jul 6, 2011, at 9:04 PM, Devin Asay

Re: defining and using globals in an application

2011-07-06 Thread J. Landman Gay
Mark Stuart wrote: Again, my point exactly. You HAVE to declare the global again, and again where needed. The difference may be that in other languages you are generally working in a self-contained environment. Your globals will never interfere with anyone else's variable names. In