Re: LC & Catalina; macOS 10.15.x; Xcode 11.3.x; iOS 13.3.x support ???

2020-03-12 Thread hh via use-livecode
> Matthias wrote:
> I did NOT refer to any personal problems. So please do not impute
> such an intention to me.

Sorry Matthias, I obviously misinterpreted "your problems last year".
Hopefully Sean Cole didn't also misinterpret this.

___
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: LC & Catalina; macOS 10.15.x; Xcode 11.3.x; iOS 13.3.x support ???

2020-03-12 Thread hh via use-livecode
> Richard G. wrote at Mike K.:
> The rest of us are having conversations with none other than the lead 
> engineer, right here on this list this morning.

Yes the CTO was in the last two weeks probably more often here than in the
last two years before that two weeks. But he's now more often searching
for excuses than for real help, because there is no real progress with LCS
(except removing 9.5 bugs), LCB and HTML5.

> Help me understand: what would you like to see?

What I woud like to see is that Sean Cole(pi digital) can write here his
opinion without being attacked just for writing that: No content-based
attack, but using the most nasty kind of attack, using (supposed) personal
problems ("your problems last year").
While content-based attacks would have been OK for me.

If this is not possible, I'll better leave this list.

___
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: LC & Catalina; macOS 10.15.x; Xcode 11.3.x; iOS 13.3.x support ???

2020-03-12 Thread hh via use-livecode
> > hh wrote:
> > The uselist is not a LC-praising list. As long as we have the freedom of
> > speech everybody can say whether he is contented with LC or not.
> 
> Bob S. wrote:
> I was not aware we had such freedoms on this list! For instance, if I begin
> to speak of fermented dairy products, I will certainly be censured!
> And well I should be!!!

I wonder why you want to speak of fermented dairy products in order to express
whether you are contented with LC or not.


___
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: LC & Catalina; macOS 10.15.x; Xcode 11.3.x; iOS 13.3.x support ???

2020-03-12 Thread hh via use-livecode
> > hh wrote:
> > Some people are very angry about deficiencies of LC, what I can understand 
> > from
> > their view, and *we should hear what they have to say*.
>  
> Matthias wrote:
> Why. Posting here won´t change anything.

The uselist is not a LC-praising list. As long as we have the freedom of speech
everybody can say whether he is contented with LC or not. And nothing written 
does
change anything *with LC*, also not your positive-only (and excellent) posts ...

> > hh wrote:
> > [And, by the way, macOS 10.15 is repeating some beginner mistakes from the 
> > early 
> > MacOS X versions. Obviously a lot of beginners are currently at work there.]
> 
> Matthias wrote:
> Because people want always something new. It must be always the newest. 
> Because of
> that the lifecycles of products and software are getting shorter and shorter 
> and
> therefore there is less time for development and testing.

But they changed methods of working things to non-working or half-way working 
methods (for example in Mail.app). Beginner mistakes ...
___
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: Philosophical questions about the fontNames

2020-03-12 Thread hh via use-livecode
Indeed, the current implementation of
(Default),(Menu),(Message),(Styled Text),(System),(Text),(Tooltip)
is not very useful.

For example (System) at size 13 on MacOS 10.15 is on Windows 10
at about (System) at size 12. So one needs nevertheless a platform
switch.



___
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: LC & Catalina; macOS 10.15.x; Xcode 11.3.x; iOS 13.3.x support ???

2020-03-12 Thread hh via use-livecode
Some people are very angry about deficiencies of LC, what I can understand from
their view, and *we should hear what they have to say*.

Especially when they get angry about the whitewashing of bugs by some list 
members.

What's wrong that's wrong, no matter who tries to whitewash bugs or even tries 
to
keep quiet about (remaining) bugs. The latter is, compared to the promises of 
the
LC main page, more harmful for the reputation of LC than telling the truth.

And what's good with LC that's good. We too tell the truth with that.

[And, by the way, macOS 10.15 is repeating some beginner mistakes from the early
MacOS X versions. Obviously a lot of beginners are currently at work there.]
___
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: Pinch-Zoom gesture on native textfield. How to?

2020-03-09 Thread hh via use-livecode
http://lessons.livecode.com/m/4069/l/29112-how-do-i-use-native-text-controls-on-mobile
http://lessons.livecode.com/m/4069/l/11509-how-do-i-implement-a-multi-touch-pinch-motion
___
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


LCB widget "BioRhythm" v1.0.0

2020-03-03 Thread hh via use-livecode
The widget computes BioRhythm-Curves (sinus curves with different
periods of days).

The 7 names and their periods are: physical 23, emotional 28,
intellectual 33, spiritual 53, awareness 48, aesthetic 43,
intuition 38. Moreover you can have a weighted mean of the
included of these 7 curves.

Display the values (in range -100 to 100) as graph or as table.

Some may find this widget to be "esoteric". A main reason I made
it was to show a smooth display of curves (that is not possible
in LC Script) and to exercise the display of a table.

Read more, download the widget and a sample stack from
(server loc EU) https://hyperhh.de/widgets/biorhythm.html
or
(server loc US) https://hh.on-rev.com/widgets/biorhythm.html

___
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: Translate metadata to field content

2020-02-22 Thread hh via use-livecode
This is possibly your problem if I understand correctly what
you are doing (Browser source -> LC htmltext -> LC styledText).

You try to work, using one LC method (styledText), around
problems that another LC method (htmltext) has generated.

One way to solve this could be to avoid LC's htmltext at all.
Instead apply JavaScript with its powerful regular expression
methods or, even better, the regex external "sunnYrex" of
Thierry Douez to your input-source from the browser.

That is: Browser source -> REGEX -> LC-styledText


___
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: Translate metadata to field content

2020-02-20 Thread hh via use-livecode
Sorry, forgot that some html entities are not displayed in the list:

So assuming (unusual) should read

-- [1] you use the following for a link target
-- Xtarget10X

where X is ("&" & "#1;") ..., the html translation of numToChar(1).

-- LC translates numToChar(1) to " " should read

-- LC translates numToChar(1) to "X", where X is ("&" & "#1;")
___
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: Translate metadata to field content

2020-02-20 Thread hh via use-livecode
As others try to optimize ("ping") I'll try an improvement too ("pong")
with using another method that requires to change your link targets ONCE:

Instead of unique targets  write in your field

""(1)&"target10"(1)&"""

Handler replaceTargets below does it (slowly) but you probably don't
need it on mobile.

So assuming (unusual)

-- [1] you use the following for a link target
-- target10
-- [2] you use the following for a local page link
-- Target10
-- [3] you don't use  elsewhere. Else add
-- an additional marker to it to differentiate.


Then script your field with the following simple handler:

on linkClicked pUrl
  put the milliseconds into m1
  lock messages; lock screen
  if pUrl begins with "#" then
put numToChar(1)& (char 2 to -1 of pUrl) (1) into tTarget
put 1+offset(tTarget,me)+length(tTarget) into tOff
select char tOff to tOff+3 of me -- see it in locked field
-- select char tOff of me -- variant
scrollSelectionIntoView -- optional
  end if
  put the millisecs -m1 into fld "timing1"
end linkClicked

 helpers (optionally needed)

-- Note. LC adds also an additional "", we don't mind.
on replaceTargets -- should be optimized if used often
  put the millisecs into m1
  lock messages; lock screen
  put the htmltext of fld 1 into tHTML
  set linedel to ""
  put line 1 of tHtml into tI2
  put numToChar(1) into b1
  repeat for each line L in (line 2 to -1 of tHtml)
put "" 1 to offset(quote,L)-1 of L into item 1 of L
put offset("",L) into o1
put b1&"" into char o1 to o1+3 of L
put L after tI2
  end repeat
  set htmlText of fld 1 to tI2 -- LC translates numToChar(1) to ""
  put the millisecs-m1 into fld "timing2"
end mouseUp

on scrollSelectionIntoView
  put the selectedLoc into tSL
  put the vscroll of me into tV
  put item 2 of tSL - the top of me into tDiff
  if tDiff > 0.75*the height of me then
set vscroll of me to tV + 0.4*the height of me
  else if tDiff < 0.25*the height of me then
set vscroll of me to tV - 0.4*the height of me
  end if
end scrollSelectionIntoView


___
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


ChangeImage Widget

2020-02-20 Thread hh via use-livecode


ChangeImage Widget v106

This is a (partial) extension of the TurnImage widget (v135).
It adds masking of the images and several transition animations
(from one  image to a second one). We now have
zoom, barn door horiz/vert, move horiz/vert, squeeze horiz/vert,
swipe diag/horiz/vert, (perspective) turn horiz/vert, rotate.

Download the widget and a sample stack from here:
https://hyperhh.de/widgets/changeimage.html

___
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: Translate metadata to field content

2020-02-18 Thread hh via use-livecode
> JLG wrote:
> I'm still working on htmltext in a field. There are anchors
> that indicate positions elsewhere in the file. A browser will
> automatically find and scroll to the right place in the text.
> I need to reproduce that.

Besides using style runs you could try the following simple
method that works with the htmltext of a (locked) field and
works also in a browser.

-- Assuming (as usual)
-- [1] you use the following style for a link target
-- X
-- where X is any char e.g. a space (else LC removes
-- the tag in its htmltext!)
-- [2] you use the following style for a local page link
-- Target10

Then the following in the field's script does what you want.

-- jumps to local page links (as described above) ##[-hh 2020]
on linkClicked pUrl
  if pUrl begins with "#" then
delete char 1 of pUrl
put "" into tTarget
-- of course there should be no return in tTarget
put the htmltext of me into tHtml
if tTarget is in tHtml then 
  set itemdelimiter to tTarget
  put numToChar(1) after item 1 of tHtml
  set htmltext of me to tHtml
  set itemdelimiter to numToChar(1)
  put 1+length(item 1 of me) into tL
  delete char tL of me
  -- select char tL to tL-1 of me --> variant
  select char tL of me --> see it in locked field
  -- scrollSelectionIntoView --> optional
end if
  end if
end linkClicked

-- works for any selection in a field ##[-hh 2020]
on scrollSelectionIntoView
  put the selectedLoc into tSL
  put the vscroll of me into tV
  put item 2 of tSL - the top of me into tDiff
  if tDiff > 0.75*the height of me then
set vscroll of me to tV + 0.4*the height of me
  else if tDiff < 0.25*the height of me then
set vscroll of me to tV - 0.4*the height of me
  end if
end scrollSelectionIntoView


___
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: HTML spans with links

2020-02-06 Thread hh via use-livecode
The htmltext of a field is based on HTML3 or before.

In HTML 3/4 a span can not contain two links, in HTML5 yes.

[So a browser widget does what you explicitly wish to have.]

Or if you set the metadata of the -tag instead
(= set the metadata of line x of fld 1 to "metadata1").

> JLG wrote:
> If I set the htmlText of a field to HTML that contains a span,
> and if that span also contains  an anchor or href link,
> LC separates the span into multiple ones.
> 
> For example, a field's htmlText set to this:
> 
>  This is some text that contains the 
> metadata. href="#fn">linkOne And here is some more text.  href="#en">linkTwo
> 
> becomes this when retrieved:
> 
>  This is some text that contains the 
> metadata. href="#fn">linkOne And here is some 
> more text.  href="#en">linkTwo
> 
> How come it does that? Do links interfere with spans?

___
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: OMG text processing performance 6.7 - 9.5

2020-02-03 Thread hh via use-livecode
Parse1 is here always at least 30% faster than Parse2.

Yet another approach in LC 7/8/9 that I find to be very
fast (especially for a lot of hits in large strings,
e.g. when searching for "and" or "the"):

-- Offset per ItemDelimiter
-- Searches for pStr in pSrc using pCase
function Parse0 pStr, pSrc, pCase
  set the caseSensitive to pCase
  set the itemDelimiter to pStr
  put the length of pStr into tN0
  put 1 into tN
  repeat for each item tI in pSrc
add the length of tI to tN
put tN & cr after tOut
add tN0 to tN
  end repeat
  return line 1 to -2 of tOut
end Parse0

> Richard G. wrote:
> 
> -- Offset in place:
> function Parse1 pStr, pSrc
>put 0 into tStart
>repeat
>  put offset(pStr, pSrc, tStart) into tOS
>  if tOS = 0 then exit repeat
>  add tOS to tStart
>  put tStart  after tOut
>end repeat
>return tOut
> end Parse1
> 
> -- Delete as you go:
> function Parse2 pStr, pSrc
>put 0 into tStart
>repeat
>  put offset( pStr, pSrc) into tOS
>  if tOS = 0 then exit repeat
>  delete char 1 to tOS of pSrc
>  add tOS to tStart
>  put tStart  after tOut
>end repeat
>return tOut
> end Parse2

___
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: html5Player

2020-02-02 Thread hh via use-livecode
New in html5Player (v104 alpha)
https://hyperhh.de/html5/html5Player.html

html5Player adds a function keyCombo to your stack (as behavior)
that you may use in your local stacks.
It is updated on every keydown, keyup, mousedown and mouseup
in the browser window.
[See the stack "FontAndKeyTester" of btn "StackURL".]

keyCombo returns the downstates of 'modifiers', keyCode and key:
Alt, Shift, (Ctrl or Cmd), CapsLock, KeyCode, Key. For example

false,true,false,false,39,ArrowRight

The shiftkey, the cmdkey etc. currently always report "up" in
LC-HTML5. But you may now use in your local stack, running in
html5Player (e.g.):
"if item 2 of keyCombo()" instead of "if the shiftkey is down".

___
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: html5Player

2020-02-01 Thread hh via use-livecode
If I understand correctly:

What you want will be done soon, in a limited way, with the "html5IDE"
https://hyperhh.de/html5/html5IDE.html
(but without debugging!). The html5Player is not for that (**).

You have there a propertyInspector, scriptEditor (and Dictionary).
Everything is done in the browser. Then standard saving (when
implemented) will go to the downloads folder.
This could be reduced to the propertyInspector in your case.

Saving/uploading to the server will be server dependent. Perhaps it
would be best if Mark Talluto could come in with his work at that point.

Loading from the server is without problem and it is not necessary to
refresh the browser (loading the IDE is slow). One could simply load
again the own stack or a new/updated template.

The html5IDE will load much faster in the future, currently the same
engine is loaded six(!) times, that will go down to two times, could
go down to one time in your case.
Sadly this will be still too slow for mobile.

---
(**) You can't edit stacks in the html5Player which may be used this
way for (fast) development:

You have locally the LC-IDE open with an ordinary stack that should
become a HTML5 standalone.
1. You load the html5Player once.
2. You drop repeatedly the local stack (while it is saved but still
open in the IDE) to the html5Player for testing. Whenever the local
stack is closed in html5Player it will be deleted from browser RAM.

> BR wrote:
> I have a real use case...create a design environment that people can
> easily add thing to a rect (414w x 726 tall) that represent a stack.
> 
> EG of how it would be used.
>   1.  Say we  get 5 people on SKYPE and they all open the "design" …
>   they add a simple control (image, fld, graphic rect) and save it
>   2.  It would have to be save an SVG to the server OR its saves a
>   stack to the server
>   3.  everyone refresh their broswer. It get the svg from the server
>   OR it get the stack from the server. and displays it.
> 
> Could be done asynchronistically, user work alone. Someone loads with
> page, it fetches the stack.
> 
> I know it see link we are inventing the wheel once again, but all the
> players out there over complicated the "thing"
> 
> It would act like a "white board wiki for LC Design"

___
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: html5Player

2020-02-01 Thread hh via use-livecode
Added to html5Player (v103 alpha)
https://hyperhh.de/html5/html5Player.html

1.
Your added local (uncompiled) stacks can use as textfont

Aclonica, Andale Mono, DejaVu Sans, DejaVu Serif, Impact,
Inconsolata, Optima, Permanent Marker, Skia, Verdana

else textfont falls back to Droid Sans.

2. (Just for fun!)
Apply a color-filter to all *open* windows, one of

grayscale(v), invert(x), sepia(x), roentgen(x), blur(x)

where the amount v is taken from a slider value.
[New windows have no filter, you have to reapply.]



___
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: HTML5 deployment

2020-02-01 Thread hh via use-livecode
> Sean wrote:
> 
> 4. As with 3 also, emscripten itself has capabilities built in that will
> allow for this so I will more likely utilise these rather than use JQuery.
> The idea will be to handle as much as possible within the emscripten code
> and have minimal stuff within the HTML output other than anything the user
> wants to add in.

[JQuery is only used for easier identifying DOM objects.]

When doing "windowing" also look at the current implementation of
"globalRect".
This is not correct as it doesn't respect the scroll of the browser window
what creates "jumping" stack windows.

> 5. Thinking ahead, a way to add in JS functions an LC developer would want
> included in the HTML output (from within LC) would be useful. Perhaps a
> stack custom property that can hold the whole JS code that gets inserted at
> deployment so that it builds as self contained. And/Or a way to access,
> manipulate and/or set parameters of the HTML from within LC before
> deployment (not at runtime). This could then include things like custom
> layouts, loading bars, screen size handlers, php/Ajax/jquery comms, etc. 

Please leave out such things. These are extensions.
But we could build a separate library of JS-extensions (updated with
actual things from JS/CSS) that can be loaded if needed.
And every beginner can insert JS from any LC container (do fld "JS1" as
"javascript").

Thinking ahead?
I'll extend my list not before 1.-4. is done: What I dislike most with LC
is that too much projects are only halfway finished.


___
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: HTML5 deployment

2020-02-01 Thread hh via use-livecode
* There are some things relating 1 & 2 one could think about:

Start with mouseEvents (incl. wheel) and modifier keys.

Then one could use native fields so that the browser does the keyboard job
and executes all shortcuts for fields.
To get/set field values is easy. A native styled field is also possible
(see my demo at hyperhh.de/html5).

My technique is to use ordinary LC fields, hide these (and optionally use
them as container). Then adjust the native field rects to these hidden field
rects in the movestack/resizestack handlers.

* For 3 it would be enough to define ONE 'window'/canvas of id 'menu' for the
menus with a z-level of say 23121950 and similarly define ONE 'window'/canvas
for the tooltips of id 'tooltip' with a z-level of say 23121949.

That implies: do NOT create a new window for each menu/tooltip.
Probably function createWindow in em-dc.js needs a switch for that (I could
not find out where this method is called for menus/tooltips).

Then insert the two lines
canvas.classList.add('lcStack');
canvas.id('stack_'+tWindowID);
after current line 128 of em-dc.js, so one has several methods to get stack
objects.

* For 4 one could use the lib I use for htmlPlayer. This needs jQuery but it
is the only one I've found that works with LC-menus. I added a short script
to put stacks into a panel.

> Sean wrote:
> em-event.js is the one for 1 & 2 causing the problem mainly because of its
> use of now deprecated event handlers. That's what I am working on right
> now.
> 
> em-dc, em-nativeLayer and em-surface are what is likely to do with 3 & 4.
> Maybe also em-preamble-overlay.js.
> 
> em-clipboard obviously may have some relevance to the clipboard issue but
> I'm working on the assumption first it is more likely just a keyboard/input
> event issue.
> 
> > Hermann wrote:
> > 1. *Full* keyboard and mouse (incl. wheel) support. 
> >
> > 2. Support for usual field shortcuts (selectAll, copy, cut, paste, 
> > undo) and rawkey handlers. 
> >
> > 3. Improve the canvas generation: 
> >
> > Currently LC generates canvases for stacks, tooltips and 
> > menus that are without querying windowIDs for all stacks 
> > undistinguishable. Often menus and tooltips are hidden by stacks: 
> >
> > 3a. Menus need to have an own fixed (very high) z-level, 
> > 3b. Tooltips need to have an own fixed (very high) z-level, 
> > 3c. Stacks need an own class for easier access in DOM. 
> >
> > 4. Add a draggable, resizable windowing system (adding titlebar, 
> > decorations) with automatic layering (z-levels). 

___
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


HTML5 deployment

2020-01-31 Thread hh via use-livecode
> Sean C. wrote (in thread 'Brave'):
> ... can you put together a priority list of items that need to
> be fixed in HTML5 deployment as I am currently adjusting the code.
> I mean things that should just work without running external 
> JS workarounds like most of the key commands not working in a
> simple text field, etc.

[Adjusting which code? If this is some part of the standalone
builder I would like to see it.]

My list is long. To avoid that minor things are solved instead of
the major ones here the most important only (ordered by importance):

1. *Full* keyboard and mouse (incl. wheel) support.

2. Support for usual field shortcuts (selectAll, copy, cut, paste,
undo) and rawkey handlers. 

3. Improve the canvas generation:

Currently LC generates canvases for stacks, tooltips and
menus that are without querying windowIDs for all stacks
undistinguishable. Often menus and tooltips are hidden by stacks:

3a. Menus need to have an own fixed (very high) z-level,
3b. Tooltips need to have an own fixed (very high) z-level,
3c. Stacks need an own class for easier access in DOM.

4. Add a draggable, resizable windowing system (adding titlebar,
decorations) with automatic layering (z-levels).

Using js workarounds I got 1.+2. by using native fields and 3.+4.
by adjusting a panel-script of 350 lines (I tried 5 libs, only
one worked with the LC-menu-canvases, see htmlPlayer).


___
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: html5Player

2020-01-31 Thread hh via use-livecode
> Richard G. wrote:
> I'm seeing a growing number of JS->WASM converters out there ...

Where? Please cite some.

> ... seemingly  designed to replace a JS lib with a WASM version
> that is functionally  identical, just smaller and faster.
> I'm wondering if anyone has tried this with the generated JS
> version of the LC engine.

Have you ever looked into that generated js file?

It is extremely hard to adjust manually anything -- that's probably
why LC has until now not even support for the modifier keys in HTML5
though that's very simple to get directly from js.

So a "converter" that requires manual adjustments is useless.

___
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: html5Player

2020-01-30 Thread hh via use-livecode
> Richard G. wrote:
> do you know if would it be practical to run the generated 
> LC-engine-as-JS file through a JS->WASM converter?
> If not, what would be needed to make that happen?

AFAIK the current HTML5 standalone builder was made by Peter
Brett in contact with Mark Waddingham. It uses Emscripten (only)
to draw to a canvas.

So, I don't know but I guess that the HTML5 standalone builder
has to be (partially) rewritten to use Emscripten to compile LC
source code into WebAssembly modules that run sandboxed together
with regular JavaScript (having bindings especially to WebGL).
One could omit controls/features that are/will soon be well done
in HTML5, for example the audio/video/pdf/camera/img-webP parts. 

I guess this would run LC in a modern browser for some processes
(especially graphics and image processing) much faster than in
the current IDE.

Who only can really answer (and do) that?

Mark Waddingham and his team...

___
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: html5Player

2020-01-30 Thread hh via use-livecode
> Bob S. wrote: Unfortunately I only have the Community version
> and cannot test.

Works here with LC Community 9.5.1 (on MacOS 10.15.3):
Open the stack, select HTML5 (nothing else) in the standalone
settings and hit the Test button.

You need a HTML5 license *only* for publishing standalones,
just the same as you need an Indy license for publishing
desktop standalones.

[My html5Player is comparable to an Indy standalone that you
can download to your OS and open and run local stacks with it.
This will run stacks that would run in the IDE.]

___
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


Brave browser

2020-01-30 Thread hh via use-livecode
While testing intensively in the LC-HTML5 builder for
cross-browser functionality of extensions I used
Brave, Chrome, Firefox and Safari.

My personal ranking in short:

Safari is fastest with huge JS (the standalone engine),
Firefox is slowest but has more special features,
Chrome has most features (incl. caching technique).

But the winner is the open-source browser Brave:

Fast as Safari, features as Chrome and runs (close to
the same on all OS) on MacOS, Windows, Linux, Android
and iOS.
https://brave.com/download/ (scroll down for mobile)


___
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: html5Player

2020-01-30 Thread hh via use-livecode
> Bob S. wrote:
> I probably misunderstand the use of this. 
> I drug a simple stack into this but while it displays
> fine, it does not function...

Did you test it in the IDE? This is very simple in LC 9:

Open the stack, select HTML5 (nothing else) in the
standalone settings and hit the Test button.

If it runs there it will run in the LCPlayer because it is
the same engine.

If it doesn't run then possibly you use wait (not supported
in HTML5, use send in time instead).
Or try to disable your preopenstack handler.

In case you inject javascript handlers to the loading page
then these may interfere with the main engine. You have to
use a webview with the standalone from a (local) server
instead.

Known bug:
The only bug I have seen until now with one of my > 100
tested LC 6/7/8/9 stacks (that don't use unsupported controls
as players) is that a stack without titlebar doesn't 'slip'
into a panel.
One then has to do "close stack " or do "delete stack
" from the LCPlayer-messageBox.


___
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: html5Player

2020-01-30 Thread hh via use-livecode
> BR wrote: can you save anything from that view?

1. Generally yes.

But this needs ALWAYS, with all modern browsers,
manual user interaction: click a button or select
from a menu.
Similarly user interaction (click, drag and drop)
is needed to read in such objects.

* STACKS
Panels with an LC icon at top left are stacks:

We can save them to the downloads folder (will be
implemented in the webIDE), except the Player/IDE
itself. Or we can save parts of it (images or
text/scripts/prefs) to the downloads folder.

* Image/Pdf/Text/Audio/Video
Panels with an LC icon at top left are javascript
extensions that use callbacks to the main engine:

Saving is browser/server dependent. You have the
browser interface available for actions with manual
user interaction:

For example
rightClick a PDF to save it to your local filesystem
or print it via your OS printing (if the pdf is set
to allow this) or
download a video/audio (if the audio/video is set to
allow this).

2. For the LCPlayer ...

... saving stacks makes sense only for stacks that
are downloaded from server and then changed in the
LCPlayer, like stack "ImageView" that stores local
images for display in a "gallery".
But this stack is part of the LCPlayer and will not
run correctly without the main stack.

Of course you can let the user download stacks that
are "modules" (e.g. in a zip) and then import such
modules into the LCPlayer (via the "click/drop local
stack"). This would work with LC 9-stacks even on
every OS that runs the LCPlayer, even on a Raspi 3/4.



___
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


html5Player

2020-01-29 Thread hh via use-livecode
HTML5: html5Player (v102 as of Jan 30, 2020)

This is a HTML5 standalone (webApp in the new LC wording).
https://hyperhh.de/html5/html5Player.html

This is a "standalone-Plus" that is, it is extended by several
javascript extensions for features that are not (yet) implemented
in LC-HTML5 or not possible with LC.

It can do among other the following.

* Load (ordinary) local LC stacks by click or drag and drop.
The stacks will run if they would compile and run with the HTML5
standalone builder (but you don't have to compile).
The stacks MUST have one of the file endings .rev, .livecode or
.livecodescript.

* Load and display local or remote images (drag and drop images
or copy/paste image urls is supported).

* Load and display local audio/video (for cross-browser support
use mp3 and mp4 only). Drag and drop file icons is supported.

* Open a webview for videos, pdfs, audio streams and html pages.
In such a webview you can safely run also HTML5 standalones that
don't work in the html5Player because you inject javascript
handlers/objects to the loading page.
As the main page loads as https you can use https-Addresses only
in the webview (especially for audio/video-streams).

* Open one or several webcam views (works in newer Chrome, Safari,
Brave, not in Firefox).

All views are displayed in panels that are draggable and resizable
(incl. minimize and maximize).

HTML5: html5IDE
(Inspector+Dictionary+ScriptEditor+Tools)

The above html5Player will complete my experimental html5IDE that
is close to "ready"". I can also meanwhile save edited stacks. But
I don't publish newer versions than
https://hyperhh.de/html5/html5IDE.html
until LC does more in that field than renaming it to "WebApps".


___
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 author names

2020-01-14 Thread hh via use-livecode
See the "statistics" here:
http://forums.livecode.com/viewtopic.php?p=186723#p186723

___
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: shell() and pdftotext

2020-01-14 Thread hh via use-livecode
> Richard H. wrote:
> Typing to Terminal „pdftotext“ I get a List with command-options. 
> With get shell(„pdftotext“) with and without quotes
> I get the answer „/bin/sh: line 1: pdftotext: command not found“
> What is wrong? May you please help? (MacOS Catalina).

You could add on startup /usr/local/bin
to the LC environment variable $PATH:

on startUp
  local ulb="/usr/local/bin"
  set itemdel to ":"
  if ulb is not among the items of $PATH
  then put ":" after $PATH
end startUp
___
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: Polygon Side Does Note Match to Polygon rect

2019-12-28 Thread hh via use-livecode
> BR wrote:
> But this is a one off design process, so I will still with my "ruler" grc 
> rect….

Obviously you want an evenly sided triangle with fixed width W? So use

put 243 into W -- for example
set points of grc 1 to "0,0,10,-10,20,0,0,0" -- these are start-values only
set width  of grc 1 to W
set height of grc 1 to W*sin(pi/3) -- note: 243*sin(pi/3)=210
set loc of grc 1 to 150,150 -- adjust to your needs

What's easier than that?


___
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 won't recognize my stack

2019-12-27 Thread hh via use-livecode
This works here:

go stack url("binfile:/Users/admin/xstacks/selectiveGray6789.IW")

___
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: Polygon Side Does Note Match to Polygon rect

2019-12-27 Thread hh via use-livecode
A triangle with width=height is NOT a regular polygon (it doesn't have equal 
side length).

To have what you want create a grc of type "polygon" and then

set points of grc 1 to "0,0,10,-10,20,0,0,0"
set width of grc 1 to 243
set height of grc 1 to 243

To have equal sideLength you set the width to 243/sin(pi/3).


___
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: Animated Gifs - Keep them Running

2019-12-12 Thread hh via use-livecode
@BR

Don't run the gif as animation but do your own animation
by setting the (or some) frames using "send in time".
By that you can control better the "animation".

Using a widget for that is significantly slower (takes more
CPU) than LCS with such animations.


___
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


HTML5: Native PlainText Fields

2019-12-12 Thread hh via use-livecode
We already have HTML5: Native RichText Field
https://hyperhh.de/html5/HTML5Field_v106-9.5.0X.html

This is now a bit simpler (and simpler to implement):
HTML5: Native PlainText Fields (basic example)

The stack, downloadable from
http://forums.livecode.com/viewtopic.php?p=186081#p186081

has a script of 90 lines. This includes (beside comments)

• all you need for creating a native input field (one line)
  and a textarea.
  Both display plain text only but with all usual keyboard
  features (UTF-8 and cmd-A/C/V/X/Z) and drag
• all you need for the UTF-8 text exchange between LC and
  these native fields.

All you have to do (in LC 9) is to unzip the stack and hit
button "TEST" from the LC toolbar.
___
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: OT: HTML img src and Windows problem

2019-12-11 Thread hh via use-livecode
This is all OK assuming your html file is in
/Users/paul/Desktop/help/.

It works here with all modern browsers.

The error is caused somewhere else in your webpage.

Contains the char-attribute a gremlin or did you set
a conflicting base url?

You could use the WebInspector of the browser to see
what's going on.

___
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: How to revoke that bottom pane of the script editor?

2019-12-07 Thread hh via use-livecode
1. Without killing prefs:

a) open the SE
b) from msg
send "sePrefSet " &"paneHeight"&", 500" \
   to stack "revnewscripteditor"

c) close the SE
d) reopen the SE

2. Kill/Reset prefs.
The height of the bottom pane is stored there.

___
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: Script Editor disassociates - a lossy LC IDE bug

2019-12-06 Thread hh via use-livecode
I reported a bug (#18688, Oct 26 - 2016) that is still there in 9.5.0
on Mac 10.15.1. It partially overlaps with your description:

[1] Saving a stack while the script editor is open with an unsaved
script doesn't save the script.
[2] Quitting LC without closing (saved) stack window or SE doesn't
save unsaved scripts.


> Curry K. wrote:
> Wondering if this bug has already been reported?
> 
> I've seen a wonderful LC 9 IDE bug: sometimes the Script Editor window 
> seems to disassociate from the object being edited. Thus after this bug 
> is triggered, any typed script changes may not really be applied and 
> saved, although they are shown as applied. Next LC session, those 
> changes are gone; the stack code is still as it was prior to the bug 
> being triggered and prior to editing the script.
> 
> An alternate form is that the script changes actually are applied, but 
> in a bad way: first the script disassociates completely and is empty, 
> then the empty script is saved, overwriting the previous script. Nice! 
> (I think this is my favorite variation; if we're going to cause loss of 
> work/code, might as well do it boldly and not beat around the bush.)
> 
> I suspect this happens more on Mac than Windows, but since I don't have 
> a recipe, not sure. I've seen this happen to other people rather than on 
> my own machine. On LC 905 for sure, and probably on 950 also.
> 
> If Script Editor disassociation does happen, I advise immediate but 
> careful no-save quit or force quit, and pray that you're already in the 
> habit of backing up beforehand. Copy and paste the current script text 
> to an external text editor if necessary. Of course this particular bug 
> just might be able to defeat the safety of stack backups too in some 
> situations, but hey, that's why it's an extra-fabulous bug!
> 
> So, in addition to being a bit crashy and glitchy, the 9 IDE is a bit 
> work-lossy. That could turn off both new and old users if they are the 
> humor-deficient type to frown on losing some work. But shucks, ain't no 
> thang! Only features features features (and new side projects) matter! 
> Glad we all agree on that.
> 
> Any reports or recipes on this issue? I'll post a report if there is 
> none. 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: remove DEFAULTMENUBAR?

2019-11-28 Thread hh via use-livecode
As I understand this:

the menubar of this stack is a container (containing a group reference),
the defaultmenubar is itself a (may be referenced) group.


> Klaus M. wrote:
> hm, I was hoping for a ONE-Liner, that can easily be executed via script.

You could use semicolons ;-)

___
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: remove DEFAULTMENUBAR?

2019-11-28 Thread hh via use-livecode
The defaultmenubar is a GROUP.
Empty is not a group. So you could try:

create a new group
set the defaultmenubar to that empty group
delete that empty group

___
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: html5-IDE v100_alpha

2019-11-27 Thread hh via use-livecode
> Tom G. wrote:
> Is it to have an easier time testing html 5 features?. is it to turn it
> into a product?

The SE and the messaging between the standalones is already basically done
in earlier parts of my html5 samples.

To improve the scriptEditor (which is 80% codeMirror) and build the message
exchanging I needed a "Tools"/IDE main stack. I made these tools in big
parts using the html5SE.

To improve the html5Tools I needed a property inspector. I made that PI in
big parts using the html5SE and the html5Tools.

To improve the PI I needed a dictionary. From Bernd I got an already working
html5 version of his tinyDict (by bn and contributors). I only had to adjust
it to my needs: LCS dict only, messaging to the other parts. Thanks Bernd.

So, as usual with scripting IDEs, one does develop the IDE using itself
(Kevin and the other LC-Heroes will smile here).

The current "IDE"/playground is at this state more a "proof of concept".
Probably a better error handling will be possible. And debugging will be
possible if someone is able and willing to write a "LC-Lint" (in javascript,
so it is fast enough for client-side use).

As it is possible to copy/paste from the native fields (mainly all script
editors and the property field) to the script editor of the LC-IDE, one
can develop very fast in HTML5 and easily adjust the html5IDE to one's own
needs (compile at the very end only, one doesn't have to compile to check
for small script changes).

HTML5 developing by LC (essentially) "paused" at a state that was *very*
promising and kind of "avant-garde".

This playground shall also show what is lost when the HTML5 standalone
builder isn't continued.

I'll add some other features to the html5Tools until the end of this year.
But I can't afford to put more "main-time" in it, this is not doable in a
few spare evening hours.

So it will not become a "product", except someone is willing to pay for it.


___
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


html5-IDE v100_alpha

2019-11-26 Thread hh via use-livecode
A few more words in defense of the HTML5 standalone builder:

Enjoy html5IDE v100_alpha. A LC-playground with 'integrated'
propertyInspector, dictionary, scriptEditor and tools.

http://hyperhh.de/html5/html5IDE.html

You can create objects, edit their properties and their script.
Moreover there is a Paint-section and a MessageBox.

You can save and load scripts, but not (yet) the created card.
The dictionary is a html5 version of Bernd Niggemann's tinyDict.
The script editor is based on Codemirror (MIT-licensed).

There is a compact help (btn "H" of the Tools).

There is still a lot to do...

This "IDE" is made out of 6 independent standalones (in frames)
that send messages to each other. Each of these standalones can
separately be reloaded.

** Please be patient **
Loading the standalone needs here, using Safari and a 100 MBit
connection up to 20 seconds (first time only), so up to 2 minutes
with a 16 MBit connection.

___
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: [ANN] Release 9.6.0 DP-1

2019-11-26 Thread hh via use-livecode
@Mark Waddingham.
Good to know you are still alive.

LC version numbering has it's own logic, agreed -- as long as
it's counting up. Integers are meek as a lamb, we have enough
of them.

Nevertheless Mark Wieder made a good point with looking at the
pull requests.

If I understand correctly then you both are right:
At the very end it is the content that matters.

Now we all look forward to know which pull requests are *NOT*
"incomplete or WIP" and which are  *NOT*  "stale / no longer
relevant / not going to get merged".


___
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: [ANN] Release 9.6.0 DP-1

2019-11-26 Thread hh via use-livecode
> We are pleased to announce the release of LiveCode 9.6.0 DP-1.

> Mark Wieder wrote:
> Really?
> A major point release while still in the queue there are
> 
> 186 pull requests for the engine (dating back to 2014)
> 42 pull requests for the IDE (dating back to 2016)

Good point, perhaps the major point principle has lost its
meaning already with 9.5.0 (compared to 9.0.5)?

___
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: How do I select graphics that are on top of each other with mousedown?

2019-11-25 Thread hh via use-livecode
Yet another option is to use the technique from "pointInShape":
http://forums.livecode.com/viewtopic.php?p=129274#p129274

___
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: macOS, is my app active?

2019-11-23 Thread hh via use-livecode
> Klaus M. wrote:
> Still -> execution error

It works here in the IDE on MacOS 10.14.6 and 10.15.1 using LC 9.5.0. or LC 
8.1.10. (I stopped using unstable LC versions a while ago).
Did you try from the IDE?

If it is from the standalone only you could also try to use osascript
via shell:

get shell("osascript " & )
or use "osascript -e " for direct input.

Works all here...


___
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: WebP-Tool v103

2019-11-23 Thread hh via use-livecode
> JJS wrote:
> Ok sorry, i forgot to mention. I'm also on win10-64bit.

Did you save the stack to a before using it? If not, it has no path for the
binaries, which will be installed in folder "WIN" of your stack's folder...

If so, I can't really help as it works here.

The stack is very basic LC Script. You could start with checking whether the
binaries are written out. The rest is simply using shell() with files written
to the temporary folder.

___
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: Help Wrapping HTMLTidy in LCB

2019-11-23 Thread hh via use-livecode
Is it really worth the work to do that from LCB?

A while ago I installed HTML tidy 5.6.0 from here
http://binaries.html-tidy.org (the Mac .dmg)

Then I copied the binary "tidy" from /usr/local/bin
compressed to my stack (=231 KByte).
Now I use it from there, running it in the temporary
folder via shell(). Works fine (on any 64bit Mac).


___
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: macOS, is my app active?

2019-11-23 Thread hh via use-livecode


MacOS 10.15.1

This is fld "IN" (your snippet):

tell application "System Events"
  set activeApp to name of first application process whose frontmost is true
  return activeApp
end tell

on mouseUp
  do fld "IN" as "applescript"
  put the result into fld "OUT"
end mouseUp

yields in fld "OUT":

"Livecode-Community" or
"LiveCode-Indy" or
"LiveCode-Business"

___
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: WebP-Tool v103

2019-11-23 Thread hh via use-livecode
@BR.
There is currently not yet support for mobile (precompiled binaries).
But Android 4.0+ supports the format natively in its browser. See

https://developers.google.com/speed/webp/faq#which_web_browsers_natively_support_webp

The way you could do it on desktop (and probably as soon as supported on 
mobile):

You have only webp resources of the images (as custom props) in the stack.
The binary (could also be installed into temporary folder) converts a webp image
of the stack as soon as it is called to png (for display), on the fly.
In my stack the needed time for that procedure is displayed above the image.
After display you can delete the png -- if converting was fast enough...

@JJS.
This is most probably the reason for that:
The stack contains only the binaries for 64bit machines.
I tested successfully on a 64bit Win10 machine.

See the instructions for using the stack on 32bit machines
(this works here, I tested on a 32bit Win7 machine):

http://forums.livecode.com/viewtopic.php?p=185384#p185384

Hope this was the reason and it's fine now.
___
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: browserDocumentLoadComplete working correctly?

2019-11-21 Thread hh via use-livecode
Klaus,

looked in the scenario you mention. (I didn't say to use
messages of the browser widget ...)

This is your scenario (correct me if not):

You have several pages on one or more foreign servers.
These pages have dynamically generated content you wish
to access and extract parts to custom properties.

We need a solution that you can adjust yourself without
knowing JavaScript.

As you need a browser widget, several more use the same
widget code, so they are no additional burden in size.

You could try the following:

Use the javascriptHandler JS I told you with an additional
parameter (identifying the page) in the card script.
Load each page you need in a separate (invisible) browser
widget, using a short wait for the LC callback with that
javaScriptHandler.

In the handler JS you can check ALL incoming pages for
having the content you wish to read, also with a "send in
time" loop (say 500 millisecs intervals) for a retry.

Then you can even build and update your display page with
a "waiting for " for the parts that are not yet ready.

A problem with that method could be that the server doesn't
allow too many multiple connections from the same IP. Then
one has to do the method in pieces with an allowed number
of connections.

For more detailed questions contact me via email. This may
be too special for the list, especially as you may be not
allowed to publish too much details.


___
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: browserDocumentLoadComplete working correctly?

2019-11-20 Thread hh via use-livecode
Yes, browserDocumentLoadComplete is working correctly and consistent
with HTML5, no bug here.

BrowserDocumentLoadComplete is fired as soon as the DOM is finished
incl. *reading* your script tags.
*After* that your javascript is *executed*. The server and browser/
browser widget don't check/care what you will execute in that page
after loading the instructions. How should they know that?

Nevertheless this is OK for short jobs, but if you are loading from
a slow server or are loading large images and/or apply a time
consuming javascript then you have to add some "waiting time",
usually up to one second is long enough.

There is only one "full" remedy I can see: An own JavaScript handler.

One way to know exactly when you are done is to use an "async"
function in onload so that you can "await" that certain jobs are done
and then send a callback via a javascriptHandler to LC.


___
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: encrypt a standalone html5

2019-11-19 Thread hh via use-livecode
> Richard G. wrote:
> That said, password protection only applies to the on-disk 
> representation of a stack. Once in memory, the algorithms of
> any program made with any tool can be dumped and disassembled.

Little Criminals, I like this song by Randy Newman.
https://www.youtube.com/watch?v=T_MDNdPwCRo ;-)

___
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: encrypt a standalone html5

2019-11-19 Thread hh via use-livecode
> Riko A. wrote:
> How do i protect my application with a password? I use livecode business.

In the File/Standalone Application Settings go to Tab "Stacks".
At bottom right you find a check and a field for the password.

___
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: Special Graphic Effects - Kill Performance On Rapid Redraws

2019-11-19 Thread hh via use-livecode
This lesson is very short and simple:

A bicycle (mobile) usually drives much slower and can
transport much less weight than a car (desktop machine).

___
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: encrypt a standalone html5

2019-11-19 Thread hh via use-livecode
> Riko A. wrote:
> Is it possible to encrypt a standalone html5 file.
> So it can't be downloaded and unzipped. So other
> people can see our logic script. for example: 
> http://hyperhh.de/html5/CopyPaste-8.0.2X.html
> http://hyperhh.de/html5/CopyPaste-8.0.2.zip

I did that intentionally and published this method
in the HTML5 forum to make source code available.

The Indy version of LiveCode has no download link.
Of course this is no encryption.

BUT you can *password protect* the scripts of your
standalone with the Indy version. As I did here:

http://hyperhh.de/html5/EasyCropA-9.0.0-dp-4hhX.html
http://hyperhh.de/html5/EasyCropA-9.0.0-dp-4.zip

If you wish to sell your standalone you need moreover
the HTML5 license.

___
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: How much do we have to pay to get a minimum of efficiency from HTML5

2019-11-19 Thread hh via use-livecode
A few words in defence of the LC HTML5 standalone builder.

1. > Pi wrote:
> To answer your subject heading, I did some calculating based on the
> current state of HTML5 deployment and my own experience in doing the
> fixes single-handed for it. I work it out in the region of £15k.

This is of course heavily depending on your skills in both Livecode
Script and JavaScript. You shouldn't blame LiveCode if you need a lot
of time for simple fixes/workarounds.

2. (As to Alain's bug report relating to the browser widget).
Nobody from LC ever claimed, a browser widget would work in a HTML5
standalone.

Also: everything (and more) what you can do with a browser widget
can you do in the browser, may be using an iFrame for the display.
Moreover, the available javascript in the browser is usually more
up-to-date than what's integrated in the browser widget.

A browser widget is good for exercising the parts that you do later
on in the webpage from your standalone using the browser.
The "translation" from browser widget to webpage is easy and fast
to learn.

3. There *was* progress in HTML5 until midth 2018:
= A greatly improved and very simple "Test" procedure.
= Implementing multiple stack windows (you can even do "go url").
= Doing networking as much as OS and browser allow.

[Sadly there *are* still basic things missing, especially full
keyboard support and much better font support.]
___
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: How much do we have to pay to get a minimum of efficiency from HTML5

2019-11-19 Thread hh via use-livecode
LiveCode cannot do anything for you with that.

The security dictator is
1. the OS
2. the browser you use for the standalone.

There are a lot of differences alone by variations of
these two.

Yes, read and write from files is doable, but with the
restrictions given by OS security and Browser security,
what means: User interaction and/or same origin policy.
For example you can read without any problems from the
standalone's server location.

With the help of a bit javascript you can read from any
local file using a dialog, but you can write to nowhere
but the user's downloads folder.

I have shown that already long ago with some of my HTML5
examples (available incl. source code).

TMHO there are so few license holders in HTML5 that
there is nearly no step forward in that field -- sadly
a downward spiral.

Sadly, because there are already a *lot* of features
implemented -- if you are able to handle that under the
user's OS and browser.

___
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: WebP-Tool v103

2019-11-18 Thread hh via use-livecode
> Jjs wrote; Nice, thank you. I noticed it. But they are not used very
> much yet. Also for jpeg are some extra formats. 

TMHO it doesn't really matter what's used in the web. The purpose of
webP is, if you have a lot of images/large images, that these load
much faster from a server or use less size in your stack/standalone.

WebP-Tool is simply a bridge to the future LC version that can read
in and write out webP images. Especially:

set the paintcompression to WEBP

will be then implemented. Hopefully rather sooner than later.

___
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: WebP-Tool v103

2019-11-18 Thread hh via use-livecode
Sorry, the download links had a wrong path. Here are correct ones.

[Download] Currently I cannot upload to "SampleStacks/livecodeshare".
So please use from the message box
(EU) go stack url ("http://hyperhh.de/xstacks/webP-Tool_v103.livecode;)
(US) go stack url ("http://hh.on-rev.com/xstacks/webP-Tool_v103.livecode;)
or download
(EU) http://hyperhh.de/xstacks/webP-Tool_v103.livecode.zip
(US) http://hh.on-rev.com/xstacks/webP-Tool_v103.livecode.zip

When using go stack url, as a first action please SAVE the stack, we need
the stack path for writing out helpers and creating folders for conversion.


___
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


WebP-Tool v103

2019-11-18 Thread hh via use-livecode
WebP is a new image format for the web, see
https://developers.google.com/speed/webp

The stack is a helper for using the BSD-licensed converter software, so
you can use webp images in your stacks.

The stack contains the binaries for 64bit Mac/Win/linux. You can copy them
to your own stack.
For 32bit machines see the instructions of the link below.

The WebP-Tool runs, using LC 8/9, on Mac/Win/linux.

For more info please read
http://forums.livecode.com/viewtopic.php?p=185384#p185384

[Download]
Currently I cannot upload to "SampleStacks/livecodeshare".
So please use from the message box
go stack url ("http://hyperhh.de/html/xstacks/webP-Tool_v103.livecode;)
or download http://hyperhh.de/html/xstacks/webP-Tool_v103.livecode.zip

When using go stack url, as a first action please SAVE the stack, we need
the stack path for writing out helpers and creating folders for conversion.


___
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: Y coordinate for a line of text

2019-11-14 Thread hh via use-livecode
> I’m needing to know the coordinate (Y is the tricky one) for a line of text...

the selectedLoc
if you need the rectangle use additionally measureText or measureUnicodeText
___
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: numberformat woes?

2019-11-07 Thread hh via use-livecode
Klaus, a better property name would be
Donaudampfschifffahrtsgesellschaftkapitänskajütenschlüsselloch ;-)


___
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: Managing maximized windows on MacOS

2019-11-04 Thread hh via use-livecode
Did you already see the new
https://support.apple.com/en-ie/guide/mac-help/mchlp2469/mac

Such "features" override LC settings (on MacOS 10.14/10.15).

___
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: Learning from scratch - any recommendations? [with OT additions]

2019-11-03 Thread hh via use-livecode
The problem of learning human languages is not very different
from the problem of learning programming languages.

TMHO, not knowing JavaScript is comparable to not knowing Spanish
(the dominant language in the USA).

We all are more or less idiots.

___
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: cr, lf, and reading in terminals/vim

2019-10-30 Thread hh via use-livecode
In case your python file becomes a bit more complicated, you
shouldn't use workarounds as using backspace to come to a
binary format, because you then need exact indents (could be
tabs).

Better use (without replacing anything in mrgCmds) Matthias'
answer to use binary write.

Or the usual variant of that
put mrgCmds into url("binfile:" & fldr & "/theCmds.py")

___
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: Need trig & LCB help

2019-10-30 Thread hh via use-livecode
Greg, I've been away from LCB for a while. When reading the last post
again I remembered an improvement that you could try to use:

The current version computes the pathes with every redraw (onPaint).
This is far too often. We could compute the pathes once (in onCreate)
and then update ONLY when needed (= when one of its params changes).
This will give your widget a lot of time for other things and makes
the OnPaint code shorter.

variable mBCircles as List
variable mBigRad as Number
variable mLilRad as Number
variable mInnerRad as Number
variable mBigX as Number
variable mBigY as Number
variable mBNum as Number

[1] in OnCreate write:
put the number of elements in mData into mBNum
put my width/2 into mBigX
put my height/2 into mBigY
put mBigRad-mLilRad into mInnerRad
updateCirclePaths([mBNum,mInnerRad,mLilRad,mBigX,mBigY])

[2] in OnPaint write:
repeat with tButtonNumber from 1 up to mBNum
   fill mBCircles[tButtonNumber] on this canvas
end repeat

[3] This does the job minimal often:
Whenever you change one of its params write also

updateCirclePaths([mBNum,mInnerRad,mLilRad,mBigX,mBigY])

[4] This handler computes already the small circle paths:

-- sets the list mBCircles of regularly placed circle paths,
-- turns clockwise from high noon, is centered at point [cX,cY]
-- pL = [numOfCircles,bigRadius,smallRadius,cX,cY]
handler updateCirclePaths (in pL as List) returns nothing
   variable tI as Number
   variable tPi as Number
   variable tPaths as List
   put 2*pi/pL[1] into tPi
   put [] into tPts
   repeat with tI from 0 up to pL[1]-1
  push circle path centered at point \
[pL[4]+pL[2]*sin(tI*tPi), pL[5]-pL[2]*cos(tI*tPi)] \
  with radius pL[3] onto tPaths
  end repeat
  put tPaths into mBCircles
end handler

Hope you'll show us your shining new widget ...

___
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: scroll browser widget via script?

2019-10-29 Thread hh via use-livecode
> Klaus M. wrote:
> can we (v)scroll a browser widget via script?

Of course by setting anchors and jumping via URL to there.
But you don't mean that, so:

No.
But we have a forum. From post "Scroll my widget (='.'=)"
http://forums.livecode.com/viewtopic.php?p=156701#p156701

-- scrolls "to"  horizontally 0 and vertically 400 pixels
do "window.scrollTo(0,400);" in  widget "browser"
-- scrolls "by" (additive) horizontally 10 and vertically 40 pixels
do "window.scrollBy(10,40);" in widget "browser"

And your next questions:

Widget usage example #5: Getting MouseEvents
http://forums.livecode.com/viewtopic.php?p=154496#p154496

Widget usage example #5b: Getting MouseEvents (part2).
http://forums.livecode.com/viewtopic.php?p=174936#p174936

___
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: encoding woes!?

2019-10-29 Thread hh via use-livecode
Hi Klaus,

this is dangerous because the code could have "mixed" encodings
if you (or your partner) edits the code in texteditors with
different encoding settings.

I looked again carefully into your first post.
You use the htmltext of the widget, so your original code is correct.
It works here as you would like.

So delete the file test.html and write it new by LC using 
put textencode(the htmltext of widget "browser","UTF8") \
  into url("file:" & specialfolderpath("desktop") & "/test.html")
  
Possibly there was some problem when you self-created the file.
I set the default encoding in BBEdit to UTF-8.

Also LiveCode uses a BOM. If there is no UTF-8 BOM it uses
Mac OS Roman. That is what you see when you type into msg
put textEncode(the htmltext of widget "Browser", "UTF-8").

If you use later on text from the DOM structure of your HTML,
have to decode before using in LC/writing to a file.
handlers.

I use this always together with base64Encoding (because javascript
handlers need ONE line of code in quotes).

___
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: The Roadmap

2019-10-29 Thread hh via use-livecode
I also think all of them are still valuable targets.

Of course one could say "I know features/repairs that
should be made before that" and advertise for them.

___
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: encoding woes!?

2019-10-29 Thread hh via use-livecode
Just saw it now, overlooked that first:

You script
put textencode(tTExt,"UTF8") into url ("file": ...)

This should read
put textDecode(tTExt,"UTF8") into url ("file": ...)

=

But why using files?
If you don't want to type directly in the browser widget
you can make it "mirroring" a text field.

Example for a primitve HTML editor:

1. Write into fld "HTML"

[[ht]]
(You can now hide fld "HTML").

2. Then make a field "Tippse" and script it:

on textchanged
  put the htmltext of me into ht
  replace "" with "" in ht
  replace "" with empty in ht
  set htmltext of widget "browser" to merge(fld "HTML")
end textchanged

on enterInField
  textchanged
end enterInField

Then you can do what your textfield allows
set textfont (bears some problems), textsize, styles etc.
and the widget will display it (well, approximately...)

[Another variant is to write directly into the DOM structure
of the current HTMLtext.]

___
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: encoding woes!?

2019-10-29 Thread hh via use-livecode
Did you check the encoding of test.html
with BBEdit (should be Unicode (UTF-8))?



___
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: Need trig & LCB help

2019-10-29 Thread hh via use-livecode
Replace the last part of your handler with the following.

variable tBNum as Number
variable tBCenters as List

put tBigRad - tLilRad into tInnerRad
put the number of elements in mData into tBNum
put regularPoints([tBNum,tInnerRad,tBigX,tBigY]) into tBCenters
repeat with tButtonNumber from 1 up to tBNum
   fill circle path centered at tBCenters[tButtonNumber] \
with radius tLilRad on this canvas
end repeat

-- returns list of N regular (=evenly spaced) circle points 
-- starting at high noon, turning clockwise
-- pL = [numOfPoints,radius,centerX,centerY]
handler regularPoints (in pL as List) returns List
  variable tI as Number
  variable tPi as Number
  variable tPts as List
  put 2*pi/pL[1] into tPi
  put [] into tPts
  repeat with tI from 0 up to pL[1]-1
push point \
[pL[3]+pL[2]*sin(tI*tPi), pL[4]-pL[2]*cos(tI*tPi)] onto tPts
  end repeat
  return tPts
end polyPoints

[Untested, right out of my head, should work.]

___
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: callbacks in Mac video player?

2019-10-29 Thread hh via use-livecode
> Richard G. wrote:
> I stand corrected: callbacks apparently work in v9.5 under Catalina as well.

True, works here also, sorry all for the wrong info.
[Looked at my earlier tests. The problem there was the msgbox (kept hidden).]

> What do you need from LCB that's missing?

an up-to-date browser widget/libbrowser,
'set my rectangle',
basic keyboard support,
base64Encode/Decode (this is nearly done),
call JS from LCB without using a browser widget.


___
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: drag'n'drop in text fields

2019-10-29 Thread hh via use-livecode
>> I wrote:  Why do you fear "dragxxx"? ;-) 
> You wrote: I really don't!

I really know. Was a 'language' joke, sorry.

___
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: drag'n'drop in text fields

2019-10-29 Thread hh via use-livecode
> Klaus M. wrote:
> Yep, I meant without any "dragxxx" script. 

Why do you fear "dragxxx"?  ;-)

___
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


OCR-Lite_v100

2019-10-28 Thread hh via use-livecode
The stack OCR-Lite is a GUI to the JS library by Kevin Kwok
https://github.com/antimatter15/ocrad.js
which is in turn an emscripten port to GNU Ocrad by Antonio Diaz Diaz
https://www.gnu.org/software/ocrad/ocrad.html
The library is included in the stack, so you can use it offline.
The License is GNU GENERAL PUBLIC v3.0
https://www.gnu.org/licenses/gpl-3.0.en.html

Of course, tesseract has better results but it needs around 10 MByte
of trainingData for each language.
Ocrad.js has < 1 MByte size and yields, TMHO, in average good results.

The stack runs (offline) using LC 8.1.10/9.0.5/9.5 on MacOS > 10.12
and using LC 9.0.5, on win 7/10 and linux (ubuntu1604). Be patient on
windows, it's a bit slower than on Mac.

You only have to import your images and hit the "OCR" button.

Download OCR-Lite it from "SampleStacks" of the LC toolbar or from
http://livecodeshare.runrev.com/stack/953/


___
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: identifying text chars in an image

2019-10-28 Thread hh via use-livecode
> Phil D. wrote:
> So maybe I should first be asking about detecting the grid
> established by the scrabble letters. 

You need some criteria to find the topleft of the grid and the
size of one letter: color/transparency/a marker(fixed image part)...
You could also use pattern recognition for that.

Then it's the easy part to get all possible letters by computing the
grid and crop (get from imageData) the grid elements by script.
Then doing the OCR for each single char.

If you need that for a standalone, then 'tesseract' with its huge
language packs is probably not appropriate and 'ocrad' could be
good enough for that.

___
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: callbacks in Mac video player?

2019-10-28 Thread hh via use-livecode
> Richard G. wrote:
> Thanks. Unfortunately the reason I'm looking into this is to replace an 
> old component dependent on 32-bit macOS, now that many are "upgrading" 
> to Catalina.

Richard, 9.0.5 WORKS, also its standalones (check 64 bit), on Catalina...
Even 8.1.10 can build (experimental) 64bit standalones.

> I searched the bug DB, but couldn't find the report for this.  Do you 
> know offhand what it's titled?

I gave up to report all the regressions I suffer from with 9.5 on Catalina ...
I'm not a beta tester. At least as long as not even my tiniest wishes for HTML5
and LCB (incl. Browser widget) are fulfilled.

> If we can't find a way to do video callbacks in LC our plan is to rewrite the
> app in HTML for the web.

It would be easy to do that in a HTML5 standalone, even if you need webRTC/
getUserMedia. But the rest of your shining layout is probably rather unfinished
in the HTML5 standalone builder.
___
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: drag'n'drop in text fields

2019-10-28 Thread hh via use-livecode
Hi Klaus.

>> I wrote:
>> on dragDrop
>>   if "files" is among the keys of the dragData then
>> put line 1 of the dragData["files"] -- or whatever
>>   end if
>> end dragDrop
>>
>> on dragEnter
>>   set the dragAction to "copy"
>> end dragenter

> You wrote:
> .. also tried that, but then the pathname does not appear in the field.
> I want to:
> Drag'n'Drop a file into the field -> works without scripting
> The pathname appears in the field and is definitively selected!

Three remarks.

1. the filename ends up in the message box if you dont use the "whatever" ;-)
2. textchanged is also a script ;-)
3. Your method doesn't work for locked fields, the following does:

on dragDrop
  if "files" is among the keys of the dragData then
put line 1 of the dragData["files"] into fn
focus on me; put the selectedChunk into sc
put fn into the selection
if sc is not empty then select char (word 2 of sc) to \
  (word 2 of sc +len(fn)-1) of me
  end if
end dragDrop

on dragEnter
  set the dragAction to "copy"
end dragenter


___
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: drag'n'drop in text fields

2019-10-28 Thread hh via use-livecode
on dragDrop
  if "files" is among the keys of the dragData then
put line 1 of the dragData["files"] -- or whatever
  end if
end dragDrop

on dragEnter
  set the dragAction to "copy"
end dragenter

___
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: callbacks in Mac video player?

2019-10-28 Thread hh via use-livecode
> Richard G. wrote:
> The Dictionary says callbacks still work on macOS, but it
> also says they're supported on Linux, where I don't recall
> callbacks ever being supported, and for several years video
> playback doesn't work at all.
> I can't make callbacks work on macOS Catalina using v9.5.
> Should they?

Yes. But they don't. Use 8.1.10 or 9.0.5.
TMHO 9.5.0 has effectively "beta" status.


___
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: identifying text chars in an image

2019-10-28 Thread hh via use-livecode
After a second read I think it will be hard to find a service to do that
for you. And this is not doable using tesseract or similar from LiveCode:

AFAIK, no "ordinary" OCR software is able to detect and read horizontal
*and* vertical text and distinguish clearly between the board's "Score
text" and the "Scrabble letters". You (or your service) would have to
write an own "learning routine" for that.

E.g. the algorithm described here:
http://rasdasd.com/projects/Scrabble_Detector/Scrabble_Paper.pdf

There are also approaches for own specialized boards like here
https://github.com/eladj/ScrabbleOCR
You could try to use the java from there via LC Builder's FFI.

> Phil D. wrote:
> I want to [programmatically] take a picture of a Scrabble board and then 
> take from that image the characters displayed in it, and maintain the 
> organization of the text. In other words, I want to convert the text 
> displayed in the image to text strings.
> 
> Any ideas where I should start?
> 
> I would love to be able to do it in my app. However I'm not completely 
> against uploading the image to a service that would do it for me; I am 
> only mostly against it.


___
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: identifying text chars in an image

2019-10-28 Thread hh via use-livecode
There are also emscripten ports to javascript you could use via
a browser widget (and a CDN if online).

https://tesseract.projectnaptha.com
https://antimatter15.com/ocrad.js/demo.html

___
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: identifying text chars in an image

2019-10-28 Thread hh via use-livecode
The sample stack "DePerspective/Undistort Images 1.0.1"
http://livecodeshare.runrev.com/stack/824/DePerspective-Undistort-Images-1-0-1

uses for a given image tesseract if installed on the system (mac/win/linux).
___
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: Livecodeshare/SampleStacks

2019-10-26 Thread hh via use-livecode
> Richard G. wrote:
> I'll try to remember to never try others' scripts using "import 
> snapshot", like I'm already in the habit of never thinking about having 
> a browser widget, or the ability to play a movie or audio file, or have 
> windows layer in an expected fashion...

The problem is that linux is for LiveCode a tiny niche.
And much more:
The linux users of the community are kind of "LiveCode masochists".

Some are so advanced with that, that they meanwhile feel *very* strong
pain only (your list above).

For example you didn't even notice that SampleStacks didn't work for
weeks when using Business or Indy and, despite notification in the list,
both livecodeshare and SampleStacks didn't load stacks of size > 2 MByte
for two days.

Also your "GoLiveNet" (I really liked it) is unusable since more than a
year from Mac using Indy or Business (I wrote you and gave up).

[It errors with message 'Error downloading URL "liveNet.livecode.gz".
Check network connection and proxy setup.'
One has to quit, open it in a community edition, quit community edition,
restart the Indy/Bussiness edition and relaunch GoLiveNet (that now can
use the cache). So probably a tsNet caused bug.
It is often too tedious to work around, I still feel the pain, although
I like LC on linux (on xubuntu especially).]

p.s. Mark Wieder wrote an 'ugly workaround' (his own words) for snapshot
on linux, I use it in "QRReader". It works well, whether ugly or not,
also where the browser widget works (LC 9.0.5 on ubuntu1604).

___
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: PDF-Tools

2019-10-26 Thread hh via use-livecode
PDF-Tools_v110
(Merge/Mix/Split, add header/footer/pageNum/svgIcon)

Using LC 9.0.5 it runs on Mac/Win/linux(ubuntu1604).

More exactly:

• Using LC 8.1.10/9.0.5/9.5.0 it runs on MacOS >=10.12.6.
• Using LC 8.1.10/9.0.5 it runs on Win7.
• Using LC 9.0.5 it runs on Win10 and linux(ubuntu1604).

[This is sadly due to deficiencies of the browser widget.]

Download from SampleStacks or
http://livecodeshare.runrev.com/stack/951/


___
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


Steganograph_v110

2019-10-26 Thread hh via use-livecode
The stack does (kind of) Steganography with an image, see
https://en.wikipedia.org/wiki/Steganography.

The stack runs (offline) using LC 8.1.10/9.0.5/9.5 on
MacOS > 10.12 and, using LC 8.1.10/9.0.5, on win 7/10
and linux (ubuntu1604).

The goal was here to have a method that uses in a
standard way only the alphadata of an image to hide 
embedded text. By that
• we can use ANY base64 encoded data for embedding.
we use as examples plainText, htmlText and an image.
Other examples are styledText, rtfText or a svgPath.
• we can clean the image from embedded code by simply
resetting the alphadata of that image.

That is, who knows that Steganograph embedded an object...

...can remove that object with a short script.
...can not read the embedded object as "clear" data, except
he knows what YOU do with the object before embedding.

We use compressing and base64Encoding of the embed-data.
The decoding and encoding is done by a JS library via
a browser widget.

Download Steganograph from "SampleStacks" or
http://livecodeshare.runrev.com/stack/952/



___
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: Livecodeshare/SampleStacks

2019-10-26 Thread hh via use-livecode
Livecodeshare/SampleStacks works again:

1. With ALL editions (Business/Indy/Community).
2. The recently appearing size limit has been removed.

Thank you very much whoever did this.

Especially SampleStacks from the LC toolbar is very
fast and robust. Just try!

___
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: Weird macOS error dialog

2019-10-25 Thread hh via use-livecode
> What fresh hell is this?  Is this something all of our
> users will be seeing?

Yes. But this is only the camp fire before the hell.

The new security hystery will surprise you every few
minutes when you really work on that OS.


___
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: PDF-Tools

2019-10-23 Thread hh via use-livecode
PDF-Tools_v109, updated to v110 (Mac only)

[Tested to run with LC 8.1.10/9.0.5/9.5.0
on MacOS 10.12.6/10.13.6/ 10.14.6/10.15.]

Download PDF-Tools v110 from SampleStacks or
http://livecodeshare.runrev.com/stack/951/

Added option to use a SVG Icon on the output pages.

You can set width (resizes proportional), borderwidth,
fillColor, borderColor, x-offset, y-offset and (initial)
position on page: topLeft, topCenter, topRight, botLeft,
botCenter and botRight.

In the stack are the built-in LC-icons (SVG widget) and
additional 969 material-design-cons available. Use your
own icon by setting the iconPath of a SVG widget.

___
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: Push Card

2019-10-22 Thread hh via use-livecode
> JB wrote:
> The list of pushed cards is cleared when you quit the application.
> Is there a way to clear the list without quitting the application?

You could try

on mouseUp
  put "home.livecodescript" into tA
  repeat
pop card into tB
if tB ends with tA then exit repeat
  end repeat
end mouseUp


___
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: Merge PDF

2019-10-21 Thread hh via use-livecode
> Richard H. wrote:
> Silly question now that I think of it . . . does t avoid
> the pixelization that the pdf widget performs?
> And for that matter, does it work with cropped sections,
> or just full pages?

The PDf-lib doesn't use image snapshots. It is true PDF:
Copied are pages and all it needs for each page from the
pdf's catalog. So usually there will be no increase in
size from the merged parts to the merged sum. And there
will be no change in quality.

The merged input pdfs can be of any size. So, as long as
your "cropped sections" are true PDF and not images then
there will be no problem.

Of course, merging can't improve embedded pictures.
And included pictures will pixelate at some point of
enlarging.

And of course built-in javascript as clickable links to
pages in the same document or URLs are lost.

___
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


PDF-Tools

2019-10-21 Thread hh via use-livecode
PDF-Tools_v109 (MERGE/MIX/SPLIT)

Due to deficiencies of the browser widget on win and linux we have the
first time that a JS-library runs in a browser widget on Mac only.
I tried to work around for win and linux without success, sorry.

Download PDF-Tools from SampleStacks or
http://livecodeshare.runrev.com/stack/951/

PDF-Tools is a helper (and GUI) to the new javascipt library PDF-lib.js
by Andrew Dillon (see https://github.com/Hopding/pdf-lib MIT-licensed).
The library is already part of the stack (so you can use it offline).

__ Input up to three remote or local URLs.
__ Input ranges or mixtures using the following syntax:
__   MERGE: (x to y step z | ±all | ±even | ±odd ) of pdfN [repeat m] 
__ Takes pages x=start, y=stop, z=step, repeat m from pdf pdfN.
__   SPLIT: (x to y step z | ±all | ±even | ±odd ) [repeat m] > n
__ Takes pages x=start, y=stop, z=step, repeat m from pdf pdfN.
__   MIX: m of pdfN
__ Takes m=num pages from pdf pdfN. Items are repeated cyclically.
__ Optionally do Autosave and/or
__   add MetaData, a header, footer and pageNums to the resulting PDFs.
__ Special Example: Print two-sided (on front and back)
__   using SPLIT with  -odd>1, even>1  as ranges.


___
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: Merge PDF

2019-10-21 Thread hh via use-livecode
It is dependant on using JS from LC, by that it is dependant
on a browser widget.

I had it ready yesterday for Mac and tried a full day to work
around the deficiencies of the browser widget on linux and win
but had no success, sorry.

The stack will be published as "PDF-Tools" (Merge/Mix/Split)
in a few minutes.

___
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: Merge PDF

2019-10-17 Thread hh via use-livecode
> Hugh Senior wrote:
> Has anyone got an LC-based method to merge pdf files? Just asking...

I'll publish this weekend on SampleStacks a pdfLib (split and merge)
based on a JS library (via a browser widget). Already 95% are done.

___
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: Is there a command to display number of seconds as hrs:min:seconds?

2019-10-17 Thread hh via use-livecode
Save a lot of lines by using "format":

on countdown t
  put format("%02d:%02d:%02d",t div 3600,(t mod 3600) div 60,t mod 60) into fld 
1
  subtract 1 from t
  if t < 0 then exit countDown
  send "countdown t" to me in (1000-the millisecs mod 1000) millisecs
end countdown

> > Terry J. wrote:
> > Not built-in but...
> > 
> > function formatRemainingTime pTime
> >   put trunc(pTime/3600) into tHours
> >   put pTime mod 3600 into tTimeX
> >   put trunc(tTimeX/60) into tMins
> >   put tTimeX mod 60 into tSecs
> >   if tHours < 10 then put "0" before tHours
> >   if tMins < 10 then put "0" before tMins
> >   if tSecs < 10 then put "0" before tSecs
> >   return tHours&":"&":"
> > end formatRemainingTime
> 
> Klaus M. wrote:
> save some lines by setting the numberformat first (lazy moi :-)
> 
> function formatRemainingTime pTime
>set the numberformat to "xx"
>put trunc(pTime/3600) into tHours
>put pTime mod 3600 into tTimeX
>put trunc(tTimeX/60) into tMins
>put tTimeX mod 60 into tSecs
>return tHours&":"&":"
> end formatRemainingTime



___
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: Is there a command to display number of seconds as hrs:min:seconds?

2019-10-16 Thread hh via use-livecode
> Bill V. wrote:
> I know how to do the math to figure it out but I’m wondering if there
> is a built in function to do this. Convert wants to deal with actual time
> so I would get something like “0:1:15 PM”. 

That needs the same energy as the simple math method but as you ask:

1. set the twelvehourtime to false
2. compute what you get when converting t=0 to long time (=diff)
3. subtract diff from your start time
4. repeat converting your seconds value to long time


___
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: Re: Catalina and stuff other than 32bit—USB broken

2019-10-16 Thread hh via use-livecode
@Dar.
Did you already try to use QUEMU?
https://www.qemu.org



___
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: Set font dynamically to fit text

2019-10-12 Thread hh via use-livecode
In the repeat loop set the attributes of the empty field and use measureText 
(or measureUnicodeText) to compute the textSize. As a last step fill the field.
___
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


  1   2   3   4   5   6   7   8   9   >