Search found 1990 matches

by [-hh]
Wed Jun 19, 2019 10:29 pm
Forum: Rich Media
Topic: Fast method for counting RGB values of an image
Replies: 5
Views: 63

Re: Fast method for counting RGB values of an image

I'll add that to the sample stack "imageStatistics" tomorrow.

LC Script needs the most time to convert the binary colors to numeric r,g,b-triples. This has to be done in Javascript. For the frequency counting via arrays is LC as fast as Javascript.
by [-hh]
Wed Jun 19, 2019 8:14 pm
Forum: Rich Media
Topic: Fast method for counting RGB values of an image
Replies: 5
Views: 63

Re: Fast method for counting RGB values of an image

The (still slow) method of Bernd is one of the fastest you can have with LC Script. Walking through and manipulating imageData becomes very fast by using Javascript methods (via a browser widget). Sample stack "imageStatistics shows, using Javascript, the three marginal distributions of R,G, and B. ...
by [-hh]
Sun Jun 16, 2019 8:28 pm
Forum: Internet
Topic: Webcam/Microphone in CEF Browser
Replies: 1
Views: 94

Re: Webcam/Microphone in CEF Browser

GetUserMedia() doesn't work in the browser widget, so NO. This makes webRTC currently unaccessible from LC. There is a CEF update announced for one of the next LC releases. I don't know whether they'll include media access for the widget with that update. But you can use with an Indy version the Ind...
by [-hh]
Sun Jun 16, 2019 8:09 pm
Forum: HTML5
Topic: Html code sound byte and image
Replies: 1
Views: 95

Re: Html code sound byte and image

[Relating to media files always have the SOP in mind, see https://en.wikipedia.org/wiki/Same-origin_policy ] If your post relates to LiveCode HTML5 standalones then here are some points to start. Play sounds, for example http://lessons.livecode.com/m/4071/l/742506-how-do-i-play-sound-files-in-html5 ...
by [-hh]
Sat Jun 15, 2019 6:18 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Counter Intuitive
Replies: 8
Views: 279

Re: Counter Intuitive

You could make it "unique", for example as follows. on arrowKey AK switch AK case "up"; put the id of img "antUP.png" into N; break case "down"; put the id of img "antDN.png" into N; break case "left"; put the id of img "antLF.png" into N; break case "right"; put the id of img "antRT.png" into N; br...
by [-hh]
Wed Jun 12, 2019 4:10 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: What is the opposite of launch?
Replies: 13
Views: 519

Re: What is the opposite of launch?

open process ... that's only for background processing ... No. This is only a proposal of the dictionary. But on Mac you can open only one instance of an app at one time. After using open process you can check openProcesses() or openProcessIDs(). (Don't use LC 8, where openProcess is defunct). For ...
by [-hh]
Mon Jun 10, 2019 3:07 pm
Forum: Getting Started with LiveCode - Experienced Developers
Topic: What is the text of pageheights
Replies: 7
Views: 265

Re: What is the text of pageheights

If I understand correctly you want to print the field (say fld "Print") to pdf, nothing else? If so, did you already try (kind of) the following? on mouseUp ask file "Output to file:" with "test.pdf" if it is empty then exit mouseUp open printing to pdf it revprintField the name of fld "Print" close...
by [-hh]
Mon Jun 10, 2019 10:40 am
Forum: Talking LiveCode
Topic: mouseChunk in a loop
Replies: 8
Views: 286

Re: mouseChunk in a loop

Summarizes partially the above. Works with a locked field. on mouseDown colorMe end mouseDown on colorMe if the mouse is up then exit colorMe if the optionkey is down then put "blue" into cc else put "red" into cc set textcolor of char 1 to -1 of me to "black" -- reset color set textcolor of the sel...
by [-hh]
Sun Jun 09, 2019 10:46 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Sprite sheets
Replies: 11
Views: 395

Re: Sprite sheets

I should be able to display part of a sprite sheet inside some sort of container without having to make an intermediate image. You could group the sprite sheet, set the group's clipsToRect to true. Then set the rect of the group to display part of the sheet (or set the hscroll/vscroll of the group ...
by [-hh]
Tue Jun 04, 2019 1:26 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Turn "outer glow" On and Off? - Solved
Replies: 6
Views: 161

Re: Turn "outer glow" On and Off? - Solved

Certainly "simplifying" makes sense in that "turning on" as from the property inspector could set default values (or the latest used values) for the array elements. But that does nothing else than setting array elements as Richmond did in his "ON"-script above. That is, we have to do that by ourselv...
by [-hh]
Tue Jun 04, 2019 1:05 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Turn "outer glow" On and Off? - Solved
Replies: 6
Views: 161

Re: Turn "outer glow" On and Off? - Solved

Remark. Because the outerglow property is an array the following is equivalent to switch it OFF: set the outerglow of grc "Oval_3_1" to false set the outerglow of grc "Oval_3_1" to true set the outerglow of grc "Oval_3_1" to empty In the first two cases the engine inserts empty because false and tru...
by [-hh]
Tue Jun 04, 2019 9:07 am
Forum: Using Externals and Plugins
Topic: CameraControl selecting from multiple cameras
Replies: 2
Views: 327

Re: CameraControl selecting from multiple cameras

In Jan 2019 I made a sample stack that does what you want.
See there the script of button "startstopCam".

Sample Stacks > IndyCam2_v102
The stack uses moreover optionally an image filter for snapshots, see
viewtopic.php?p=175713#p175713
by [-hh]
Sat Jun 01, 2019 8:36 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: How to check "if the target is a button" ?
Replies: 8
Views: 348

Re: How to check "if the target is a button" ?

For example:

Code: Select all

the target begins with "button "
by [-hh]
Fri May 31, 2019 8:26 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: constraining stack's aspect ratio while resizing
Replies: 9
Views: 455

Re: constraining stack's aspect ratio while resizing

Martin, you could, as below, = set the send rate to a lower value, = use a variable instead of polling the mouse. If this is still jerky (depends strongly on user's computer hardware) = moreover hide the cameracontrol and show a placeholder while resizing. The placeholder may be a svg widget not pre...

Go to advanced search