Stack References When Fired in Backscripts/Libraries
I was (happily) surprised today when in a handler in a library that was put into use on init of the app that a handler in lib_initMyApp.livecodescript # now in the msg hierarchy on bakeBread pDaKin put the name of this stack end bakeBread Then in a top level binary stack name… e.g. baking.livecode if we call "bakeBread" we see stack "baking.livecode" in the msg box and not lib_initMyApp.livecodescript ergo "this stack" in a script only text stack in the message path is not seen as "itself" but actually the target script from whence the command was issued. So this means we don't have to parse for "the target" yay! Am I right? Is this dependable moving forward? Any caveats? BR ___ 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: Extra Title Bar in All Stacks
"System wide" ?? I tried a dozen different apps, include Apple's own Pages, Numbers and Notes etc. *none* of them respond to cmd-shift-T to make tabbed windows… the only "system-wide" is the Finder. Adding an Apple-Mac Only Finder feature to LC that OS X does not even implement this in it's other applications and where, all other apps make use of cmd-shift-T for some other function in that particular app, does it make sense to try to emulate the Mac Finder in LC Windows? If HQ is trying to decide if this is useful enough to spend time making it work; perhaps a better decision is: disable and forget it, so that we are not "harassed" by double title bars, ever. Will any Mac User shed a tear here if this future enhancement is crossed off the list? BR On 3/26/17, 4:13 PM, "use-livecode on behalf of Paul Hibbert via use-livecode"wrote: Ah! that’s the bit I forgot to mention, I think it is a system wide shortcut (it works in some other apps), I have seen it appear in the LC View menu, but not always for some odd reason. If you hit cmd-shift-t with the menu open it immediately selects Toolbar-Text, so I wonder if this is clashing somehow. Paul ___ 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: Line numbers for soft-wrapped styled text?
Hermann wrote: > In sum I learned very important things in this thread: > Using a styledText array (by Alex Tweedly). > Using liststyles for _any_ field (by Jim Lambert). > You could now think about making a "Sample stack" for that (livecodeshare). > > One thing to remark: > One has to adjust the "indention/oudention" by using the left margin and the > first indent. One can even make this width-adaptive to the num of lines and > adjust it in a way to make the numbering looking 'right aligned': > > ## LineNumbering technique by Jim Lambert > ## (applied below by for adaptive and right-aligned indention by -hh). > ## You need a field "TEXT" of styled Text and a checkButton "ShowNumbers". > > ## -- btn "showNumbers > on mouseUp > if the hilite of me then showNumbers > else hideNumbers > end mouseUp > > ## -- fld "TEXT > on textchanged > if the hilite of btn "showNumbers" then showNumbers > else hideNumbers > end textchanged > > on scrollbardrag > if the hilite of btn "showNumbers" then showNumbers > else hideNumbers > end scrollbardrag > > ## card script > local rg="TEXT" > > on hideNumbers > lock screen; lock messages > set the liststyle of line 1 to -1 of fld rg to empty > set the firstindent of line 1 to -1 of fld rg to 0 > set the margins of fld rg to 8 > if there is a grc rg then hide grc rg > unlock screen; unlock messages > end hideNumbers > > on showNumbers > lock screen; lock messages > set the hgrid of fld rg to true -- adjust to your taste > put the num of lines of fld rg into n0 > -- as an empty last line is ignored by LC: > if char -1 of fld rg is cr then add 1 to n0 > put length(n0) into L > set the borderColor of fld rg to "230,230,230" > put 10+L*8 into ww > repeat with i=1 to L >set the firstIndent of line 10^(i-1) to 10^i-1 \ >of fld rg to -16-i*8 > end repeat > set the margins of fld rg to (ww+10,8,8,8) > set the liststyle of line 1 to -1 of fld rg to "decimal" > if there is no grc rg then createNumBack rg > show grc rg > put the rect of fld rg into rct > set points of grc rg to \ >(ww div 2 + item 1 of rct, item 2 of rct) & \ >(ww div 2 + item 1 of rct, item 4 of rct) > set linesize of grc rg to ww > unlock screen; unlock messages > end showNumbers > > on createNumBack gg -- adust to your taste > if there is no grc gg then create grc rg > set style of grc gg to "line" > set capstyle of grc gg to "butt" > set opaque of grc gg to true > set the colorOverlay["color"] of grc rg to "230,230,230" > set blendlevel of grc rg to 70 > end createNumBack > > ## known problem: incorrect 'rightalign' if after deleting the last line > ## the new last line is an empty one and the length of the num changes. > ###END_OF_SCRIPT Hermann, That’s an elegantly full-featured solution! JimL ___ 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
Quasi Student Secure Web Browser?
Hi All, I’m attempting to create a simple secure web browser iOS app for some teachers. I want to prevent any links within an approved site (i.e. “www.approvedsite.com") that link out to others sites from launching. For example, if the "www.approvedsite.com" has a link out to Youtube.com, I want to detect that it is outside the target site and prevent it from loading in the browser object. If the link is within the approved site, i.e. "www.approvedsite.com/anotherpage.html,” I want to allow that page to load in the browser object. At first I thought i would use a widget, but then did not see any command that would get the url. So, I switched gears and went with the mobileControlCreate browser strategy. I thought I could use the browserStartedLoading command, but I’m not quite sure how to go about it. I am not sure how to capture the link url when the user clicks/taps on the link in the browser, and then check it against acceptable urls? I had this is the card script: on browserStartedLoading pUrl put pUrl into tUrlLoading wait 50 answer tUrlLoading set the itemdel to "/" answer item 2 of tUrlLoading if item 2 of tUrlLoading is not "www.myopenmath.com" then answer “You can not access this site." end if end browserStartedLoading Is there a better way to go about accomplishing this in LiveCode? Thank you! John Patten SUSD ___ 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: Line numbers for soft-wrapped styled text?
> Jim L. wrote: > Just set the liststyle of the field that contains your editable text to > ‘decimal’. Then the lines will be automatically numbered and outdented. > Yet conveniently, the ’text’ and the ‘styledtext’ runs will not ‘contain' > the numbering since it is a styling. Now I finally understood your brilliant solution. Thank you very much for that! It beats in speed all other solutions until now. In sum I learned very important things in this thread: Using a styledText array (by Alex Tweedly). Using liststyles for _any_ field (by Jim Lambert). You could now think about making a "Sample stack" for that (livecodeshare). One thing to remark: One has to adjust the "indention/oudention" by using the left margin and the first indent. One can even make this width-adaptive to the num of lines and adjust it in a way to make the numbering looking 'right aligned': ## LineNumbering technique by Jim Lambert ## (applied below by for adaptive and right-aligned indention by -hh). ## You need a field "TEXT" of styled Text and a checkButton "ShowNumbers". ## -- btn "showNumbers on mouseUp if the hilite of me then showNumbers else hideNumbers end mouseUp ## -- fld "TEXT on textchanged if the hilite of btn "showNumbers" then showNumbers else hideNumbers end textchanged on scrollbardrag if the hilite of btn "showNumbers" then showNumbers else hideNumbers end scrollbardrag ## card script local rg="TEXT" on hideNumbers lock screen; lock messages set the liststyle of line 1 to -1 of fld rg to empty set the firstindent of line 1 to -1 of fld rg to 0 set the margins of fld rg to 8 if there is a grc rg then hide grc rg unlock screen; unlock messages end hideNumbers on showNumbers lock screen; lock messages set the hgrid of fld rg to true -- adjust to your taste put the num of lines of fld rg into n0 -- as an empty last line is ignored by LC: if char -1 of fld rg is cr then add 1 to n0 put length(n0) into L set the borderColor of fld rg to "230,230,230" put 10+L*8 into ww repeat with i=1 to L set the firstIndent of line 10^(i-1) to 10^i-1 \ of fld rg to -16-i*8 end repeat set the margins of fld rg to (ww+10,8,8,8) set the liststyle of line 1 to -1 of fld rg to "decimal" if there is no grc rg then createNumBack rg show grc rg put the rect of fld rg into rct set points of grc rg to \ (ww div 2 + item 1 of rct, item 2 of rct) & \ (ww div 2 + item 1 of rct, item 4 of rct) set linesize of grc rg to ww unlock screen; unlock messages end showNumbers on createNumBack gg -- adust to your taste if there is no grc gg then create grc rg set style of grc gg to "line" set capstyle of grc gg to "butt" set opaque of grc gg to true set the colorOverlay["color"] of grc rg to "230,230,230" set blendlevel of grc rg to 70 end createNumBack ## known problem: incorrect 'rightalign' if after deleting the last line ## the new last line is an empty one and the length of the num changes. ###END_OF_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: playing multiple audio files simultaneously
I'm also sticking with LC 8.1. I thought there was a stable version of 9 but evidently not yet. On 3/29/2017 4:13 PM, Peter Bogdanoff via use-livecode wrote: Using “wait” is generally not advisable… I just have a list of all players and then give them all a pause command or set their filenames to empty before playing the new audio. I saw some instability in LC 9 (crashing), so I’m sticking with 8 until those issues are worked out. pb On Mar 29, 2017, at 11:50 AM, Ray via use-livecodewrote: Thanks Peter - I'll look into 9.0 and see how it works. I can't imagine an improvement in 8.x is not retained in 9.x. To your point, I'm assuming you can't use: wait until sound() = "done" with messages in order to avoid playing sounds simultaneously. Right? On 3/29/2017 2:34 PM, Peter Bogdanoff via use-livecode wrote: What I’m doing now is… I’m using the Livecode 8.1 series Converting my QT files to wmv and putting those in the same directory as the QT files Using the platform property to detect the user’s OS Setting the file suffix to .mov or .wmv depending on that result It works well. My issue is wanting to not have the various players play simultaneously—I have to stop the others when another plays! The LC 8 player control on Mac uses AV Foundation, not QT, but does play QT files. On Windows, LC 8 uses DirectShow to play audio and video. https://livecode.com/removing-quicktime-dependency-from-livecodes-player-object/ Peter On Mar 29, 2017, at 11:07 AM, Ray via use-livecode wrote: Yes - 7.7.9. I re-installed Quicktime and got it working, playing sounds simultaneously, but I'm still somewhat apprehensive since Quicktime has been discontinued for so long now. Do you know of anything else Peter or are we pretty much resigned to Quicktime on the desktop for simultaneous sounds? On 3/29/2017 2:02 PM, Peter Bogdanoff via use-livecode wrote: You do have QuickTime installed on your Windows machine? …if you are trying to play a QT file. Peter On Mar 29, 2017, at 10:40 AM, Ray via use-livecode wrote: I've lo0oked into playing multiple audio files simultaneously, for Windows and Mac desktops, and come up with nothing but issues. Using a player object on my Windows 8.1 system, LC 7.1.1, I get an error of "could not open that video". Even if it worked I understand there are latency issues as well as Apple discontinuing Quicktime. I've tried SOX but for some reason can't get it to simply play an audio file (via a shell command). If anybody knows the right syntax for this that would be great. Otherwise, does anyone know of any alternatives compatible with Livecode? I hope I'm missing something here and that Livecode itself can do this. It seems odd that with all the advances Livecode has made we're still struggling aith an age old issue of how to play sounds. Thanks! ___ 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 ___ 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
OT: CurryK Contact Updated
Howdy Folks, If you tried to call me recently and didn't get through, it's fixed now! During a family emergency and death, I wasn't able to manage the settings for my phone number (the number that was listed on my web page) and it expired. There was also a technical problem with the first intended replacement number that I ordered. Today I have a new (and improved) phone number posted on my web sites and ready for action. Beautiful operators are standing by - somewhere out there, probably - meanwhile I'm here at this phone and ready to tackle LC issues great and small, plus awesome training for awesome clients. My emails haven't changed, keep 'em coming. New addon releases are in the works and will be announced as they are ready. Best wishes, Curry Kenworthy Custom Software Development LiveCode Training and Consulting Pompano Beach, FL, USA http://livecodeconsulting.com/ http://curryk.com/consulting/ ___ 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: LiveCode's handling of Unicode glyphs being dependent on the underlying OS
Two mangos on these issues from Hawaii. As one of the users of Richmond's program: He and I have been 'at it" for nearly 8 year with his DevaWrite Pro, because the "state of the art" for rendering Sanskrit in the world of fonts is pretty abysmal with respect to some small but mission critical unicode glyphs that are simply pretty much unavailable via any standard keyboard input… if Richmond succeeds with this app, he will have a "dream machine" for a niche market that, though small, can't get the job done any other way using unicode easily now without going back to Type 1 fonts or setting hot lead type! enough back story… One anomaly that appears to be generated by LC 9dp5 running on Sierra 10.12.3: Code point U803 maps in the Unicode standard to the Extended Latin "H with dot underneath" character. for some bizarre reason, on my machine/system, Livecode is mapping this character to Lucida (I think… possibly Helvetica.) see: http://wiki.hindu.org/uploads/h-with-dot-lucida-helvetica.jpeg Not on Richmond's machine, where it maps correctly to his DevaWriter.ttf font point correctly. Livecode exports the RTF code for this character correctly as u803, but does not render it in the font assigned to the field. I can make a LC stack letter sized, print to PDF save the PDF as HTML and I get the strange anomaly where Adobe sees the PDF output from Livecode and renders css f1: {font-family:Devawriter] f2 (font-family:Ludida} then in the html we have this odd [h-with-dot-here[ But… if I set my preferences in Sublime text to default font is Richmond's font: DevaWriter.tff *then* the h with dot *is* rendered correctly in the Devawriter Font NOT in lucida So this is an issue with the LC engine… I may relate to other issues…but nuisance here because I have no other way to print or render the text except via LiveCode card. unless I opent the RTF output in Text Edit and manually change each "h-with-dot" back to Devawriter font so why is LC not mapping U803 to the font assigned to the field? POINT: this does prove there is issues with rendering on different OS, since that character displays properly on Richmond's machine. On 3/27/17, 2:39 AM, "use-livecode on behalf of Mark Waddingham via use-livecode"wrote: No - it is not being too clever. It is doing precisely what it should for the purposes of laying out text (and indeed what the CoreText engine on MacOS does - as that is what the engine uses). Pretty much everyone writing apps does not want to care about the (very complex) details of turning text into positioned glyphs, they just want a text string to be rendered how 'you would' expect, with regard to the codified rules which have been developed over a large number of years for typesetting language into a printed representation ___ 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: playing multiple audio files simultaneously
Using “wait” is generally not advisable… I just have a list of all players and then give them all a pause command or set their filenames to empty before playing the new audio. I saw some instability in LC 9 (crashing), so I’m sticking with 8 until those issues are worked out. pb On Mar 29, 2017, at 11:50 AM, Ray via use-livecodewrote: > Thanks Peter - I'll look into 9.0 and see how it works. I can't imagine an > improvement in 8.x is not retained in 9.x. > > To your point, I'm assuming you can't use: > > wait until sound() = "done" with messages > > in order to avoid playing sounds simultaneously. Right? > > On 3/29/2017 2:34 PM, Peter Bogdanoff via use-livecode wrote: >> What I’m doing now is… >> I’m using the Livecode 8.1 series >> Converting my QT files to wmv and putting those in the same directory as the >> QT files >> Using the platform property to detect the user’s OS >> Setting the file suffix to .mov or .wmv depending on that result >> >> It works well. My issue is wanting to not have the various players play >> simultaneously—I have to stop the others when another plays! >> >> The LC 8 player control on Mac uses AV Foundation, not QT, but does play QT >> files. On Windows, LC 8 uses DirectShow to play audio and video. >> >> https://livecode.com/removing-quicktime-dependency-from-livecodes-player-object/ >> >> Peter >> >> On Mar 29, 2017, at 11:07 AM, Ray via use-livecode >> wrote: >> >>> Yes - 7.7.9. I re-installed Quicktime and got it working, playing sounds >>> simultaneously, but I'm still somewhat apprehensive since Quicktime has >>> been discontinued for so long now. >>> >>> Do you know of anything else Peter or are we pretty much resigned to >>> Quicktime on the desktop for simultaneous sounds? >>> >>> On 3/29/2017 2:02 PM, Peter Bogdanoff via use-livecode wrote: You do have QuickTime installed on your Windows machine? …if you are trying to play a QT file. Peter On Mar 29, 2017, at 10:40 AM, Ray via use-livecode wrote: > I've lo0oked into playing multiple audio files simultaneously, for > Windows and Mac desktops, and come up with nothing but issues. Using a > player object on my Windows 8.1 system, LC 7.1.1, I get an error of > "could not open that video". Even if it worked I understand there are > latency issues as well as Apple discontinuing Quicktime. > > I've tried SOX but for some reason can't get it to simply play an audio > file (via a shell command). If anybody knows the right syntax for this > that would be great. > > Otherwise, does anyone know of any alternatives compatible with Livecode? > I hope I'm missing something here and that Livecode itself can do this. > It seems odd that with all the advances Livecode has made we're still > struggling aith an age old issue of how to play sounds. > > Thanks! > > ___ > 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 > > > ___ > 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: playing multiple audio files simultaneously
Peter - this is working well now. Thanks for the link, very informative. On 3/29/2017 2:34 PM, Peter Bogdanoff via use-livecode wrote: What I’m doing now is… I’m using the Livecode 8.1 series Converting my QT files to wmv and putting those in the same directory as the QT files Using the platform property to detect the user’s OS Setting the file suffix to .mov or .wmv depending on that result It works well. My issue is wanting to not have the various players play simultaneously—I have to stop the others when another plays! The LC 8 player control on Mac uses AV Foundation, not QT, but does play QT files. On Windows, LC 8 uses DirectShow to play audio and video. https://livecode.com/removing-quicktime-dependency-from-livecodes-player-object/ Peter On Mar 29, 2017, at 11:07 AM, Ray via use-livecodewrote: Yes - 7.7.9. I re-installed Quicktime and got it working, playing sounds simultaneously, but I'm still somewhat apprehensive since Quicktime has been discontinued for so long now. Do you know of anything else Peter or are we pretty much resigned to Quicktime on the desktop for simultaneous sounds? On 3/29/2017 2:02 PM, Peter Bogdanoff via use-livecode wrote: You do have QuickTime installed on your Windows machine? …if you are trying to play a QT file. Peter On Mar 29, 2017, at 10:40 AM, Ray via use-livecode wrote: I've lo0oked into playing multiple audio files simultaneously, for Windows and Mac desktops, and come up with nothing but issues. Using a player object on my Windows 8.1 system, LC 7.1.1, I get an error of "could not open that video". Even if it worked I understand there are latency issues as well as Apple discontinuing Quicktime. I've tried SOX but for some reason can't get it to simply play an audio file (via a shell command). If anybody knows the right syntax for this that would be great. Otherwise, does anyone know of any alternatives compatible with Livecode? I hope I'm missing something here and that Livecode itself can do this. It seems odd that with all the advances Livecode has made we're still struggling aith an age old issue of how to play sounds. Thanks! ___ 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 ___ 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: playing multiple audio files simultaneously
Thanks Peter - I'll look into 9.0 and see how it works. I can't imagine an improvement in 8.x is not retained in 9.x. To your point, I'm assuming you can't use: wait until sound() = "done" with messages in order to avoid playing sounds simultaneously. Right? On 3/29/2017 2:34 PM, Peter Bogdanoff via use-livecode wrote: What I’m doing now is… I’m using the Livecode 8.1 series Converting my QT files to wmv and putting those in the same directory as the QT files Using the platform property to detect the user’s OS Setting the file suffix to .mov or .wmv depending on that result It works well. My issue is wanting to not have the various players play simultaneously—I have to stop the others when another plays! The LC 8 player control on Mac uses AV Foundation, not QT, but does play QT files. On Windows, LC 8 uses DirectShow to play audio and video. https://livecode.com/removing-quicktime-dependency-from-livecodes-player-object/ Peter On Mar 29, 2017, at 11:07 AM, Ray via use-livecodewrote: Yes - 7.7.9. I re-installed Quicktime and got it working, playing sounds simultaneously, but I'm still somewhat apprehensive since Quicktime has been discontinued for so long now. Do you know of anything else Peter or are we pretty much resigned to Quicktime on the desktop for simultaneous sounds? On 3/29/2017 2:02 PM, Peter Bogdanoff via use-livecode wrote: You do have QuickTime installed on your Windows machine? …if you are trying to play a QT file. Peter On Mar 29, 2017, at 10:40 AM, Ray via use-livecode wrote: I've lo0oked into playing multiple audio files simultaneously, for Windows and Mac desktops, and come up with nothing but issues. Using a player object on my Windows 8.1 system, LC 7.1.1, I get an error of "could not open that video". Even if it worked I understand there are latency issues as well as Apple discontinuing Quicktime. I've tried SOX but for some reason can't get it to simply play an audio file (via a shell command). If anybody knows the right syntax for this that would be great. Otherwise, does anyone know of any alternatives compatible with Livecode? I hope I'm missing something here and that Livecode itself can do this. It seems odd that with all the advances Livecode has made we're still struggling aith an age old issue of how to play sounds. Thanks! ___ 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 ___ 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: playing multiple audio files simultaneously
What I’m doing now is… I’m using the Livecode 8.1 series Converting my QT files to wmv and putting those in the same directory as the QT files Using the platform property to detect the user’s OS Setting the file suffix to .mov or .wmv depending on that result It works well. My issue is wanting to not have the various players play simultaneously—I have to stop the others when another plays! The LC 8 player control on Mac uses AV Foundation, not QT, but does play QT files. On Windows, LC 8 uses DirectShow to play audio and video. https://livecode.com/removing-quicktime-dependency-from-livecodes-player-object/ Peter On Mar 29, 2017, at 11:07 AM, Ray via use-livecodewrote: > Yes - 7.7.9. I re-installed Quicktime and got it working, playing sounds > simultaneously, but I'm still somewhat apprehensive since Quicktime has been > discontinued for so long now. > > Do you know of anything else Peter or are we pretty much resigned to > Quicktime on the desktop for simultaneous sounds? > > On 3/29/2017 2:02 PM, Peter Bogdanoff via use-livecode wrote: >> You do have QuickTime installed on your Windows machine? …if you are trying >> to play a QT file. >> >> Peter >> On Mar 29, 2017, at 10:40 AM, Ray via use-livecode >> wrote: >> >>> I've lo0oked into playing multiple audio files simultaneously, for Windows >>> and Mac desktops, and come up with nothing but issues. Using a player >>> object on my Windows 8.1 system, LC 7.1.1, I get an error of "could not >>> open that video". Even if it worked I understand there are latency issues >>> as well as Apple discontinuing Quicktime. >>> >>> I've tried SOX but for some reason can't get it to simply play an audio >>> file (via a shell command). If anybody knows the right syntax for this >>> that would be great. >>> >>> Otherwise, does anyone know of any alternatives compatible with Livecode? >>> I hope I'm missing something here and that Livecode itself can do this. It >>> seems odd that with all the advances Livecode has made we're still >>> struggling aith an age old issue of how to play sounds. >>> >>> Thanks! >>> >>> ___ >>> 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: Line numbers for soft-wrapped styled text?
Richard wrote: > This morning Jim Lambert emailed me a very different solution that I > thought would be worth sharing here. > > Here he uses the engine's own metrics for calculating vertical line > spacings, by having the number field placed below the editable text > field, setting its width to that of the editable field + a left margin > in which he uses the engine's support for numeric list styles to draw > the line numbers: > > on textchanged >lock screen >set the htmltext of fld "nums" to the htmltext of me >set the liststyle of line 1 to -1 of fld nums to "decimal" >set the scroll of fld "nums" to the scroll of me > end textchanged > > The only downside I can see to this approach is for memory, as it > requires copying the full styled text from the source field into the > line number field. Now that I think about it, I’ve overcomplicated things. You don’t need two fields at all. Just set the liststyle of the field that contains your editable text to ‘decimal’. Then the lines will be automatically numbered and outdented. Yet conveniently, the ’text’ and the ‘styledtext’ runs will not ‘contain' the numbering since it is a styling. Of course, this still doesn’t allow you to get rid of the trailing period on the numbers. Jim Lambert ___ 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: playing multiple audio files simultaneously
Yes - 7.7.9. I re-installed Quicktime and got it working, playing sounds simultaneously, but I'm still somewhat apprehensive since Quicktime has been discontinued for so long now. Do you know of anything else Peter or are we pretty much resigned to Quicktime on the desktop for simultaneous sounds? On 3/29/2017 2:02 PM, Peter Bogdanoff via use-livecode wrote: You do have QuickTime installed on your Windows machine? …if you are trying to play a QT file. Peter On Mar 29, 2017, at 10:40 AM, Ray via use-livecodewrote: I've lo0oked into playing multiple audio files simultaneously, for Windows and Mac desktops, and come up with nothing but issues. Using a player object on my Windows 8.1 system, LC 7.1.1, I get an error of "could not open that video". Even if it worked I understand there are latency issues as well as Apple discontinuing Quicktime. I've tried SOX but for some reason can't get it to simply play an audio file (via a shell command). If anybody knows the right syntax for this that would be great. Otherwise, does anyone know of any alternatives compatible with Livecode? I hope I'm missing something here and that Livecode itself can do this. It seems odd that with all the advances Livecode has made we're still struggling aith an age old issue of how to play sounds. Thanks! ___ 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: playing multiple audio files simultaneously
You do have QuickTime installed on your Windows machine? …if you are trying to play a QT file. Peter On Mar 29, 2017, at 10:40 AM, Ray via use-livecodewrote: > I've lo0oked into playing multiple audio files simultaneously, for Windows > and Mac desktops, and come up with nothing but issues. Using a player object > on my Windows 8.1 system, LC 7.1.1, I get an error of "could not open that > video". Even if it worked I understand there are latency issues as well as > Apple discontinuing Quicktime. > > I've tried SOX but for some reason can't get it to simply play an audio file > (via a shell command). If anybody knows the right syntax for this that would > be great. > > Otherwise, does anyone know of any alternatives compatible with Livecode? I > hope I'm missing something here and that Livecode itself can do this. It > seems odd that with all the advances Livecode has made we're still struggling > aith an age old issue of how to play sounds. > > Thanks! > > ___ > 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
playing multiple audio files simultaneously
I've lo0oked into playing multiple audio files simultaneously, for Windows and Mac desktops, and come up with nothing but issues. Using a player object on my Windows 8.1 system, LC 7.1.1, I get an error of "could not open that video". Even if it worked I understand there are latency issues as well as Apple discontinuing Quicktime. I've tried SOX but for some reason can't get it to simply play an audio file (via a shell command). If anybody knows the right syntax for this that would be great. Otherwise, does anyone know of any alternatives compatible with Livecode? I hope I'm missing something here and that Livecode itself can do this. It seems odd that with all the advances Livecode has made we're still struggling aith an age old issue of how to play sounds. Thanks! ___ 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: Object Selection Handles
Actually, I really appreciate Adobe Illustrator's object properties dialog. Sometimes I LIKE being able to define an object's dimensions by typing in coordinates. CAD designers do this all the time. Of course, advanced features like snap to point make this mostly obsolete, but if you need a wall that is x by y by z it is MUCH easier to type in the dimensions than try to drag it to spec. Bob S > On Mar 28, 2017, at 12:43 , Sannyasin Brahmanathaswami via use-livecode >wrote: > > -- Graphic designers don't switch to console and start typing "set the rect > of some object to X,X,X,X" "never gonna happen" ___ 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: specialFolderPath("resources") on Mac with trailing slash
panagiotis wrote: > On Wed, Mar 29, 2017 at 9:43 AM, Tiemo Hollmann TB wrote: > >> LC 8.1.3: getting the specialFolderPath("resources") comes on Mac & >> Win without trailing slash. >> >> On Win I also don't get a trailing slash in a standalone. >> >> BUT in a MacOS 10.12 standalone I get a trailing slash! >> >> Is this a wanted "feature" which I have to script around, or is this >> a bug I should file? > > This is a bug, which will be fixed in LiveCode 8.1.4 RC-1: > > http://quality.livecode.com/show_bug.cgi?id=18619 This is also a good reminder about code style for those of us who write libraries: The engine is pretty consistent about not including the trailing slash with values returned from functions that are folder paths. Indeed where it does, as we've seen here, it's probably a bug. If we all follow that convention it can reduce the learning curve for your APIs, and allow one to swap out one function for another with relative ease. I used to write my own folder path functions that included the trailing slash. Seemed like a good idea at the time, since it saved me from having to include the slash when concatenating with a file name later on. But I found over time that I had to think about things too much, to keep track of which functions included the slash and which didn't, so I could concatenate correctly, avoiding double slashes. No more. Now I follow the engine convention of not including the trailing slash, and life is that much simpler. :) -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.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: Line numbers for soft-wrapped styled text?
Alex, before you waste valuable time: The formattedRect can NOT be used in LC 7/8/9, because of the (2^15 div 2)-limit for coordinates is active for that. So the algorithm works in LC 6.7.11, but the results are sadly 'extremely' wrong in LC 7/8/9: Crossing the 'limit' with a vertical coordinate jumps to negative values for these coordinates. No chance to repair. Using instead the formattedHeight of line 1 to N minus the vscroll works. But it is not exactly doable if the last line is empty (this is not added to the formattedHeight) = your space-below problem -- a bug, TMHO. I found another "dirty" but fast way to get pixel-exact line positions for any field in LC 6/7/8/9. One could perhaps use it until the text measuring problem is solved. One needs a field that is transparent, is not threeD and has no border (use instead an opaque rectangle with border as background). Then set the hgrid to true (this has no visual effect if using as borderColor the backColor of the graphic behind the field, for testing I set the borderColor to red). Now make a snapshot from the field and walk through the maskData to search all such rows in the image that have a fully opaque line. This is unique as long as the field has left and right margins > 0. This search in the image is *very fast* (< 2 ms), only taking the snapshot and getting the maskdata needs some time (around 70 ms in sum for 414x736 pixels). A script that works here correctly with my tests is attached below. It needs here in LC 9 about 120 ms for 4000 lines of heavily styled text from the dictionary in a field of iPhone6 size (414x736). Please change/improve/optimize it, especially the search part. This is still the 'simple' binary search. Hermann You need a field "TEXT" (transparent etc, see above) and a template-num-field "n00" (see my settings below as example). Fields for feedback: "Range", "timing1", "timing2", "info" = [1] The field's script on textchanged updateNbs2 end textchanged on scrollbardrag updateNbs2 end scrollbardrag = [2] The numbering script (100 lines) local nn="lineNumbers",l0,t0,b0,w0,h0,sw0,v0 local rg="TEXT", fw=32 -- num-field width on updateNbs2 lock screen; lock messages put the millisecs into m0 start put the top of fld rg into t0 put the bottom of fld rg into b0 put the left of fld rg into l0 put the width of fld rg into w0 put the height of fld rg into h0 put the vscroll of fld rg into v0 put the scrollbarwidth of fld rg into sw0 set the properties of the templatefield to \ the properties of fld "n00" -- see below if there is a grp nn then delete grp nn create grp nn set lockloc of grp nn to true set opaque of grp nn to true set backColor of grp nn to "204,204,204" set lockloc of grp nn to true set width of grp nn to fw set height of grp nn to the height of fld "text" set topleft of grp nn to l0-fw, t0 set layer of grp nn to 1 put the millisecs into m1 diff1 put visibleTextLines()-1 into tL put the millisecs into m2 diff2 put getLocs() into g put the millisecs into m3 diff3 put "Lines: " & (tL,tL-1+the num of lines of g) \ into fld "range" repeat for each line L in g put item 2 of L into i put ("n") into ni if there is a fld ni then delete fld ni create fld ni in grp nn set left of fld ni to l0-fw+2 set top of fld ni to i-10 put tL into fld ni add 1 to tL end repeat reset the templatefield put the millisecs into m4 diff4 put (m4-m0 &"="& m2-m1 &"+"& m3-m2 &"+"& m4-m3+m1-m0) & \ " ms" into fld "timing" unlock screen; unlock messages end updateNbs2 function getLocs put the millisecs into m0 - start set topleft of img rg to \ (5+the right of fld rg, the top of fld rg) put w0-sw0 into w1 put the millisecs into m1 - diff1 export snapshot from fld rg to img rg as PNG put the millisecs into m2 - diff2 put the maskdata of img rg into mData put the millisecs into m3 - diff3 put NumToByte(255) into c1 repeat 1+log2(w1) put c1 after c1 end repeat put byte 1 to w1 of c1 into c00 put the millisecs into m4 - diff4 repeat with i=1 to h0 put (i-1)*w0 into i0 if byte i0+1 to i0+w1 of mData is c00 then put cr&(0,t0+i) after s end repeat -- avoid overlapping: -- put (0,min(t0,10+item 2 of line 1 of s)) before s put cr & (0,max(h0+t0,10+item 2 of line -1 of s)) after s put s into fld "info" put the millisecs into m5 - diff5 put (m5-m0 &"="& m2-m1 &"+"& m3-m2 &"+"& m5-m3+m1-m0) & \ " ms" into fld "timing2" return char 2 to -1 of s end getLocs function visibleTextLines lock screen; lock messages put the selectedChunk into sc put the scrollbarWidth of fld rg into sw put the margins of fld rg into m put (m,m,m,m) into m -- now we have at least 4 items put the num of lines of fld rg into n put findTopLine(v0+t0-1+item 4 of m,1,n) into L1 return L1-1 end visibleTextLines
AW: specialFolderPath("resources") on Mac with trailing slash
Thanks for the quick answer :) Tiemo -Ursprüngliche Nachricht- Von: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] Im Auftrag von panagiotis merakos via use-livecode Gesendet: Mittwoch, 29. März 2017 10:49 An: How to use LiveCodeCc: panagiotis merakos Betreff: Re: specialFolderPath("resources") on Mac with trailing slash Hi Tiemo, This is a bug, which will be fixed in LiveCode 8.1.4 RC-1: http://quality.livecode.com/show_bug.cgi?id=18619 Best, Panos -- On Wed, Mar 29, 2017 at 9:43 AM, Tiemo Hollmann TB via use-livecode < use-livecode@lists.runrev.com> wrote: > Hello, > > LC 8.1.3: getting the specialFolderPath("resources") comes on Mac & > Win without trailing slash. > > On Win I also don't get a trailing slash in a standalone. > > BUT in a MacOS 10.12 standalone I get a trailing slash! > > Is this a wanted "feature" which I have to script around, or is this a > bug I should file? > > What do you think? > > Tiemo > > > > > > > > ___ > 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: specialFolderPath("resources") on Mac with trailing slash
Hi Tiemo, This is a bug, which will be fixed in LiveCode 8.1.4 RC-1: http://quality.livecode.com/show_bug.cgi?id=18619 Best, Panos -- On Wed, Mar 29, 2017 at 9:43 AM, Tiemo Hollmann TB via use-livecode < use-livecode@lists.runrev.com> wrote: > Hello, > > LC 8.1.3: getting the specialFolderPath("resources") comes on Mac & Win > without trailing slash. > > On Win I also don't get a trailing slash in a standalone. > > BUT in a MacOS 10.12 standalone I get a trailing slash! > > Is this a wanted "feature" which I have to script around, or is this a bug > I > should file? > > What do you think? > > Tiemo > > > > > > > > ___ > 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
specialFolderPath("resources") on Mac with trailing slash
Hello, LC 8.1.3: getting the specialFolderPath("resources") comes on Mac & Win without trailing slash. On Win I also don't get a trailing slash in a standalone. BUT in a MacOS 10.12 standalone I get a trailing slash! Is this a wanted "feature" which I have to script around, or is this a bug I should file? What do you think? Tiemo ___ 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