mobileControlDo - player
This is “lean”. ~~"begin seeking forward" only on iOS But Android are we going to use - *time*: The milliseconds from the beginning. To build, by hand, something that will “play forward/backward” because of the time? So we are going use a Livecode options to make time ➢ 00:12:20 --- 00:2:40. #timing remaining And make it run time active as we play the file? Can we download some site that has mastered that "thing" LC file/library. Some stack BR **Player Specific Actions** - "play": Start playing the content of the player. - "pause": Pause the content at the current position. - "stop": Stop playing the content of the player. - "prepareToPlay" (iOS Only): Make the content ready to play, but don't actually commence playback. - ~~"begin seeking forward" (iOS Only): Start seeking forward through the content of the player.~~ *Note*: removed in LiveCode 9.6 - ~~"begin seeking backward" (iOS Only): Start seeking backward through the content of the player.~~ *Note*: removed in LiveCode 9.6 - ~~"end seeking" (iOS Only): Stop seeking through the content of the player.~~ *Note*: removed in LiveCode 9.6 - "snapshot" | "snapshot exactly", *time*, [ *maxWidth*, *maxHeight* ] (iOS Only): Take a snapshot of the movie at time milliseconds from the beginning. If the 'exactly' form is specified the frame produced is as close as possible to time, otherwise the nearest keyframe is used. The snapshot is made available as a new image object cloned from the templateImage, with data in the format as specified by the lcs,global, lcs,paintCompression, property. Takes the following additional parameters: - *time*: The milliseconds from the beginning. - *maxWidth* (optional): If *maxWidth* and *maxHeight* are specified, the snapshot is scaled to fit within a rectangle of that size but preserving the frame's aspect ratio. - *maxHeight* (optional): If *maxWidth* and *maxHeight* are specified, the snapshot is scaled to fit within a rectangle of that size but preserving the frame's aspect ratio. ___ 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: Trying to use the Segmented Control
@ Ralf Bitter Dear Ralf, I downloaded your segmented control from: https://github.com/revig/universal-button-widget/releases/tag/1.0.1 and I installed the widget using the Extension Manager in the IDE. It looks very nice. Exactly what allows control and even change the behavior. First time users should know that the custom properties (as described by you) are custom properties of the group "menuBtnGrp". For a first time, two visible switches would probably allow users to just test without having to look under the hood. Since I must build such button groups dynamically (users can add or remove modules which then appear put on the navigation bar that is constiung of such "buttons") I will just need to script this a bit in more detail. I also wrote my own bar using a table field where I mimic the hiliting and hover (mouseover) effect when moving the mouse over lines or using arrow keys (up and down. It looks like a button bar when using an image source for a first character. But it does not work for SVG as far as I know. And it only works for vertical "bars". On the other hand, it is very easy to dynamically create and remove lines. Actually, I track the mousemove and detect the line number and then place a transparent graphic over the selected line. This gives more control than using the built-in hilited property. If someone is interested, I can send... So, thanks a lot to you for providing this, and I am sure I will have fun using it... Roland ___ 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: Will Browser widget ever work on Linux?
Thanks for all the inputs gentlemen I agree on the need for cross platform embedded browser support. Will LC use another embedded browser for the mac? So I guess there are more questions than answers here in terms of a 3 platform solution. I have my first ssd sitting in the box, and once i install it i will try not to take it for granted when judging the "performance" of my work. Cheers, Tom On Wed, Dec 9, 2020 at 12:15 PM Mark Wieder via use-livecode < use-livecode@lists.runrev.com> wrote: > On 12/9/20 8:40 AM, Curry Kenworthy via use-livecode wrote: > > > Yep, it actually feels great to be a Windows-first LiveCoder. > > I'm not gonna get sucked into religious wars here... > > > Like the field, embedded Browser is a way to > > deliver and display so many different kinds of content that it should be > > considered a foundational part of LC. Can't afford to let it slip. > > Yep. So... browser support on linux? > > > Now that I have an SSD, the LC script editor troubles are a thing of the > > past too. LC simply made the mistake of designing broadly-used software > > on high-end hardware, so it wasn't a great design, especially for the > > masses. (Strange because that's usually a beginner's mistake.) > > When I worked at Apple I was always the guy who wanted to use the older > hardware while everyone else was jumping for the latest models because I > was dead set on finding compatibility bugs. My favorite discovery was > uncovering a bug in the MPW C compiler because it had only previously > been tested on the latest shiny new hardware. > > -- > Mark Wieder > ahsoftw...@gmail.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 > -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ 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: return "error" code from standalone compile
I use AUTOHOTKEY... as a fast, dirty way to "get stuff done" when I'm either too lazy or too rushed to do a "quality" job with Livecode. It has a command called "Run" & "Runwait" ... which returns the calling program's (Livecode executable, in this case) return code into a predefined variable called "ErrorLevel" (how original!). So a line in a AUTOHOTKEY script for this would look like: cmd = c:\livecode\SomeLiveCode.exe RunWait, %cmd%,,UseErrorLevel exitcode := ErrorLevel if (exitcode > 1) Autohotkey takes some getting used to but I think it's a handy addition to development projects.. since AHK scripts can be compiled into executables, themselves. My 4.5 cents Douglas Ruisaard Trilogy Software (250) 573-3935 -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of John Balgenorth via use-livecode Sent: Thursday, December 10, 2020 4:03 AM To: How to use LiveCode Cc: John Balgenorth Subject: Re: return "error" code from standalone compile Since Livecode is written in C++ here is some info about using return in C. Every C program has a function named main. At the end of the function the programmer usually writes a return 0; That tells the c program the code has completed and is exiting with a 0 value which confirms it has successfully executed the code and is quitting. At any point above that line the programmer can write a return call but they will usually use a 1 on another value. The program will exit the code at that point and it does not matter what value is entered after the return but 1 usually means the code failed and any other value but 0 means anything you want it to mean. JB > On Dec 9, 2020, at 8:52 PM, J. Landman Gay via use-livecode > wrote: > > I don't know much about this but it looks interesting. Is there a list of > exit codes somewhere? When the OS receives the exit code, what happens? I.e., > how would I use it? > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com >> On December 9, 2020 7:48:10 PM Mark Wieder via use-livecode >> wrote: >> >>> On 12/9/20 5:32 PM, Douglas A. Ruisaard via use-livecode wrote: >>> On the completion of a stack, can the compiled executable return an error >>> code like the old DOS ErrorLevel value(s)? If so, how do you specify the >>> error code? in the on closeStack call? >> >> See the quit command in the dictionary. >> >> quit 42 >> >> -- >> Mark Wieder >> ahsoftw...@gmail.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 > > > > > ___ > 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: export snapshot woverwrites variable?
Hi Mark, > Am 10.12.2020 um 15:25 schrieb Mark Waddingham via use-livecode > : > > On 2020-12-10 13:55, Klaus major-k via use-livecode wrote: >> Hi friends, >> ## Doing this again fixes the inconvenience and I can continue: >> put dasObjekt() into tObject >> ... >> Funky, funky!? > Nope - not funky. a littel bit? 8-) > Container syntax can be either a variable (with array indices or without), or > an object chunk which has a notion of 'text' (i.e. button, field, image). > If it is a variable then the variable gets modified. > If it is an object chunk then the text of the object gets changed. > Variables are only treated as (potential) object chunks when being evaluated > as a source, and only then if the thing operating on them expects an object. > e.g. the blendLevel of tObject (property syntax only makes sense when > targetting an object chunk, so the contents of tObject are parsed as a > control chunk). > Indeed, if this wasn't the case then you wouldn't ever be able to change > tObject in the following script: > local tObject > put the long id of field 1 into tObject > -- If variable containers (targets) resolved as objects first: > put "foo" into tObject -- this would set the text of the field to "foo" > > Warmest Regards, > > Mark. thank you for this explanation, wil take this into account the next time! Best Klaus -- Klaus Major https://www.major-k.de kl...@major-k.de ___ 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: export snapshot woverwrites variable?
On 2020-12-10 13:55, Klaus major-k via use-livecode wrote: Hi friends, ## Doing this again fixes the inconvenience and I can continue: put dasObjekt() into tObject ... Funky, funky!? Nope - not funky. Container syntax can be either a variable (with array indices or without), or an object chunk which has a notion of 'text' (i.e. button, field, image). If it is a variable then the variable gets modified. If it is an object chunk then the text of the object gets changed. Variables are only treated as (potential) object chunks when being evaluated as a source, and only then if the thing operating on them expects an object. e.g. the blendLevel of tObject (property syntax only makes sense when targetting an object chunk, so the contents of tObject are parsed as a control chunk). Indeed, if this wasn't the case then you wouldn't ever be able to change tObject in the following script: local tObject put the long id of field 1 into tObject -- If variable containers (targets) resolved as objects first: put "foo" into tObject -- this would set the text of the field to "foo" Warmest Regards, Mark. -- Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps ___ 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: export snapshot woverwrites variable?
Hi all, > Am 10.12.2020 um 15:08 schrieb Brian Milby via use-livecode > : > > What about using (tObject)? Since tObject is a container itself, the export > put the data in the container directly instead of the referenced container? > Sent from my iPhone >> On Dec 10, 2020, at 8:56 AM, Klaus major-k via use-livecode >> wrote: >> Hi friends, >> just found a very strange thing... >> I have this script: >> ... >> put dasObjekt() into tObject >> ## returns in this special case -> image "Bild_1" >> flip tObject horizontal >> # Overwrite image data >> export snapshot from rect(the rect of tObject) of tObject to tObject as PNG >> ## But now, LC gives an error indication that tObject now contains the DATA >> of the new PNG >> ## Hint: åPNG... >> ## And yes, the palette in the debugger shows the complete PNG binary data >> instead of -> image "Bild_1" >> ## as the content of tObject >> ## Doing this again fixes the inconvenience and I can continue: >> put dasObjekt() into tObject >> ... I finally solved it with resolving the actual NAME of the image: ... ## Yes, we have a function for everything! :-) put dasObjekt2() into tObject ## -> Bild_1 ... export snapshot from rect(the rect of img tName) of img tName to img tName as PNG ... Best Klaus -- Klaus Major https://www.major-k.de kl...@major-k.de ___ 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: export snapshot woverwrites variable?
Hi Brian, > Am 10.12.2020 um 15:08 schrieb Brian Milby via use-livecode > : > > What about using (tObject)? sorry, no capisce? > Since tObject is a container itself, the export put the data in the container > directly instead of the referenced container? Hm, I thought you were working at Livecode and could answer this? :-D But yes, obvioulsy, question is: desired/correct behviour? Should I use DO somehow here? > Sent from my iPhone > >> On Dec 10, 2020, at 8:56 AM, Klaus major-k via use-livecode >> wrote: >> >> Hi friends, >> >> just found a very strange thing... >> I have this script: >> ... >> put dasObjekt() into tObject >> ## returns in this special case -> image "Bild_1" >> >> flip tObject horizontal >> # Overwrite image data >> export snapshot from rect(the rect of tObject) of tObject to tObject as PNG >> >> ## But now, LC gives an error indication that tObject now contains the DATA >> of the new PNG >> ## Hint: åPNG... >> ## And yes, the palette in the debugger shows the complete PNG binary data >> instead of -> image "Bild_1" >> ## as the content of tObject >> >> ## Doing this again fixes the inconvenience and I can continue: >> put dasObjekt() into tObject >> ... >> >> Funky, funky!? Best Klaus -- Klaus Major https://www.major-k.de kl...@major-k.de ___ 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: export snapshot woverwrites variable?
What about using (tObject)? Since tObject is a container itself, the export put the data in the container directly instead of the referenced container? Sent from my iPhone > On Dec 10, 2020, at 8:56 AM, Klaus major-k via use-livecode > wrote: > > Hi friends, > > just found a very strange thing... > I have this script: > ... > put dasObjekt() into tObject > ## returns in this special case -> image "Bild_1" > > flip tObject horizontal > # Overwrite image data > export snapshot from rect(the rect of tObject) of tObject to tObject as PNG > > ## But now, LC gives an error indication that tObject now contains the DATA > of the new PNG > ## Hint: åPNG... > ## And yes, the palette in the debugger shows the complete PNG binary data > instead of -> image "Bild_1" > ## as the content of tObject > > ## Doing this again fixes the inconvenience and I can continue: > put dasObjekt() into tObject > ... > > Funky, funky!? > > > Best > > Klaus > -- > Klaus Major > https://www.major-k.de > kl...@major-k.de > > > ___ > 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
export snapshot woverwrites variable?
Hi friends, just found a very strange thing... I have this script: ... put dasObjekt() into tObject ## returns in this special case -> image "Bild_1" flip tObject horizontal # Overwrite image data export snapshot from rect(the rect of tObject) of tObject to tObject as PNG ## But now, LC gives an error indication that tObject now contains the DATA of the new PNG ## Hint: åPNG... ## And yes, the palette in the debugger shows the complete PNG binary data instead of -> image "Bild_1" ## as the content of tObject ## Doing this again fixes the inconvenience and I can continue: put dasObjekt() into tObject ... Funky, funky!? Best Klaus -- Klaus Major https://www.major-k.de kl...@major-k.de ___ 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: return "error" code from standalone compile
Since Livecode is written in C++ here is some info about using return in C. Every C program has a function named main. At the end of the function the programmer usually writes a return 0; That tells the c program the code has completed and is exiting with a 0 value which confirms it has successfully executed the code and is quitting. At any point above that line the programmer can write a return call but they will usually use a 1 on another value. The program will exit the code at that point and it does not matter what value is entered after the return but 1 usually means the code failed and any other value but 0 means anything you want it to mean. JB > On Dec 9, 2020, at 8:52 PM, J. Landman Gay via use-livecode > wrote: > > I don't know much about this but it looks interesting. Is there a list of > exit codes somewhere? When the OS receives the exit code, what happens? I.e., > how would I use it? > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com >> On December 9, 2020 7:48:10 PM Mark Wieder via use-livecode >> wrote: >> >>> On 12/9/20 5:32 PM, Douglas A. Ruisaard via use-livecode wrote: >>> On the completion of a stack, can the compiled executable return an error >>> code like the old DOS ErrorLevel value(s)? If so, how do you specify the >>> error code? in the on closeStack call? >> >> See the quit command in the dictionary. >> >> quit 42 >> >> -- >> Mark Wieder >> ahsoftw...@gmail.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 > > > > > ___ > 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: Printing a com.livecode.widget.browser
Hi Terry, Can you use lockscreen? Greetings William Op do 10 dec. 2020 om 10:15 schreef Terence Heaford via use-livecode < use-livecode@lists.runrev.com>: > Clearly you can’t print a card that contains a browser widget as livecode > is unable to do this. > > I don’t understand why because Safari can and I believe they are both > based on webkit. > > Anyway I have come up with a semi acceptable workflow that involves. > > 1. Exporting a screenshot of the screen with the widget into a variable. > > 2. Pasting via script into a LC image object. > > 3. Then print the portion of the card containing the image. > > The problem is this. > > I have both the image and widget on the same card and hide the widget when > I want to print the image and vice versa when going back to the widget. > > There is a noticeable flash when hiding and showing the objects. > > I am looking for ideas as to how I can minimise this flash or camouflage > it for the user. > > > Thanks > > Terry > ___ > 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
Printing a com.livecode.widget.browser
Clearly you can’t print a card that contains a browser widget as livecode is unable to do this. I don’t understand why because Safari can and I believe they are both based on webkit. Anyway I have come up with a semi acceptable workflow that involves. 1. Exporting a screenshot of the screen with the widget into a variable. 2. Pasting via script into a LC image object. 3. Then print the portion of the card containing the image. The problem is this. I have both the image and widget on the same card and hide the widget when I want to print the image and vice versa when going back to the widget. There is a noticeable flash when hiding and showing the objects. I am looking for ideas as to how I can minimise this flash or camouflage it for the user. Thanks Terry ___ 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: return "error" code from standalone compile
Every application can have its own exit codes, but 0 should always be used for success and 1 for error. Although there are exceptions. The Dos Find command for example returns 1 when the search was successfull but nothing was found. You could use exit codes for example in batch files. The batch file runs a program and according to the exit code of that program the batch file executes the next command or application or what ever. The OS is not interested in the exit codes. ;) But maybe the batch file or program that executed the other app. I am using this feature for example in some of my LC app where i execute a 3rd party command line tool using shell(). 'The result' then contains the exit code. Important: If the exit code is 0 then 'the result' is empty. Here are some links with some more information Windows http://www.chebucto.ns.ca/~ak621/DOS/ExitCode.html Linux https://shapeshed.com/unix-exit-codes/ macOS https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/sysexits.3.html Regards, Matthias - Matthias Rebbe Life Is Too Short For Boring Code > Am 10.12.2020 um 05:51 schrieb J. Landman Gay via use-livecode > : > > I don't know much about this but it looks interesting. Is there a list of > exit codes somewhere? When the OS receives the exit code, what happens? I.e., > how would I use it? > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > On December 9, 2020 7:48:10 PM Mark Wieder via use-livecode > wrote: > >> On 12/9/20 5:32 PM, Douglas A. Ruisaard via use-livecode wrote: >>> On the completion of a stack, can the compiled executable return an error >>> code like the old DOS ErrorLevel value(s)? If so, how do you specify the >>> error code? in the on closeStack call? >> >> See the quit command in the dictionary. >> >> quit 42 >> >> -- >> Mark Wieder >> ahsoftw...@gmail.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 > > > > > ___ > 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