Re: Community edition

2024-07-27 Thread Tim Selander via use-livecode
It works on the older M1 macs, as long as you don't upgrade to OS14 -- 
I'm keeping my M1 Macbook air for as long as I can!


Tim Selander


On 2024/07/27 8:48, Neville Smythe via use-livecode wrote:




On 26 Jul 2024, at 8:01 pm, Heriberto wrote:

  I am currently using the "Community" version, but it does not
work on Apple Silicon devices.



That’s a disappointment, I was thinking it might be my refuge for  my Community 
work.

Do standalones created with the Community Edition not work on Apple Silicon?
  
Neville Smythe





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Livecode Future

2024-07-24 Thread Tim Selander via use-livecode

Yes, this is quite important to me as well.

Thanks,
Tim Selander


On 2024/07/24 19:14, Tweedly via use-livecode wrote:

Can you say anything about the future of LiveCode Server  ?

Thanks,
Alex

Sent from my iPad


On 24 Jul 2024, at 10:03, Kevin Miller via use-livecode 
 wrote:

I'm sorry to hear this. You'll still gain access to anything that remains to 
be delivered from crowd funding.

I do want to dig into the economics of this a little more though. At a quantity 
of 180 users, PowerApps costs roughly 33% more per seat than we do! LiveCode, 
even *without* the (up to 10x) development speed increase Create is bringing, 
is so much more productive than PowerApps (you told us this yourself for your 
own use case). So its 33% cheaper, and massively faster... Sounds reasonable to 
me?

Kind regards,

Kevin

Kevin Miller ~ ke...@livecode.com ~ http://www.livecode.com/
LiveCode: Build Amazing Things




On 24/07/2024, 09:17, "use-livecode on behalf of Col Kelly via use-livecode" 
mailto:use-livecode-boun...@lists.runrev.com> on behalf of 
use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>> wrote:


Totally agree and find myself in the same position with 180+/- internal 
workers, we only use LC for rapid prototyping although we do have some 
utilities that were built with LC.
I guess I’m going to be forced down the PowerApps route.


Slightly annoyed that i’ve subscribed and been part of all the crowdfunded 
projects that never materialised or are still in dev.


Col.


Sent from my iPhone.



On 24 Jul 2024, at 01:01, Heriberto Torrado via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Hi Tom,

It appears that under this licensing model, developers creating applications for internal 
company use—such as for a workforce of 100 employees—would still need to pay $15,520 even 
with the 30% discount applied. I hope I've misunderstood, but upon receiving the email 
about Livecode Create, I considered purchasing a license to permanently move away from 
the outdated "Community" version (we have a lot of silicon Macs). However, if I 
have to explain to my boss that each internal user of the Livecode-built app would cost 
$155.2, she would likely suggest investing that money in a Flutter course, Lazarus IDE or 
to develop a web site.

Hery


On 7/23/24 18:32, Tom Glod via use-livecode wrote:

Hello All,

I'll start.
After reviewing Livecode's new direction and offer.
I feel very positive about this change.
Maybe in the future I will feel differently, but currently, as a solo dev,
even 2 or 3 devs, as I expand, it all is kind of in the range of reasonable.
The <= 5% tax hurts a bit, but its manageable.
If this is a model that creates better sustainability and faster dev
cycles for Livecode, and if thats really true ...
Then I want to be in full support of this model.

I was somewhat surprised (sorry honest) at how well the new direction was
explained. Great job on that.
I like the no-pressure offer. 2027 is a lot of heads up for people to
align their business model or to get off the platform.
I like the flexibility of the offer for different kinds of devs

Of course my review is based on my own situation and my own plans for the
future of my company MakeShyft.
I also work @ Canela, which is a hat I am not wearing at this moment.
Everyone's situation is different, and I can see some users not loving this
at all.

All the best, may we all prosper and have our dreams come true.

Tom
___
use-livecode mailing list
use-livecode@lists.runrev.com <mailto: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 
<http://lists.runrev.com/mailman/listinfo/use-livecode>



___
use-livecode mailing list
use-livecode@lists.runrev.com <mailto: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 
<http://lists.runrev.com/mailman/listinfo/use-livecode>



___
use-livecode mailing list
use-livecode@lists.runrev.com <mailto: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 
<http://lists.runrev.com/mailman/listinfo/use-livecode>





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscri

Re: Tutorial for Livecode Server log in system

2024-03-27 Thread Tim Selander via use-livecode

Dear Alex and Pere

Thank you both for your code and and the time you took to help! 
I'm am working through the code you sent, studying out how it 
works. Great learning experience.


Also, Alex, your point of not using password log ins is a 
philosophical re-frame in my thinking! Thank you!


Tim



On 2024/03/27 2:36, Alex Tweedly via use-livecode wrote:

Hi Tim,

I guess my first response would be - don't.

Specifically, don't store or use passwords. Users have a bad 
habit of re-using the same passwords, so even if your site has no 
personal or valuable info about your users, the fact that 
passwords get re-used means you are storing valuable info, and so 
you're taking on a moral responsibility to keep it very safe.


If you do have passwords, then you need to have a recovery 
mechanism for when users forget their pssword. 99% of the time, 
that involves emailing them a recovery link, or temp password, or 
... So in effect the password has the same (or less) security 
than their email account - so you might as well just use the 
email account.


Nowadays I always use this style of password-free accounts. I 
would have sent a copy of the known, tested, etc. code - but it's 
all embedded in lots of my libraries, etc. and was tricky to 
unravel. So I've sent a very bare-bones version; tested but not 
all corner cases (e.g. I didn't wait a week to ensure time-outs 
happened properly :-).


Overview: The user asks for a code to login with, that gets 
emailed to them, and then they type that code in to the next 
screen. Once that's successfully done, you set up a cookie in 
their browser, valid for some reasonable length of time such as 7 
days, and you're done. Any script that wants to can take the 
getCurrentUser() code to check that they are logged in properly.


Internally, it's done by creating a temporary code (6 digits, 
which is recorded along with their email and expires within 15 
minutes), and once they have verified that code, you give them a 
new code which is a UUID (so essentially un-guessable) which 
lasts for the 7 days.


Other than that, I hope it's reasonably straightforward .


Alex.

simplelogin.lc


 tExpires then
   return empty
    else
   return item 2 of line -1 of tCodes
    end if
end getCurrentUser

function shellEscape pText
-- keep this at the end because it messes up Coda colouring
    repeat for each char tChar in "\`!$" & quote
   replace tChar with "\" & tChar in pText
    end repeat
    return pText
end shellEscape

function wrapQ pText
    return quote & pText & quote
end wrapQ

on askforemail
  put ""
  put "    My email is "
  put "    "
  put "    Submit my 
email "

  put ""
end askforemail

on askforcode
  put ""
  put "    My code is "
  put "    "
  put "    Submit my code 
"

  put ""
end askforcode

on askforlogout
  put ""
  put "    "
  put "    Log me out 
now"

  put ""
end askforlogout

-- real code start here

put getCurrentUser() into tUser

if $_POST["logout"] AND tUser is not empty then
    put $_COOKIE["myusercookie"] into tCode
    put tCode & comma & tUser & comma & (the seconds-1)  after \
    URL ("file:codes.txt")
   put "Successfully logged out."
   exit to top
end if

if tUser is not empty then -- ask them if they want to log out
   put "Already logged in as " & tUser
   askforlogout
   exit to top
end if

put $_POST["code"] into tCode
if tCode is not empty then
   -- we need to compare this code with what is pending
   put URL ("file:codes.txt") into tPending
   put ( tCode & comma & "*") into tFilter
   filter tPending with tFilter
   put line -1 of tPending into tPending
   if the seconds <= item 3 of tPending then  -- found a match 
pending

  put item 2 of tPending into tEmail
  put uuid("random") into tCode
  put tCode & comma & tEmail & comma & (the 
seconds+60*60*24*7)  after \

    URL ("file:codes.txt")
  put cookie "myusercookie" with tCode until (the seconds + 
60 * 60 * 24 * 7)

  put "Successfully logged in"
  exit to top
   end if
   -- no match for the code
   put "Code not matched. Please try again or give different 
email address."

   askforcode
else
   put $_POST["email"] into tEmail
end if

if tEmail is not empty then
   -- have email address - generate a code and ask user for it
   put random(99) into tSix
   put format("%06d", tSix) into tSix

   -- put this following line in for quick and easy testing !!
   -- be sure to take it out later !!!
   put "should email" && tSix && "to you."

   -- build the message header, adding the from, to and subject 
details
   -- we also put any cc addresses in here, but not bcc (bcc 
addresses hidden)


   put "i...@kilmelford.com" into pFrom   -- CHANGE KILMELFORD.COM
   put tEmail into pTo
   put "From:" && pFrom  & return & \
    "To:" && tEmail & return & \
    "Subject: Login code for kilmelford.com" & \
     return into tMsg

    put "Content-Type: text/plain;" & return & return after tMsg
    put "Your 

Tutorial for Livecode Server log in system

2024-03-25 Thread Tim Selander via use-livecode

Hi all.

As a hobbiest/amateur I continue to plunk away with Livecode, mostly the 
server product in my on-rev account.


Can anyone point me to a tutorial or sample of an online log in system 
(username, email and password) for a website using Livecode?


I've found some php tutorials, and /think/ I could glean enough hints to 
roll my own in LC server, but would greatly prefer to start with LC itself!


Any help appreciated!

Tim Selander
Japan

___
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


Uploading progress bar

2023-08-07 Thread Tim Selander via use-livecode
We are airing a kid's anime program on TV this fall, and are encouraging 
parents to video their kids singing the theme song -- which we'll air at 
the end of the program.


Using LC Server, I made a simple page for the parents to use to upload 
the videos. It's working fine, but I would like to add a progress bar to 
give some kind of user feedback as the upload can take 2 or 3 minutes.


I've found several php scripts that do this, which look great but I have 
no idea how it works, but can anyone tell me how I could do this in LC?


Any and all tips appreciated!

Tim Selander
Tokyo, Japan

___
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: google translator access via livecode

2023-06-05 Thread Tim Selander via use-livecode
I use google translate API with an LC Server web application. It 
would probably work exactly the same with LC desktop.


The call looks like this:
put "https://www.googleapis.com/language/translate/v2?key=(your 
google API account key)=cat=en=ja" into tURL

put URL tURL into vholder

The word to translate is 'cat' and vholder is below.

"data": { "translations": [ { "translatedText": "猫" } ] } }

JSON, I think. I just use LC and change itemdelimiter to zero in 
on the translated text.


There is a monthly free limit on amount of text, then you pay. My 
app is VERY low traffic and I have never gone over the free 
amount of text to translate.


Hope this helps!

Tim Selander
Tokyo, Japan




On 2023.06.05 3:35, Andrew Meit via use-livecode wrote:

I am seeking a widget or live script code to translate a single word or at most 
256 chrs text from within a stack.
I think there is or was Google api livecode could use to talk with the Google 
translator server via scripting.
My ideal use: while moving the cursor over and clicking text the mousetext can 
be sent to Google and return the translation.
Anyone have a sample stack to share?
Thanks, Andrew
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Server and forcing page refreshes

2023-06-04 Thread Tim Selander via use-livecode

Hi,

Yes, Matthias suggested similar, and it works too. But it slowed 
down the pages a bit, and I'm on the old, slow on-rev server!


Tim

On 2023.06.02 21:57, Georges Malamoud via use-livecode wrote:
You can also add parameters into your .htaccess file on your 
server (if you have access)


RewriteEngine on

Header add Cache-Control "max-age=1, no-cache, no-store, 
must-revalidate"

Header add Pragma "no-cache"
Header add Expires "Thu, 1 Jan 1970 00:00:00 GMT"


Georges

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Server and forcing page refreshes

2023-06-02 Thread Tim Selander via use-livecode
Got busy the past couple of days, but just tried this, Ralf -- 
works perfectly! (Assuming because it changes the cached URL??)


Thank you!

Tim Selander
Tokyo, Japan

On 2023.05.30 17:09, Ralf Bitter via use-livecode wrote:

Hi Tim,

how about adding a query string in the form of a timestamp to the 
member’s URL like:


?foo=1685433742125


Ralf


On 30.05.2023 02:32, Tim Selander via use-livecode wrote:
Once again find myself over my head in just a simple 
programming project.


I made a little club members directory website, using LC server 
on on-rev's hosting site.


Members can edit their info. I use a form, with the action 
going to an LC script. This script gets all the post data, 
shuffles it off to the database, and then goes back to the 
member's page using a re-direct:


  


where vlink has the member's URL.

My Problem: If folk update their photos, their browser cache 
still shows the old picture -- logically leading them to think 
the update failed.


The photos are simply stored on the server, the database only 
stores the path of the file. The photo file shown on the 
member's page with an image tag.


Can any of the gurus here tell me how to get the page to ignore 
the cache so the browser shows the new photo?


Many thanks.

Tim Selander
Tokyo, Japan




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


LC Server and forcing page refreshes

2023-05-29 Thread Tim Selander via use-livecode

Once again find myself over my head in just a simple programming project.

I made a little club members directory website, using LC server on 
on-rev's hosting site.


Members can edit their info. I use a form, with the action going to an 
LC script. This script gets all the post data, shuffles it off to the 
database, and then goes back to the member's page using a re-direct:


 

where vlink has the member's URL.

My Problem: If folk update their photos, their browser cache still shows 
the old picture -- logically leading them to think the update failed.


The photos are simply stored on the server, the database only stores the 
path of the file. The photo file shown on the member's page with an 
image tag.


Can any of the gurus here tell me how to get the page to ignore the 
cache so the browser shows the new photo?


Many thanks.

Tim Selander
Tokyo, Japan


___
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: More Server Silliness -- Nevermind

2022-08-15 Thread Tim Selander via use-livecode
Using Firefox developer tools, found out jquery was not loading 
property.

Hangs head in shame at rookie mistake...

Still not working properly, but continue to poke at it.

Tim Selander

On 2022.08.15 21:58, Tim Selander via use-livecode wrote:
With Alex and everyone's help, I got the global vs cookies, etc., 
sorted out and am happily paginating away with my little 
membership web site.


With Kenji's help, I got automatic address fill-in from Japanese 
zip codes.


However, I was looking at LiveCode's server samples 
(serversamples.livecode.com/index.lc) and thought, gee, the Ajax 
filtering looks pretty neat.


So I set off to make that work, and failed. I'd give up on it, 
but after wasting THIS much time on it, I gotta bring it to you 
all for a little input and hopefully another bail-out.


Just for testing, I made two new files. The first with the code 
LC provides at 
https://serversamples.livecode.com/display-file.lc?filename=ajax-simple.lc 
and the second from step 3 of the ajax sample page, 
https://serversamples.livecode.com/ajax.lc.


Changed only the bits needed to pull data from my database. File 
one, ajax-simple.lc, lists my data and an input box just like the 
sample page. But it sends no info via GET to the second file, 
filter.lc. If I manually put the GET info in the 
URL,(filter.lc?search_term=John, I get the filtered data I 
expect, but in the filter.lc window -- the data is not returned 
to File 1, ajax-simple.lc.


Has anyone using LC Server gotten that ajax sample to work??

Many thanks,

Tim Selander







___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


More Server Silliness

2022-08-15 Thread Tim Selander via use-livecode
With Alex and everyone's help, I got the global vs cookies, etc., 
sorted out and am happily paginating away with my little 
membership web site.


With Kenji's help, I got automatic address fill-in from Japanese 
zip codes.


However, I was looking at LiveCode's server samples 
(serversamples.livecode.com/index.lc) and thought, gee, the Ajax 
filtering looks pretty neat.


So I set off to make that work, and failed. I'd give up on it, 
but after wasting THIS much time on it, I gotta bring it to you 
all for a little input and hopefully another bail-out.


Just for testing, I made two new files. The first with the code 
LC provides at 
https://serversamples.livecode.com/display-file.lc?filename=ajax-simple.lc 
and the second from step 3 of the ajax sample page, 
https://serversamples.livecode.com/ajax.lc.


Changed only the bits needed to pull data from my database. File 
one, ajax-simple.lc, lists my data and an input box just like the 
sample page. But it sends no info via GET to the second file, 
filter.lc. If I manually put the GET info in the 
URL,(filter.lc?search_term=John, I get the filtered data I 
expect, but in the filter.lc window -- the data is not returned 
to File 1, ajax-simple.lc.


Has anyone using LC Server gotten that ajax sample to work??

Many thanks,

Tim Selander







___
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: Server globals

2022-08-13 Thread Tim Selander via use-livecode

Alex,

Went to your page, and wow, that is exactly what I was trying to 
do. I'm still trying to figure out exactly how you do it, but I'm 
headed in the right direction.


Thanks!

Tim

On 2022.08.13 8:36, Alex Tweedly via use-livecode wrote:

Hi Tim,

I think there are many easy ways to do this - and many 
not-so-easy ones too.


IMO, easiest for something simple like this is to just use the url.

See tweedly.net/page_by_url.txt for the code, or try it out at 
tweedly.net/page_by_url.lc


(or try tweedly.net/page_by_url.lc?row=14 )

You can do something very similar using a cookie, with the 'row' 
value stored in the cookie each time (remember to "put cookie 
..." before *any* other output.)


Or by using the cookie to hold the name of a file in which you 
store this kind of info. This is necessary if you need to store a 
lot of data - if there is not already a cookie, create a filename 
using something like uuid(), and store the file name in it - then 
retrieve the cookie, and read or write the file.


Alex.

On 12/08/2022 14:18, Tim Selander via use-livecode wrote:

Hi Matthias,

It is user specific, but I just tried the saving to a text file 
on the server -- very fast. Got the user IP from $_Server, and 
used that in the filename for easy later retrieval. How much 
data can a cookie hold? Guess I'll test that.


One of the reasons I'm fussing with this is I'm trying to come 
up with some kind of pagination system. I'm probably trying to 
re-invent the wheel -- badly.


It's a simple membership list, with a few hundred records. Only 
want to show 30 on the page at a time. I wonder if anyone has a 
LC sample for doing that. I tried Ralph Bitter's Revigniter but 
just can't wrap my head around it.


Using MySQL for testing, so could try to figure out using the 
CURSOR feature. But know nothing about avoiding injection 
attacks, so may fall back to using  a .csv for the datafile. 
I've done that for all my other projects


Anyway, thanks for the info; no global variables, but file 
saves look like they'll work!


Tim

On 2022.08.12 21:26, matthias rebbe via use-livecode wrote:

Hi Tim,

does the variable have a user specific value or a value, that 
changes from time to time, but is the same for all users?


I've done something some time ago and used a text file on the 
server which stored that value. In my case the value was not 
user specific so it was an easy task.



If the variable is user specific, why don't you use a  cookies 
for that? That will grant that the value is available  at all 
pages in the same domain.


Regards,
Matthias


Am 12.08.2022 um 13:27 schrieb Tim Selander via use-livecode 
:


As always, appreciate everyone's help.

Have made several little projects using LC Server on the 
on-rev.com host. For the first time, I would like a global 
variable -- that is a variable that would retain it's value 
even if the page is re-loaded. Or if a user goes to another 
.lc page/file in the domain.


All my playing around, and Googling around, has been for 
nought. Is there a way to hang on to a bit of data was you 
move around pages in the same domain?


Thanks.

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage 
your subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage 
your subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Server globals

2022-08-12 Thread Tim Selander via use-livecode
Ah! Big problem I hadn't thought of  -- thank you!! I'll try the 
local storage script Jacques offered.


Many thanks.

Tim

On 2022.08.13 2:18, Ralph DiMola via use-livecode wrote:

Using the IP can fail if more than one user is on the same IP via a router
using NAT. The Browser local storage is a better solution.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net

-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of Tim Selander via use-livecode
Sent: Friday, August 12, 2022 9:18 AM
To: use-livecode@lists.runrev.com
Cc: Tim Selander
Subject: Re: Server globals

Hi Matthias,

It is user specific, but I just tried the saving to a text file on the
server -- very fast. Got the user IP from $_Server, and used that in the
filename for easy later retrieval. How much data can a cookie hold? Guess
I'll test that.

One of the reasons I'm fussing with this is I'm trying to come up with some
kind of pagination system. I'm probably trying to re-invent the wheel --
badly.

It's a simple membership list, with a few hundred records. Only want to show
30 on the page at a time. I wonder if anyone has a LC sample for doing that.
I tried Ralph Bitter's Revigniter but just can't wrap my head around it.

Using MySQL for testing, so could try to figure out using the CURSOR
feature. But know nothing about avoiding injection attacks, so may fall back
to using  a .csv for the datafile. I've done that for all my other
projects

Anyway, thanks for the info; no global variables, but file saves look like
they'll work!

Tim

On 2022.08.12 21:26, matthias rebbe via use-livecode wrote:

Hi Tim,

does the variable have a user specific value or a value, that changes from

time to time, but is the same for all users?


I've done something some time ago and used a text file on the server which

stored that value. In my case the value was not user specific so it was an
easy task.



If the variable is user specific, why don't you use a  cookies for that?

That will grant that the value is available  at all pages in the same
domain.


Regards,
Matthias



Am 12.08.2022 um 13:27 schrieb Tim Selander via use-livecode

:


As always, appreciate everyone's help.

Have made several little projects using LC Server on the on-rev.com host.

For the first time, I would like a global variable -- that is a variable
that would retain it's value even if the page is re-loaded. Or if a user
goes to another .lc page/file in the domain.


All my playing around, and Googling around, has been for nought. Is there

a way to hang on to a bit of data was you move around pages in the same
domain?


Thanks.

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your

subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your

subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Server globals

2022-08-12 Thread Tim Selander via use-livecode

Hi Matthias,

It is user specific, but I just tried the saving to a text file 
on the server -- very fast. Got the user IP from $_Server, and 
used that in the filename for easy later retrieval. How much data 
can a cookie hold? Guess I'll test that.


One of the reasons I'm fussing with this is I'm trying to come up 
with some kind of pagination system. I'm probably trying to 
re-invent the wheel -- badly.


It's a simple membership list, with a few hundred records. Only 
want to show 30 on the page at a time. I wonder if anyone has a 
LC sample for doing that. I tried Ralph Bitter's Revigniter but 
just can't wrap my head around it.


Using MySQL for testing, so could try to figure out using the 
CURSOR feature. But know nothing about avoiding injection 
attacks, so may fall back to using  a .csv for the datafile. I've 
done that for all my other projects


Anyway, thanks for the info; no global variables, but file saves 
look like they'll work!


Tim

On 2022.08.12 21:26, matthias rebbe via use-livecode wrote:

Hi Tim,

does the variable have a user specific value or a value, that changes from time 
to time, but is the same for all users?

I've done something some time ago and used a text file on the server which 
stored that value. In my case the value was not user specific so it was an easy 
task.


If the variable is user specific, why don't you use a  cookies for that? That 
will grant that the value is available  at all pages in the same domain.

Regards,
Matthias



Am 12.08.2022 um 13:27 schrieb Tim Selander via use-livecode 
:

As always, appreciate everyone's help.

Have made several little projects using LC Server on the on-rev.com host. For 
the first time, I would like a global variable -- that is a variable that would 
retain it's value even if the page is re-loaded. Or if a user goes to another 
.lc page/file in the domain.

All my playing around, and Googling around, has been for nought. Is there a way 
to hang on to a bit of data was you move around pages in the same domain?

Thanks.

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Server globals

2022-08-12 Thread Tim Selander via use-livecode

As always, appreciate everyone's help.

Have made several little projects using LC Server on the 
on-rev.com host. For the first time, I would like a global 
variable -- that is a variable that would retain it's value even 
if the page is re-loaded. Or if a user goes to another .lc 
page/file in the domain.


All my playing around, and Googling around, has been for nought. 
Is there a way to hang on to a bit of data was you move around 
pages in the same domain?


Thanks.

Tim Selander
Tokyo, Japan

___
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: Auto populate an HTML form with LC server

2022-08-07 Thread Tim Selander via use-livecode

一発でした!
小島様、ありがとうごあいました。助かりました!
お久しぶりに「小島健治」というお名前をメールリストに見て、すごく嬉しくなりました。過去、何回も手伝ってくださいましたね。

ごめんんさい、芸術の世界とまったく縁のない人間ですが、HPを見ると、相変わらず重要なプロジェクトを取り上げていますね。

では、これからもよろしくお願いいたします。

セランダー・ティム

Thank you so much!!

Tim



On 2022.08.07 20:17, Kenji Kojima wrote:

Tim,

See this
https://www.webdesign-fan.com/ajaxzip3
and
http://www.webdesign-fan-guide.com/ajaxzip3/

I believe you can use these on the LC server.

Best,
--
Kenji Kojima / 小島健治
http://www.kenjikojima.com/



On Aug 7, 2022, at 3:29 AM, Tim Selander via use-livecode 
<mailto:use-livecode@lists.runrev.com>> wrote:


Many web forms in Japan automatically fill in prefecture, town, 
ward and block when you just put in the zip code. I would like 
to do that on my web site, and know the api I would use.


I assume these sites are using javascript, but can LC server 
pick up user input before the submit button is clicked?


Any help appreciated.

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com 
<mailto:use-livecode@lists.runrev.com>
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Auto populate an HTML form with LC server

2022-08-07 Thread Tim Selander via use-livecode
Many web forms in Japan automatically fill in prefecture, town, 
ward and block when you just put in the zip code. I would like to 
do that on my web site, and know the api I would use.


I assume these sites are using javascript, but can LC server pick 
up user input before the submit button is clicked?


Any help appreciated.

Tim Selander
Tokyo, Japan

___
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: What is the best way to trigger an action at a certain time?

2022-07-13 Thread Tim Selander via use-livecode

Gentlemen,

The trigger will be 'pulled' once or twice a day only -- so these 
external to LC options are also viable. Hadn't entered my head at 
all!


Will be playing around with all these ideas and learn something! 
Basically use Macs, but have couple unused Windows laptops -- 
sounds like Task Scheduler and .bat files might be easier to deal 
with.


Thanks.

Tim

On 2022.07.13 18:20, Ben Rubinstein via use-livecode wrote:
Whatever works for your situation! At least one of my jobs, which 
runs a few times a week (pulling data from an internal system, 
generating and emailing a PDF report) has to launch fresh each 
time because of a bug in the graph widget which displays wrong if 
the script runs twice!


There are others where the LC qpp is part of a dance in which 
other systems run before and after, so a batch script invoking 
each in turn is the thing that's scheduled.


But of course there are contexts in which the best solution is an 
LC app waiting for a time or a command at which to leap into action.


On 12/07/2022 22:56, Bob Sneidar via use-livecode wrote:
Hmmm. Ok, but it seems having the LC app running invisibly all 
the time, listening for a command, something the cron service 
could do through the terminal easily enough, you could make it 
much more efficient. Just methods and madness I suppose.


Bob S


On Jul 12, 2022, at 13:15 , Ben Rubinstein via use-livecode 
 wrote:


I think I may not have been very clear.

This isn't LiveCode doing anything special; just a standalone 
LiveCode app that either does something immediately on launch 
(and then quits), or inspects the command line parameters to 
decide what to do (and then quits).



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What is the best way to trigger an action at a certain time?

2022-07-11 Thread Tim Selander via use-livecode

Tore,

Interesting! 'send in time' is a new one for me.
Thanks!

Tim

On 2022.07.11 20:43, Tore Nilsen via use-livecode wrote:

For this I would use a recursive approach with «send in time» something like 
this:

on openStack
 checkTime
end openStack

on checkTime
   ## Do your routines of checking time, performing the required action etc.
   send checkTime to me in 300 seconds. ## you set the interval to whatever is 
best for you
end checkTime

Best regards
Tore Nilsen


11. jul. 2022 kl. 13:35 skrev Tim Selander via use-livecode 
:

Dear all,

I want to have an LC app running on a computer doing nothing but watching the 
time. At predetermined times, I then want it to run a command. A call to an API 
on a website.

In the old HC days, I remember using "on idle" to watch for a set time. But even then, 
using "on idle" was less than ideal. CPU hog. What is the preferred/LC way to have an app 
trigger a command at a specific time of day?

Any pointers appreciated!

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


What is the best way to trigger an action at a certain time?

2022-07-11 Thread Tim Selander via use-livecode

Dear all,

I want to have an LC app running on a computer doing nothing but 
watching the time. At predetermined times, I then want it to run 
a command. A call to an API on a website.


In the old HC days, I remember using "on idle" to watch for a set 
time. But even then, using "on idle" was less than ideal. CPU 
hog. What is the preferred/LC way to have an app trigger a 
command at a specific time of day?


Any pointers appreciated!

Tim Selander
Tokyo, Japan

___
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: access DOM in browser widget?

2021-11-22 Thread Tim Selander via use-livecode
Sorry to pick up this thread half a year later, but I am 
searching for an answer to a related problem.


On the LiveCode Forums I learned that if the page is loaded in a 
Browser widget on the desktop version of LC, you can [get the 
htmltext of widget "browser"] and get the info JS provides that 
is not part of the page's HTML source code. (In my case, I want 
the number of plays of a track on Soundcloud.)


But I would like to get at this JS/DOM info through an LC Server 
script running on my on-rev.com server -- no browser widget there.


Does anyone know how to get the JS/DOM generated text from a web 
page using LC Server?


Any help appreciated!

Tim Selander
Tokyo, Japan



On 2021.04.29 3:44, Tore Nilsen via use-livecode wrote:

Have you had a look at "do in widget" in the Dictionary? You can actually 
perform JavaScript from LC on content in the browser widget.

Best regards
Tore


28. apr. 2021 kl. 20:33 skrev Ben Rubinstein via use-livecode 
:


Thanks for responding Tom


But if yoiu need any more of a direct way accessing itI don't know of one.

Yes, that's what I'm after: to have a browser widget in a LiveCode stack, and 
be able to access the DOM (not the htmlText) in LiveCode script.

It's not my page so I can't add javascript to it.

Does anyone know if this is possible?

TIA,

Ben

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Whatever happened to on-rev?

2021-08-19 Thread Tim Selander via use-livecode
A few weeks back (months?) they upgraded the servers. I have two 
accounts, personal and work. Before they were on different servers, but 
after the upgrade, both are on quartz.on-rev.com, and I can get at them 
through c-panel.


Same user name and password.

Recommend contacting support -- on-...@runrev.com -- to ask what server 
you are on now.


Tim Selander
Tokyo

On 8/20/21 10:23 AM, Colin Holgate via use-livecode wrote:

I recently had to use my space there, and this is the path to use:

https://bedrock.on-rev.com:2083 <https://bedrock.on-rev.com:2083/>

Having said that, right now it’s not loading.



On Aug 19, 2021, at 5:19 PM, Alex Tweedly via use-livecode 
 wrote:

Well, it's complicated -)

For me (Chrome on Mac), I get

on-rev.com   : redirects to livecode.com and all works ok

www.on-rev.com : gives error page (in French) and Error 403

https://on-rev.com : gives scary "connection is not private", etc. message

Alex.

On 20/08/2021 00:59, Bob Sneidar via use-livecode wrote:

I am getting an error that I do not have permission to access the site. I have 
a lifetime license.

Bob S



On Aug 19, 2021, at 16:54 , Jerry Jensen via use-livecode 
 wrote:

Eh, wot?
For me it redirects to https://livecode.com (in Safari on a mac).
.Jerry


On Aug 19, 2021, at 4:43 PM, Mark Wieder via use-livecode 
 wrote:

?
looks like it bit the dust.

http://on-rev.com/

--
Mark Wieder
ahsoftw...@gmail.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Writing file to server with Livecode Server

2021-07-09 Thread Tim Selander via use-livecode

Of course, right after posting, new ideas come to mind.

Using "put (variable) into URL (server file)" failed, but using 
the old


Open file (server file)
write (variable) to file (server file)
close file  (server file)

still works fine.

Sorry for the disturbance!

Tim Selander
Tokyo, Japan


On 2021.07.09 15:31, Tim Selander via use-livecode wrote:

Hi,

Several years back, I had a POST web form for our company where I
saved responses to a .csv file on the same server and same folder
as the .lc file. (All hosted on on-rev.com)

That page is long gone, but I now need to do the same thing. But
when I try to write the data to the csv file, I get a 405 Error.

I suppose new security rules are behind this, but it's also very
like I am simply making a coding mistake. Is it possible for an
.lc script to write a text file to the same folder it resides in?

Any help appreciated!

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Writing file to server with Livecode Server

2021-07-09 Thread Tim Selander via use-livecode

Hi,

Several years back, I had a POST web form for our company where I 
saved responses to a .csv file on the same server and same folder 
as the .lc file. (All hosted on on-rev.com)


That page is long gone, but I now need to do the same thing. But 
when I try to write the data to the csv file, I get a 405 Error.


I suppose new security rules are behind this, but it's also very 
like I am simply making a coding mistake. Is it possible for an 
.lc script to write a text file to the same folder it resides in?


Any help appreciated!

Tim Selander
Tokyo, Japan

___
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: Getting user's IP address in LC Server

2021-05-04 Thread Tim Selander via use-livecode

Hi Matthias!

Works like a charm -- didn't even occur to me to check the server 
variable for IP. (yeah, amateur!)


Thank you.

Tim Selander
Tokyo

On 2021.05.04 16:48, matthias rebbe via use-livecode wrote:

Hi Tim,

you can use the array variable $_SERVER for it. The variable contains the CGI 
interface related variables, along with any HTTP_* variables that are available.


$_SERVER["REMOTE_ADDR] contains the remote ip address.


Matthias

-
Matthias Rebbe
Life Is Too Short For Boring Code


Am 04.05.2021 um 06:30 schrieb Tim Selander via use-livecode 
:

Hi,

I am trying to make a web page that changes content a bit based on the user's 
location. I am using my on-rev hosting account and am trying two different 
service's APIs:

1) put "My country is" && url 
"https://api.ipdata.co/country_name?api-key=my/key;

2) put "curl https://api.ipgeolocation.io/getip; into IPvariable

But both of these return the info for Liquid Web LLC, the on-rev server 
company, not the info for me as I test the page in Tokyo.

What is a reliable way to get the user's IP address and or geolocation info 
from LC Server?

Any help appreciated!

Thanks,

Tim Selander
Tokyo

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Getting user's IP address in LC Server

2021-05-03 Thread Tim Selander via use-livecode

Hi,

I am trying to make a web page that changes content a bit based 
on the user's location. I am using my on-rev hosting account and 
am trying two different service's APIs:


1) put "My country is" && url 
"https://api.ipdata.co/country_name?api-key=my/key;


2) put "curl https://api.ipgeolocation.io/getip; into IPvariable

But both of these return the info for Liquid Web LLC, the on-rev 
server company, not the info for me as I test the page in Tokyo.


What is a reliable way to get the user's IP address and or 
geolocation info from LC Server?


Any help appreciated!

Thanks,

Tim Selander
Tokyo

___
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: background images

2021-01-18 Thread Tim Selander via use-livecode

Thanks, Peter.

I added a little opencard script to load the image for each card, 
which is fine and solves the immediate problem.
But I was quite certain that in the past, I had a stack, with an 
image control in a background that would keep a unique image for 
each card without scripting. I must be dreaming/getting forgetful 
in my old age!


Tim Selander

On 2021.01.19 10:20, Peter Bogdanoff via use-livecode wrote:

That’s where a image that is not part of the group is useful; it’s only on that 
card. Otherwise you would have to set the background image dynamically on 
preOpenCard based on stored data about that image/card combination.

Peter Bogdanoff


On Jan 18, 2021, at 4:44 PM, Tim Selander via use-livecode 
 wrote:

Right, which is why this is so confusing. I do not want a 'shared text' image.
Each card should keep it's own unique image, but when I change the image on one 
card, all the cards end up with the same image. That is what I want to fix.

Tim Selander

On 2021.01.19 3:21, Klaus major-k via use-livecode wrote:

Hi Tim,


Am 18.01.2021 um 19:12 schrieb Tim Selander via use-livecode 
:

This is driving me nuts.

Have a 'background' group with an image. If I change the filename of an image 
on one card, ALL the cards change to that image. Yet a field in the same group 
properly will take unique values for each card.

I know I've done this before... what setting am I missing??
Dropbox link to test stack: 
https://www.dropbox.com/s/0r0ku3fw2i2pen7/test.livecode?dl=0


fields can have a "sharedtext" property, so they can hold different text on 
each card if part of a group.
Images can NOT!


Any help appreciated!

Tim Selander
Tokyo, Japan


Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: background images

2021-01-18 Thread Tim Selander via use-livecode
Right, which is why this is so confusing. I do not want a 'shared 
text' image.
Each card should keep it's own unique image, but when I change 
the image on one card, all the cards end up with the same image. 
That is what I want to fix.


Tim Selander

On 2021.01.19 3:21, Klaus major-k via use-livecode wrote:

Hi Tim,


Am 18.01.2021 um 19:12 schrieb Tim Selander via use-livecode 
:

This is driving me nuts.

Have a 'background' group with an image. If I change the filename of an image 
on one card, ALL the cards change to that image. Yet a field in the same group 
properly will take unique values for each card.

I know I've done this before... what setting am I missing??
Dropbox link to test stack: 
https://www.dropbox.com/s/0r0ku3fw2i2pen7/test.livecode?dl=0


fields can have a "sharedtext" property, so they can hold different text on 
each card if part of a group.
Images can NOT!


Any help appreciated!

Tim Selander
Tokyo, Japan


Best

Klaus

--
Klaus Major
https://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


background images

2021-01-18 Thread Tim Selander via use-livecode

This is driving me nuts.

Have a 'background' group with an image. If I change the filename 
of an image on one card, ALL the cards change to that image. Yet 
a field in the same group properly will take unique values for 
each card.


I know I've done this before... what setting am I missing??

Dropbox link to test stack: 
https://www.dropbox.com/s/0r0ku3fw2i2pen7/test.livecode?dl=0


Any help appreciated!

Tim Selander
Tokyo, Japan

___
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: multi line Livecode field uploaded to MySQL

2019-02-16 Thread Tim Selander via use-livecode

Thank you!

It didn't quite work for me at first, but in re-reading the 
Dictionary on revExecuteSQL and reading BYU's page on the 
subject, I got it working.


Really appreciate your help.

Tim Selander
Tokyo

On 2019.02.16 18:17, Ludovic THEBAULT via use-livecode wrote:



Le 16 févr. 2019 à 09:17, Tim Selander via use-livecode 
 a écrit :

Thank you for your reply, but I haven't gotten it working yet.

The code in my first post was from my working stack. Here is what I have from 
my non-working stack after re-writing to follow your instructions:

# Construct SQL
put "INSERT INTO 
contactInfo(key,organization,denomination,address,category,tel,fax,tEmail,access,founded,staff,servicetime,web,character)"
 & \
" VALUES(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14)" into tSQL
# Execute SQL
revExecuteSQL(gconnection,tSQL,vkey,vorg,vdenom,vadd,vcategory,vtel,vfax,vtEmail,vaccess,vfounded,vstaff,vtime,vweb,vcat)
put the result into tTmp


The table name is "contactInfo" and the list of the table's fields is in the 
paranthesis.

The VALUES(:1,:2  syntax is something I haven't seen before. I assume that 
you need as many numbers as you have fields?

You say to use variables, and I am assuming in the "revExecuteSQL" line. Is that correct? 
I tried the list of variables both with the quotes you used, and without just to see. I also tried 
replacing the revExecuteSQL comman with revdb_execute. Both result in this error: {execution error 
at line n/a (External handler execution error: revdberr,syntax error) near "revdberr,syntax 
error"}

I appreciate your taking the time to educate me.

Tim Selander




Here an example :

put fld "name" into tName

put the label of btn "title" into tTitle
put fld "first_name" into fFirst_Name

put fld "address" into tAddress

put fld "citycode" into tCitycode

put fld "tCity" into tCity

put fld "tPhone" into tPhone

put fld "tEmail" into tEmail

put "INSERT INTO address ( tAddress, tCitycode, tEmail, tName, fFirst_Name, tPhone, 
tTitle, tCity) VALUES ( :1, :2, :3, :4, :5, :6, :7, :8 );" into tSQL
revExecuteSQL tDatabaseID, tSQL, "tAddress", "tCitycode", "tEmail", "tName", "fFirst_Name", 
"tPhone", "tTitle", "tCity"

//The quote are necessary in last line
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: multi line Livecode field uploaded to MySQL

2019-02-16 Thread Tim Selander via use-livecode

Thank you for your reply, but I haven't gotten it working yet.

The code in my first post was from my working stack. Here is what 
I have from my non-working stack after re-writing to follow your 
instructions:


# Construct SQL
 put "INSERT INTO 
contactInfo(key,organization,denomination,address,category,tel,fax,email,access,founded,staff,servicetime,web,character)" 
& \

" VALUES(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14)" into tSQL
# Execute SQL
revExecuteSQL(gconnection,tSQL,vkey,vorg,vdenom,vadd,vcategory,vtel,vfax,vemail,vaccess,vfounded,vstaff,vtime,vweb,vcat) 


put the result into tTmp


The table name is "contactInfo" and the list of the table's 
fields is in the paranthesis.


The VALUES(:1,:2  syntax is something I haven't seen before. 
I assume that you need as many numbers as you have fields?


You say to use variables, and I am assuming in the 
"revExecuteSQL" line. Is that correct? I tried the list of 
variables both with the quotes you used, and without just to see. 
I also tried replacing the revExecuteSQL comman with 
revdb_execute. Both result in this error: {execution error at 
line n/a (External handler execution error: revdberr,syntax 
error) near "revdberr,syntax error"}


I appreciate your taking the time to educate me.

Tim Selander




On 2019.02.16 16:12, Ludovic THEBAULT via use-livecode wrote:



Le 16 févr. 2019 à 07:59, Tim Selander via use-livecode 
 a écrit :

I have a routine to take data from fields on a card and upload to a mysql 
database. Has worked well for years, got the original script off the Livecode 
learning site.
---
  # Construct SQL
  put "INSERT INTO 
podcast(IP,accesstime,access_date,pgm_name,access_code,bytes,agent,city,region,country)" 
& \
   " VALUES(" & tRowData & ")" into tSQL
   # Execute SQL
   put revdb_execute(gconnection,tSQL) into tTmp

   if the result is not 1 then
 put the result && tSQL & return after message
  end if
-

tRowData has the data from the card fields, comma delimited.

Now, I'm needing to upload fields with multiple lines. But the returns in the 
data mess it up. Tried enclosing the field data in quotes, like .csv files, but 
that didn't work either.

MySQL can handle multi-line text fields so how do I upload them from LC? 
Any hints greatly appreciated.



Hello,

use this syntax :

  put "INSERT INTO 
podcast(IP,accesstime,access_date,pgm_name,access_code,bytes,agent,city,region,country)" 
& \
   " VALUES(:1,:2,:3,:4,:5,:6,:7,:8,:9)" into tSQL
   # Execute SQL
   revExecuteSQL 
gconnection,tSQL,"IP","accesstime","access_date","pgm_name","access_code","bytes","agent","city","region
 », "country »)
put the result into tTmp

// where IP, accesstime… are variables

Ludovic

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

multi line Livecode field uploaded to MySQL

2019-02-15 Thread Tim Selander via use-livecode
I have a routine to take data from fields on a card and upload to 
a mysql database. Has worked well for years, got the original 
script off the Livecode learning site.

---
  # Construct SQL
  put "INSERT INTO 
podcast(IP,accesstime,access_date,pgm_name,access_code,bytes,agent,city,region,country)" 
& \

   " VALUES(" & tRowData & ")" into tSQL
   # Execute SQL
   put revdb_execute(gconnection,tSQL) into tTmp

   if the result is not 1 then
 put the result && tSQL & return after message
  end if
-

tRowData has the data from the card fields, comma delimited.

Now, I'm needing to upload fields with multiple lines. But the 
returns in the data mess it up. Tried enclosing the field data in 
quotes, like .csv files, but that didn't work either.


MySQL can handle multi-line text fields so how do I upload 
them from LC? Any hints greatly appreciated.


Tim Selander
Tokyo

___
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: Images and Players in "background" groups

2019-02-03 Thread Tim Selander via use-livecode

Hi Peter,

Thanks for the info.
It took a little playing around, but I now have each card loading 
up properly with it's association image or video file.


Thanks!

Tim Selander
Tokyo

On 2019.02.03 16:42, Peter Bogdanoff via use-livecode wrote:

Hi Tim,

That would be correct. To have a different image on every card, you could:

1. Have an image control that’s not part of the group on every card
or
2. Some other method of dynamically loading the image data into an image that 
is part of the group, such as on openCard:

put URL tURL into image “My Image" of this card

where tURL is a path to a local or remote file.

Player controls would use similar methods as above.

Peter Bogdanoff



On Feb 2, 2019, at 10:55 PM, Tim Selander via use-livecode 
 wrote:

For the first time ever, probably, I have a little project that needs the HC "stack 
of cards" structure.

Have a few buttons and fields in a group, acting a a background and it all 
works as expected.

However, I also have an image and a play in the group/background. Oddly, when I set one 
card's image via "set the filename of image to URL" it puts that image or 
video on ALL the cards.

So the bg flds can all have different values per card, but the images and 
players cannot!

Is this right?? I have searched the dictionary and google to no avail

Tim Selander
Tokyo

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Images and Players in "background" groups

2019-02-02 Thread Tim Selander via use-livecode
For the first time ever, probably, I have a little project that 
needs the HC "stack of cards" structure.


Have a few buttons and fields in a group, acting a a background 
and it all works as expected.


However, I also have an image and a play in the group/background. 
Oddly, when I set one card's image via "set the filename of image 
to URL" it puts that image or video on ALL the cards.


So the bg flds can all have different values per card, but the 
images and players cannot!


Is this right?? I have searched the dictionary and google to no 
avail


Tim Selander
Tokyo

___
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: Writing a UTF8 text file to server -- solved

2018-10-04 Thread Tim Selander via use-livecode

Just for posterity...

Tried many combinations of various commands opening the file 
as a binfile instead of a text file solved my problem


Changed:
open file vfile for utf8 text update

To:
open file vfile for binary update

At which point the same command:
write vdata to file vfile at end

properly saved the data as utf8/kanji to the file on the server.

All's well that ends well.

Tim Selander
Tokyo, Japan



On 2018.10.04 15:48, Tim Selander via use-livecode wrote:

Hi Scott,

Added info; I have  at the top of the web page source.

Then, I only found outputTextEncoding in the dictionary. It said
it only works with CGI (server), put when I put:
set the outputTextEncoding to "utf-8"

into the script before dealing with the $_POST array, it broke
the Kanji on the web page itself.

Googling turned up info on the textEncode function, but this
script still results with a saved file of gibberish and not Kanji.

Changed the script to this:
put $_POST[firstname]  --(Results in Kanji name to web page)
put "data.txt" into vfile
open file vfile for utf8 text update
put textEncode($_POST[firstname], "UTF-8") into vdata
write vdata to file vfile at end
close file vfile

but still get a file with broken kanji.

Any hints?

Tim




On 2018/10/04 15:08, scott--- via use-livecode wrote:

Hello Tim,

Did you look at the textEncode function?

—
Scott Morrow


On Oct 3, 2018, at 10:22 PM, Tim Selander via use-livecode
 wrote:

I am using Livecode Server on Livecode's hosting plan.

Taking my first stab at a web response form. I am getting the
data from $_POST fine, and when I simply do something like:
put $_POST[firstname]

the UTF8/Kanji word shows up fine in the webpage. But I am
unable to save the data to a file on the server encoded in
UTF8 (simply trying to collect the submitted data).

put "data.txt" into vfile
open file vfile for utf8 text update
put $_POST[firstname] & comma & $_POST[lastname] & comma &
$_POST[country] &  the time & return into vdata
write vdata to file vfile at end
close file vfile

Data is getting saved, but in gibberish, not in kanji/utf8.

Anyone see what I'm doing wrong?

TIA

Tim Selander
Tokyo, Japan


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage
your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Writing a UTF8 text file to server.

2018-10-04 Thread Tim Selander via use-livecode

Hi Scott,

Added info; I have charset=UTF-8" ?> at the top of the web page source.


Then, I only found outputTextEncoding in the dictionary. It said it only 
works with CGI (server), put when I put:

set the outputTextEncoding to "utf-8"

into the script before dealing with the $_POST array, it broke the Kanji 
on the web page itself.


Googling turned up info on the textEncode function, but this script 
still results with a saved file of gibberish and not Kanji.


Changed the script to this:
put $_POST[firstname]  --(Results in Kanji name to web page)
put "data.txt" into vfile
open file vfile for utf8 text update
put textEncode($_POST[firstname], "UTF-8") into vdata
write vdata to file vfile at end
close file vfile

but still get a file with broken kanji.

Any hints?

Tim




On 2018/10/04 15:08, scott--- via use-livecode wrote:

Hello Tim,

Did you look at the textEncode function?

—
Scott Morrow


On Oct 3, 2018, at 10:22 PM, Tim Selander via use-livecode 
 wrote:

I am using Livecode Server on Livecode's hosting plan.

Taking my first stab at a web response form. I am getting the data from $_POST 
fine, and when I simply do something like:
put $_POST[firstname]

the UTF8/Kanji word shows up fine in the webpage. But I am unable to save the 
data to a file on the server encoded in UTF8 (simply trying to collect the 
submitted data).

put "data.txt" into vfile
open file vfile for utf8 text update
put $_POST[firstname] & comma & $_POST[lastname] & comma & $_POST[country] &  the 
time & return into vdata
write vdata to file vfile at end
close file vfile

Data is getting saved, but in gibberish, not in kanji/utf8.

Anyone see what I'm doing wrong?

TIA

Tim Selander
Tokyo, Japan


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Writing a UTF8 text file to server.

2018-10-03 Thread Tim Selander via use-livecode

I am using Livecode Server on Livecode's hosting plan.

Taking my first stab at a web response form. I am getting the data from 
$_POST fine, and when I simply do something like:

put $_POST[firstname]

the UTF8/Kanji word shows up fine in the webpage. But I am unable to 
save the data to a file on the server encoded in UTF8 (simply trying to 
collect the submitted data).


put "data.txt" into vfile
open file vfile for utf8 text update
put $_POST[firstname] & comma & $_POST[lastname] & comma & 
$_POST[country] &  the time & return into vdata

write vdata to file vfile at end
close file vfile

Data is getting saved, but in gibberish, not in kanji/utf8.

Anyone see what I'm doing wrong?

TIA

Tim Selander
Tokyo, Japan


___
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: Using the $_POST global in LiveCode server

2018-08-02 Thread Tim Selander via use-livecode

Thanks, Mike.

This seemed like a good hint/possible solution.

Another though has just occurred to me also..  If you use session
variables, you can store the search term in the session, and since the
browser will re-post on reload, if $_POST and your session variable contain
the same search term, its possible (likely?) that it was a reload rather
than a new search, then don't do the search. Not sure if this is helpful,

However, when I tried

and the server returned the error

file "/home/pba/public_html/lifelinesearch.lc"
  row 2, col 1:

This snippet is at the very top of the page, so row 2 is "start session."

Am I misundertanding the syntax of 'session'?

Thanks,

Tim



___
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


Using the $_POST global in LiveCode server

2018-08-02 Thread Tim Selander via use-livecode

Hi,

Is it possible to change, or even delete, the $_POST[] array in LiveCode 
server? I want to clear it after my script has pulled out the info it needs.


Or, maybe there's another way to skin the cat. I have a search page that 
returns a list of our online TV programs. But even if the page is 
reloaded, the previous search term is still "live" in the $_P, so the 
page returns the previously searched list of programs. If a user reloads 
the page, I want the page to come up with no program list until they 
enter a new search term.


Any pointers?

Thanks!

Tim Selander
Tokyo Japan

___
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


$_POST[] variable?

2018-08-02 Thread Tim Selander via use-livecode

Hi,

Is it possible to manipulate the contents of the $_Post[] global 
directly on Livecode serve?


When I reload a page, the values in the array still have the values in 
them from the previous time the "Submit" button was used... efforts to 
delete or put empty into, do not seem to work.


Thanks.

Tim Selander
Tokyo, Japan

___
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: UTF8 on LC server

2018-06-01 Thread Tim Selander via use-livecode

Mark,

Success!  Greatly appreciate your walking me through this.

Have a great weekend.

Tim Selander
Tokyo, Japan


On Fri, Jun 1, 2018 at 7:15 AM, Mark Waddingham via use-livecode <

use-livecode@lists.runrev.com> wrote:


On 2018-06-01 12:53, Tim Selander via use-livecode wrote:


Hi Mark,

Here is the script. The files I'm using are
bamboobabies.com/getjapanesetext.lc, and the text it is getting is
bamboobabies.com/news.txt.

In the script, there are two lines reading the text file that I've
taken turns commenting out

If you can give me any hints, it would be greatly appreciated.

Tim Selander





 
 
 workbench
 


http://bamboobabies.com/news.txt; into vText

--When this line is used, none of the put text is readable
--put textDecode(url "binfile:bamboobabies.com/news.txt", "utf-8") into
vText

put line 1 of vText

put ""

put char 500 to 550 of vText
  ?>





Try this:





 
 
 workbench
 

http://bamboobabies.com/news.txt;, "utf-8") into vText

put line 1 of vText

put ""

put char 500 to 550 of vText
  ?>



The problem you are having is that your text-file is UTF-8, but the engine
doesn't know that - you need to explicit decode it into a LiveCode string
using textDecode. You can then manipulate it as chars etc. correctly with
Unicode. That solves the 'getting data into livecode in the form needed'
problem.

The other side of the problem is the text encoding used when you do 'put'.
By default this is 'native' - by setting the outputTextEncoding at the
start, the engine will automatically encode any strings you 'put' with the
encoding specified.

Hope this helps!

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: UTF8 on LC server

2018-06-01 Thread Tim Selander via use-livecode

Hi Mark,

Here is the script. The files I'm using are 
bamboobabies.com/getjapanesetext.lc, and the text it is getting 
is bamboobabies.com/news.txt.


In the script, there are two lines reading the text file that 
I've taken turns commenting out


If you can give me any hints, it would be greatly appreciated.

Tim Selander








workbench



--This line loads readable japanese text, but putting char 500 to 
550 breaks beginning and ending kanji

put url "http://bamboobabies.com/news.txt; into vText

--When this line is used, none of the put text is readable
--put textDecode(url "binfile:bamboobabies.com/news.txt", 
"utf-8") into vText


put line 1 of vText

put ""

put char 500 to 550 of vText
 ?>






On 2018.06.01 16:17, Mark Waddingham via use-livecode wrote:


You should be fine using 'character' on any unicode text - it
uses the Unicode grapheme (specific name of 'character's as
human's 'think' of 'character's) breaking rules to find the
boundaries.

That being said, I think codepoint (from memory) should also be
okay on Japanese text as I don't think the Japanese/Chinese
scripts have any multi-codepoint characters - they just use
codepoints with value > 65535 for less used ideographs (the
'supplementary plane'). [ Korean script can be encoded with
Hangul, which *does* require the use of character as a single
Korean Hangul ideograph can be composed of up to three codepoints ].

The fact it is breaking on Japanese text in the way you suggest
makes me think you aren't textDecode()'ing your UTF-8 input files:

e.g.
put textDecode(url ("binfile:"), "utf-8") into tText

Without decoding as utf-8, the engine will thing your file is
'native' (single-byte encoded), so each byte of the file will be
seen as a separate character.

Internally the engine uses either single-byte or double-byte
encodings for strings (the latter being UTF-16) - which is not
user-visible, you just need to make sure that incoming data is
decoded correctly.

Can you share the code you are using to read in the text data and
code which is breaking on server?

Warmest Regards,

Mark.

P.S. 'word' in LC is still any sequence of non-space characters
separated by spaces, or any sequence of characters delimited by
quotes - it takes no account of the script of the text, nor
actual word-boundaries. If you want human-style word boundaries
then you should use trueWord (which uses the standard Unicode
word breaking rules).



___
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: UTF8 on LC server

2018-05-31 Thread Tim Selander via use-livecode

Hi Kee and Alex,

The original documents I'm working with are UTF8, so that's that I've 
been using. So converting them to UTF16 is recommended? I'll try that.


Alex, desktop is version 8 something, and the server is the one 
installed on the on-rev host; can't remember what the key in $_Server 
for than info is, and Googling failed me this time...


Tim Selander

On 2018/06/01 8:55, kee nethery via use-livecode wrote:

I’m assuming you are using “unicode” (aka UTF-16) and not UTF8 to do all your 
transforming of the data?
Kee


On May 31, 2018, at 4:46 PM, Tim Selander via use-livecode 
 wrote:

Thanks, Kee.

Actually, I had found the reference to codepoint in the dictionary and tried it. But it seems to 
work the same as character -- breaking kanji. My test code is "put codepoint 500 to 550 of 
variable1" and the webpage shows: �。こうして夕があり、朝があった。�  The beginning and ending kanji got split 
in half. Identical results to "put char 500 to 550."

Tim Selander

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: UTF8 on LC server

2018-05-31 Thread Tim Selander via use-livecode

Thanks, Kee.

Actually, I had found the reference to codepoint in the dictionary and 
tried it. But it seems to work the same as character -- breaking kanji. 
My test code is "put codepoint 500 to 550 of variable1" and the webpage 
shows: �。こうして夕があり、朝があった。�  The beginning and ending 
kanji got split in half. Identical results to "put char 500 to 550."


Tim Selander


On 2018/06/01 8:39, kee nethery via use-livecode wrote:



On May 31, 2018, at 4:33 PM, Tim Selander via use-livecode 
 wrote:

Thanks, Warren.

Yes, I've got that header set up, and UTF8 is working fine, pages look great. But LC server is not 
handling character chunking in variables the same way as LC desktop. In desktop, I can say 
"put char 1 of variable1" and I get a Japanese kanji. In LC Server, I only get half a 
kanji. "Word" chunks are also not working. Items and lines are OK.

Yep, “char" is no longer the thing to use. Use “codepoint”.
put codepoint 1 of variable1

Kee Nethery


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: UTF8 on LC server

2018-05-31 Thread Tim Selander via use-livecode

Thanks, Warren.

Yes, I've got that header set up, and UTF8 is working fine, pages look 
great. But LC server is not handling character chunking in variables the 
same way as LC desktop. In desktop, I can say "put char 1 of variable1" 
and I get a Japanese kanji. In LC Server, I only get half a kanji. 
"Word" chunks are also not working. Items and lines are OK.


I never got the hange of all the encodes and decodes needed for Japanese 
in LC 6 and earlier... but does LC server require those kinds of text 
manipulations?


Tim Selander
Tokyo, Japan

On 2018/06/01 6:43, Warren Samples via use-livecode wrote:

On 05/31/2018 06:43 AM, Tim Selander via use-livecode wrote:
Is there any way to get LC Server to handle double-byte characters 
the same way LC desktop does?


Tim Selander
Tokyo, Japan


LC Server serves pages with a default "Content-Type" header of:

Content-Type: text/html; charset=iso-8859-1

That would prevent the display of Japanese characters.

Try putting:

put header "Content-Type: text/html; charset=utf-8"

at the top of your lc pages after the Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


UTF8 on LC server

2018-05-31 Thread Tim Selander via use-livecode

Hi,

In LC, if I have a field or variable in Japanese (double-byte) 
and get, say, the 5th character, it returns the correct 
double-byte character. But on LC server (on-rev hosting) 
"character" commands get single bytes, breaking the Japanese 
character turning it into gibberish.


Is there any way to get LC Server to handle double-byte 
characters the same way LC desktop does?


Tim Selander
Tokyo, Japan

___
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: another mac to Windows gotcha

2018-02-24 Thread Tim Selander via use-livecode

Hi Peter,

Tried
if pkeyname is "j" then
set the playrate of player videoplayer to -1
start player videplayer
end if

Results in a pause in playback as long as I am holding ctrl-j, as 
soon as that's released, forward play resumes.


Thanks.

Tim


On 2018.02.25 0:26, Peter Bogdanoff via use-livecode wrote:

Tim,

Try both commands in order: set playRate, then start.

Peter Bogdanoff


On Feb 24, 2018, at 10:16 AM, Tim Selander via use-livecode 
<use-livecode@lists.runrev.com> wrote:

Hi Paul,

Using 9.0 dp11 community. After sending the post, I found in the dictionary 
that for windows, commandkeydown message. After changing my script from 
controlkeydown to commandkeydown, it worked. Sort of.

My next problem is that on the LC/osx I use:
  if pkeyname is "j" then set the playrate of player videoplayer to -1
  if pkeyname is "k" then set the playrate of player videoplayer to 0
  if pkeyname is "l" then set the playrate of player videoplayer to 1

to start, stop or reverse the player from the keyboard. This worked great in 
LC/osx, but is not working in win7/LC.

I changed the lines to
  if pkeyname is "k" then stop player videoplayer
  if pkeyname is "l" then start player videoplayer

and that works in win7/lc. But can't figure out how to send a play in reverse 
command from the keyboard yet.

Tim Selander
Tokyo, Japan



On 2018.02.24 23:44, Paul Dupuis via use-livecode wrote:
controlKeyDown is absolutely available on Windows. See the dictionary
entry in LC8.1.9 for example. What version of LiveCode are you using?



On 2/24/2018 9:04 AM, Tim Selander via use-livecode wrote:
Hi,

Trying my first little LC app on Windows. I wrote an app on osx and am
now trying to get it to work in a Win7 machine.

On the mac app, I use ctrl-J, ctrl-K, and ctrl-L to control the video
player. JKL is pretty standard video player control in video editing
software.

On the mac app, the card script 'listens' for controlkeydown, and if
the other key is J K or L, sends the appropriate go, stop, reverse
command to the player.

Have just discovered controlkeydown is not available on windows. Is
there an equivalent? What would the windows guy and gals here use?

Thanks,

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: another mac to Windows gotcha

2018-02-24 Thread Tim Selander via use-livecode

Hi Paul,

Using 9.0 dp11 community. After sending the post, I found in the 
dictionary that for windows, commandkeydown message. After 
changing my script from controlkeydown to commandkeydown, it 
worked. Sort of.


My next problem is that on the LC/osx I use:
  if pkeyname is "j" then set the playrate of player videoplayer 
to -1
  if pkeyname is "k" then set the playrate of player videoplayer 
to 0
  if pkeyname is "l" then set the playrate of player videoplayer 
to 1


to start, stop or reverse the player from the keyboard. This 
worked great in LC/osx, but is not working in win7/LC.


I changed the lines to
  if pkeyname is "k" then stop player videoplayer
  if pkeyname is "l" then start player videoplayer

and that works in win7/lc. But can't figure out how to send a 
play in reverse command from the keyboard yet.


Tim Selander
Tokyo, Japan


On 2018.02.24 23:44, Paul Dupuis via use-livecode wrote:

controlKeyDown is absolutely available on Windows. See the dictionary
entry in LC8.1.9 for example. What version of LiveCode are you using?


On 2/24/2018 9:04 AM, Tim Selander via use-livecode wrote:

Hi,

Trying my first little LC app on Windows. I wrote an app on osx and am
now trying to get it to work in a Win7 machine.

On the mac app, I use ctrl-J, ctrl-K, and ctrl-L to control the video
player. JKL is pretty standard video player control in video editing
software.

On the mac app, the card script 'listens' for controlkeydown, and if
the other key is J K or L, sends the appropriate go, stop, reverse
command to the player.

Have just discovered controlkeydown is not available on windows. Is
there an equivalent? What would the windows guy and gals here use?

Thanks,

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


another mac to Windows gotcha

2018-02-24 Thread Tim Selander via use-livecode

Hi,

Trying my first little LC app on Windows. I wrote an app on osx 
and am now trying to get it to work in a Win7 machine.


On the mac app, I use ctrl-J, ctrl-K, and ctrl-L to control the 
video player. JKL is pretty standard video player control in 
video editing software.


On the mac app, the card script 'listens' for controlkeydown, and 
if the other key is J K or L, sends the appropriate go, stop, 
reverse command to the player.


Have just discovered controlkeydown is not available on windows. 
Is there an equivalent? What would the windows guy and gals here use?


Thanks,

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


playing a video in Win7?

2018-02-24 Thread Tim Selander via use-livecode

Hi,

Trying to simply play an h264 video on LC 9 in a player on a Win7 
machine. Quicktime installed. I have .mov, .mp4, .mv4 videos that 
all play fine on Mac osx /and/ in QT on the Win7 machine. But I 
can only get .wmv to play in the LC player object on Win7.


Have to create a little in-house app for a Win7 user...  Very 
first time to use LC on Windows.


Any hints?

Much appreciated.

Tim Selander
Tokyo, Japan


___
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: Getting current line number of a table field.

2018-02-14 Thread Tim Selander via use-livecode

Hi Mike,

Thanks! I put the script in the table field itself with no luck. 
But when I moved it to the card script, it works! Great! I never 
would have come up with that in a million years.


This list is fantastic.

Oh, and I just re-named the table field to "Opera"  ;-)

Tim Selander
Tokyo, Japan

On 2018.02.15 1:04, Mike Bonner via use-livecode wrote:

Try this...

on rawkeyup pkey
send "getline" to me in 10 millisec
pass rawkeyup
end rawkeyup

command getline
put the short name of the focusedobject
end getline

This gives you the name of the editing field that appears for each cell in
the form of:

revCell-2,2

Parse that and voila, you have your info.

On Wed, Feb 14, 2018 at 8:35 AM, dunbarx via use-livecode <
use-livecode@lists.runrev.com> wrote:


You know, this proved more of a problem than I thought.

Richmond, the issue is with tab and return keyPresses, not mouse clicks.
Anyway, given a table field 1 and another field 2, this works if you tab or
return in the table field:

on rawKeyUp tKey
put the selectedLoc && the selectedChunk into fld 2
pass rawKeyUp
end rawKeyUp

And this works fine in a button:

on mouseUp
set the itemDel to tab
select item 2 of line 2 of fld 1
answer the selectedLine of fld 1
end mouseUp

But this does not in the table field:
on rawKeyDown tKey
put "" into fld 2
put the selectedLine into fld 2
pass rawKeyDown
end rawKeyDown

I always get "line 1 of field 3"  ()

  Kluge city to get the line from the selectedLoc, but that would indeed
work.

Is it that in a table field, if only one "cell" is selected, the
selectedLine just does not compute?

Craig Newman






--
Sent from: http://runtime-revolution.278305.n4.nabble.com/
Revolution-User-f278306.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


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Getting current line number of a table field.

2018-02-14 Thread Tim Selander via use-livecode

Hi,

Editing a table field (not datagrid) and need to track the number 
of the line that is being edited. If I click into a new line, 
"selectionchanged" will let me figure out what line I'm editing. 
But if I hit return or tab to go to a new line, how can I track 
what line the cursor is in? Rawkeyups and downs are being sent, 
but I have been unsuccessful in trapping them in the table 
field's script.


Any ideas?
Much appreciated.

Tim Selander
Tokyo, Japan

___
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


Getting directory list from web server??

2017-11-06 Thread Tim Selander via use-livecode

Hi,

Up until now, in my livecode server script,

put URL "http://www.myserver.com/radio/15/; after vlist

has gotten me text list of the directory contents.

Now it gets me a "You don't have permission to access." error message.

on-rev hosting, "sage" is the server.

Anyone know what is going on?

TIA

Tim Selander
Tokyo, Japan

___
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: Sending an FTP command from one web server to another?

2017-07-19 Thread Tim Selander via use-livecode

Richard,

Have never written a CGI in my life but you got me thinking; a 
quick Google found me a php script to "print" a folder listing.


So now my .lc script on my on-rev serve puts the url of the .php 
page on the server with the mp3s into a variable -- which gives 
me the list of file names I was trying to get via ftp. Works slick.


Thanks!

Tim Selander
Tokyo, Japan

On 2017.07.19, 2:16, Richard Gaskin via use-livecode wrote:

Tim Selander wrote:

 > My company gave up on hosting our email and website at on-rev.com
 > back when they were having lots of reliability problems. We're
using
 > a host in Japan; no LC server installed, nor is it installable.
 >
 > I still have our Founder's account on on-rev.com, and use
quite a few
 > .lc scripts, calling them from iframes in web pages hosted on
the new
 > host.
 >
 > Our radio programs' mp3 files are stored on the new host. I
want one
 > of my scripts on on-rev.com to get the directory listing of
the mp3
 > files on the new host.

FTP is probably not the best solution for this, for reasons too
numerable to list this morning.

But for the task as described, other simpler, more efficient, and
more secure alternatives exist:

Can you run a CGI on the server holding the MP3 files to obtain
that list?

Or, if they're within you're web root, can you use Apache's
directory listing?



___
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: Sending an FTP command from one web server to another?

2017-07-18 Thread Tim Selander via use-livecode

Hi again Matthias,

I remembered I was given an ftp account on a colleague's server 
awhile back -- tried that and got access with both LC server and 
via ssh on sage.on-rev.


So gmoserver.jp is blocking access from sage.on-rev somehow...

Back to the drawing board.

Thanks for your time and input.

Tim


On 2017.07.18, 20:34, Matthias Rebbe via use-livecode wrote:

Hi Tim,

i had some time during lunch and  made a quick test on my on-rev account at the 
Jasmine server.
I am able to list the files of a non on-rev server without problems using 
livecode server. Jasmine runs version 7.1.0 of lc server.

Regards,
Matthias



Matthias Rebbe
+49 5741 31
‌matthiasrebbe.eu <http://matthiasrebbe.eu/>‌


Am 18.07.2017 um 12:50 schrieb Tim Selander via use-livecode 
<use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>>:

Hi Matthias,

Good idea. I just sent support an email asking to have ssh activated!

I'll post again with results!

Tim Selander
Tokyo, Japan

On 2017.07.18, 19:12, Matthias Rebbe via use-livecode wrote:

Do you have ssh access for your on-rev  account? If not, ask support to enable 
it for you.

Try to use ftp from the commandline, just to see if gmoserver.jp <http://gmoserver.jp/> 
<http://gmoserver.jp/ <http://gmoserver.jp/>> accepts that connection. If that also 
doesn´t work, then i would assume that your server is blocking the incoming connection from 
on-rev. If that works, then  livecode server seems to have a problem with ftp outgoing 
connections.

Matthias
Matthias Rebbe
+49 5741 31
‌matthiasrebbe.eu <http://matthiasrebbe.eu/> <http://matthiasrebbe.eu/ 
<http://matthiasrebbe.eu/>>‌


Am 18.07.2017 um 10:38 schrieb Tim Selander via use-livecode <use-livecode@lists.runrev.com 
<mailto:use-livecode@lists.runrev.com> <mailto:use-livecode@lists.runrev.com 
<mailto:use-livecode@lists.runrev.com>>>:

Hi,

My company gave up on hosting our email and website at on-rev.com <http://on-rev.com/> 
<http://on-rev.com/ <http://on-rev.com/>> back when they were having lots of 
reliability problems. We're using a host in Japan; no LC server installed, nor is it installable.

I still have our Founder's account on on-rev.com <http://on-rev.com/> 
<http://on-rev.com/ <http://on-rev.com/>>, and use quite a few .lc scripts, calling 
them from iframes in web pages hosted on the new host.

Our radio programs' mp3 files are stored on the new host. I want one of my scripts on on-rev.com 
<http://on-rev.com/> <http://on-rev.com/ <http://on-rev.com/>> to get the 
directory listing of the mp3 files on the new host. The ftp command from LC tutorials works fine 
from LC desktop (Community edition, Mac) to get the filelist:
put url "ftp://user:p...@domain.com/folder/ <ftp://user:p...@domain.com/folder/> 
<ftp://user:p...@domain.com/folder/ <ftp://user:p...@domain.com/folder/>>" into myVariable

Put when I call it from the server .lc script on on-rev, the result is:
error Failed to connect to gmoserver.jp <http://gmoserver.jp/> <http://gmoserver.jp/ 
<http://gmoserver.jp/>> port 21: Connection refused

(gmoserver.jp <http://gmoserver.jp/> <http://gmoserver.jp/ 
<http://gmoserver.jp/>> is our new host here in Japan.)

Any ideas why the connection would be refused when coming from on-rev, but not 
LC desktop? Anyways around this?

Thanks in advance.

Tim Selander
Tokyo, Japan




___
use-livecode mailing list
use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Sending an FTP command from one web server to another?

2017-07-18 Thread Tim Selander via use-livecode

Hi again,

Reporting back for

RevRun support was very quick at activating ssh on my account -- 
thanks!


However, using ftp from the commandline to gmoserver.jp resulted 
in the same message: connection refused


OK, time to take a new tack on the problem!

Thanks for the tip, Matthias.

Tim Selander
Tokyo, Japan

On 2017.07.18, 19:12, Matthias Rebbe via use-livecode wrote:

Do you have ssh access for your on-rev  account? If not, ask support to enable 
it for you.

Try to use ftp from the commandline, just to see if gmoserver.jp 
<http://gmoserver.jp/> accepts that connection. If that also doesn´t work, then 
i would assume that your server is blocking the incoming connection from on-rev. If 
that works, then  livecode server seems to have a problem with ftp outgoing 
connections.

Matthias
Matthias Rebbe
+49 5741 31
‌matthiasrebbe.eu <http://matthiasrebbe.eu/>‌


Am 18.07.2017 um 10:38 schrieb Tim Selander via use-livecode 
<use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>>:

Hi,

My company gave up on hosting our email and website at on-rev.com 
<http://on-rev.com/> back when they were having lots of reliability problems. 
We're using a host in Japan; no LC server installed, nor is it installable.

I still have our Founder's account on on-rev.com <http://on-rev.com/>, and use 
quite a few .lc scripts, calling them from iframes in web pages hosted on the new 
host.

Our radio programs' mp3 files are stored on the new host. I want one of my scripts on 
on-rev.com <http://on-rev.com/> to get the directory listing of the mp3 files 
on the new host. The ftp command from LC tutorials works fine from LC desktop 
(Community edition, Mac) to get the filelist:
put url "ftp://user:p...@domain.com/folder/ 
<ftp://user:p...@domain.com/folder/>" into myVariable

Put when I call it from the server .lc script on on-rev, the result is:
error Failed to connect to gmoserver.jp <http://gmoserver.jp/> port 21: 
Connection refused

(gmoserver.jp <http://gmoserver.jp/> is our new host here in Japan.)

Any ideas why the connection would be refused when coming from on-rev, but not 
LC desktop? Anyways around this?

Thanks in advance.

Tim Selander
Tokyo, Japan





___
use-livecode mailing list
use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Sending an FTP command from one web server to another?

2017-07-18 Thread Tim Selander via use-livecode

Hi Matthias,

Good idea. I just sent support an email asking to have ssh activated!

I'll post again with results!

Tim Selander
Tokyo, Japan

On 2017.07.18, 19:12, Matthias Rebbe via use-livecode wrote:

Do you have ssh access for your on-rev  account? If not, ask support to enable 
it for you.

Try to use ftp from the commandline, just to see if gmoserver.jp 
<http://gmoserver.jp/> accepts that connection. If that also doesn´t work, then 
i would assume that your server is blocking the incoming connection from on-rev. If 
that works, then  livecode server seems to have a problem with ftp outgoing 
connections.

Matthias
Matthias Rebbe
+49 5741 31
‌matthiasrebbe.eu <http://matthiasrebbe.eu/>‌


Am 18.07.2017 um 10:38 schrieb Tim Selander via use-livecode 
<use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>>:

Hi,

My company gave up on hosting our email and website at on-rev.com 
<http://on-rev.com/> back when they were having lots of reliability problems. 
We're using a host in Japan; no LC server installed, nor is it installable.

I still have our Founder's account on on-rev.com <http://on-rev.com/>, and use 
quite a few .lc scripts, calling them from iframes in web pages hosted on the new 
host.

Our radio programs' mp3 files are stored on the new host. I want one of my scripts on 
on-rev.com <http://on-rev.com/> to get the directory listing of the mp3 files 
on the new host. The ftp command from LC tutorials works fine from LC desktop 
(Community edition, Mac) to get the filelist:
put url "ftp://user:p...@domain.com/folder/ 
<ftp://user:p...@domain.com/folder/>" into myVariable

Put when I call it from the server .lc script on on-rev, the result is:
error Failed to connect to gmoserver.jp <http://gmoserver.jp/> port 21: 
Connection refused

(gmoserver.jp <http://gmoserver.jp/> is our new host here in Japan.)

Any ideas why the connection would be refused when coming from on-rev, but not 
LC desktop? Anyways around this?

Thanks in advance.

Tim Selander
Tokyo, Japan




___
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

Sending an FTP command from one web server to another?

2017-07-18 Thread Tim Selander via use-livecode

Hi,

My company gave up on hosting our email and website at on-rev.com back 
when they were having lots of reliability problems. We're using a host 
in Japan; no LC server installed, nor is it installable.


I still have our Founder's account on on-rev.com, and use quite a few 
.lc scripts, calling them from iframes in web pages hosted on the new host.


Our radio programs' mp3 files are stored on the new host. I want one of 
my scripts on on-rev.com to get the directory listing of the mp3 files 
on the new host. The ftp command from LC tutorials works fine from LC 
desktop (Community edition, Mac) to get the filelist:

put url "ftp://user:p...@domain.com/folder/; into myVariable

Put when I call it from the server .lc script on on-rev, the result is:
error Failed to connect to gmoserver.jp port 21: Connection refused

(gmoserver.jp is our new host here in Japan.)

Any ideas why the connection would be refused when coming from on-rev, 
but not LC desktop? Anyways around this?


Thanks in advance.

Tim Selander
Tokyo, Japan





___
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: Goofy question #7234

2017-07-10 Thread Tim Selander via use-livecode

Hi Richmond

This works (both scripts in the button):
on mouseUp
put goRed()
end mouseUp

function goRed
set the backGroundColor of card 1 to red
end goRed

I think the general idea is that a function returns information. So 
date() returns the date. But just having a line "date()" in the script 
causes an error because you haven't told it what to do with the info 
being returned. So you need "put data()" and then the info will go to 
the message box.


Your function doesn't return any data. That's your choice when you write 
it. But the engine is still expecting a function to return info, so you 
still have to say "put" trigger the function.


You could write your function with a parameter:
function goRed foo
set the backGroundColor of foo to red
end goRed

Then call the function like this:
put goRed("card 1")
put goRed("card 3")
etc., and the one function can be used to turn both card 1 and card 3 
(and any other object you specify in foo) red.


Hope that helps.

Tim Selander
Tokyo, Japan





On 7/10/17, 15:48, Richmond Mathewson via use-livecode wrote:

I am obviously missing something . . .

. . . so badly so that I've been trawling Danny Goodman's "Complete" 
HC 2 . . .


and NOT getting 'it' . . .

SO: one can set up a custom command:

on GoRed
  set the backGroundColor of card 1 to red
end GoRed

and one can call it:

on mouseUp
   do GoRed
end mouseUp

and one can set up a custom function:

function GoRed
  set the backGroundColor of card 1 to red
end function

Now: is the reason I cannot call that function because it takes NO 
parameters?


Richmond.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: IP to decimal function?

2017-05-15 Thread Tim Selander via use-livecode
OK, this "master library" is new info to me! Googled it, found a brief 
reference and download link in the forums. Will now have a look at it!


Tim Selander
Tokyo, Japan


On 2017/05/16 0:01, Bob Sneidar via use-livecode wrote:

I wrote something of the sort called IPCalc. It should be in the master library.

Bob S



On May 13, 2017, at 22:25 , Tim Selander via use-livecode 
<use-livecode@lists.runrev.com> wrote:

Hi

I need to convert IP address from web logs to decimal for easier processing...

Before I try to "reinvent the wheel" (and no doubt roll off a cliff) I'm 
wondering if anyone already has such a function they'd be willing to share?

TIA

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: IP to decimal function?

2017-05-14 Thread Tim Selander via use-livecode

Hi Richmond,

Thanks for your stack! Wow!  I'm in the process of testing and 
'function-fying' it.


I did google around and found pages like your java link... but my 
arithmetic skills are so basic, it all just looked like, well, 
Sanskrit..  ;-)


Tim Selander
Tokyo, Japan

On 2017.05.14, 17:02, Richmond Mathewson via use-livecode wrote:

I almost never know anything, but I do know where to look to find
out:

https://www.mkyong.com/java/java-convert-ip-address-to-decimal-number/


Hope that spoils your Sunday :)

Richmond.

On 5/14/17 8:25 am, Tim Selander via use-livecode wrote:

Hi

I need to convert IP address from web logs to decimal for
easier processing...

Before I try to "reinvent the wheel" (and no doubt roll off a
cliff) I'm wondering if anyone already has such a function
they'd be willing to share?

TIA

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


IP to decimal function?

2017-05-13 Thread Tim Selander via use-livecode

Hi

I need to convert IP address from web logs to decimal for easier 
processing...


Before I try to "reinvent the wheel" (and no doubt roll off a 
cliff) I'm wondering if anyone already has such a function they'd 
be willing to share?


TIA

Tim Selander
Tokyo, Japan

___
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: Messages sent while mouse is down?

2017-03-11 Thread Tim Selander via use-livecode
Yes, that had occurred to me, but my explanation was too 
simplistic. While it is a Scrabble-esque game with tiles, the 
tiles are hexagons and are staggered on the board. (pic-- 
http://tinyurl.com/jjcqolm)


That still might be calculate-able, but is beyond my math skills!

Thanks,

Tim

On 2017.03.12, 10:00, Mike Bonner via use-livecode wrote:

If the names of the tiles are numbered in a logical way, and only go
horizontal, and vertical, then all you need to know is the start spot, and
the end spot, and can fill in the gaps between.


On Sat, Mar 11, 2017 at 4:06 PM, Quentin Long via use-livecode <
use-livecode@lists.runrev.com> wrote:


sez Tim Selander <selan...@tkf.att.ne.jp>:

I miss the Zynga "Pathwords" game on Facebook, so for my own
amusement I'm trying to recreate it in Livecode.

For those who don't know the game, it had a solid screenful of
Scrabble-like lettered tiles. Click and drag the mouse through
adjacent letters to make words.

Without clicking, simply moving the mouse through the tiles
(fields) triggers mouseenter, mouseleave, etc. which makes it
easy to pick up the letters.

But when the mouse is down, it seems mouseloc() is the only thing
I can get. Using a variable what has all the field rectangles, I
can use the mouseloc() to ultimately identify the field under the
pointer, but it's too slow...

Does a moving mouse with the button down trigger any other
messages besides mouseloc()?

I see that Mike Bonner has already provided a solution which seems to do
what you want. But just in case there are other people out there who might
need a different solution, here's my stab at it…

If you have a "screenful of Scrabble-like lettered tiles", these "tiles"
are presumably arranged in a rectangular grid, with neatly aligned rows and
columns. If this is the case, the locations of the row-tiles are going to
be separated by X number of pixels, such that row-tile 1 has X-coördinate
A; row-tile 2 has X-coördinate (A + X); row-tile 3 has X-coordinate (A +
2*X); and so on.

Column-tiles will work similarly. Their locations will be separated by Y
number of pixels, such that column-tile 1 has Y coördinate B; column-tile 2
has Y coördinate (B + Y); column-tile 3 has Y coördinate (B + 2*Y); and so
on.

If the grid's horizontal spacing is identical to its vertical spacing, the
separation-values X and Y will be the same, of course. Given the fact that
pixels are not *necessarily* square, it would be imprudent to *assume* that
the grid's horizontal and vertical separation-values are identical, and I
will not make that assumption here.

So.

My solution to Tim Selander's problem completely ignores most of the
mouse[whatever] messages, depending strictly on mouseLoc. Like so:

local dX = 25 -- if the horizontal-spacing value is not 25, put the real
value here
local dY = 25 -- again, replace 25 with the real value as needed
local TimeSlice = 50 -- how often, in milliseconds, the code checks the
mouseLoc. adjust as needed for response time
local GridLocPulse

global GridCell = "1,1"

on GridLoc
   if (GridLocPulse) then send GridLoc to me in TimeSlice milliseconds
   put the mouseLoc into ThisLoc
   put (1 + (item 1 of ThisLoc div dX)) into item 1 of GridCell -- may need
tweaking to account for edge effects
   put (1 + (item 2 of ThisLoc div dY)) into item 2 of GridCell -- ditto
end GridLoc

on GridLocOn
   put true into GridLocPulse
   GridLoc
end GridLocOn

on GridLocOff
   put false into GridLocPulse
end GridLocOff

The above code can go into the script of the card where the tile-grid
lives.

Once every (TimeSlice) milliseconds, this code looks at the mouseLoc and
converts the mouse coördinates into grid coördinates, which are stored in
the global variable GridCell. GridCell being a global, its contents should
be accessible to any handler in any script which includes the line "global
GridCell".

It's probably a good idea to *not* have the GridLoc handler burning
clock-cycles *all the time*. Thus, the local variable GridLocPulse, and the
subsidiary handlers GridLocOn and GridLocOff. GridLocOn activates the
GridLoc handler, and GridLocOff turns GridLoc off.

Hope this helps…


"Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length"

Read the webcomic at [ http://www.atarmslength.net ]!

If you like "At Arm's Length", support it at [ http://www.patreon.com/
DarkwingDude ].

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___

Re: Messages sent while mouse is down?

2017-03-11 Thread Tim Selander via use-livecode

Oh ho!

That does it, Mike. Many thanks!

Tim

On 2017.03.11, 18:35, Mike Bonner via use-livecode wrote:

accidental send before complete. *sigh*

on mousemove
put 1 & cr & 2 into objectList -- just using control number for the
quick example
if the mouse is down then
   repeat for each line tLine  in objectList
  if within(control tLine,the mouseloc) then
 put tLine into tResult
 exit repeat
  end if
   end repeat
end if
if tResult is not empty then
   put tResult
else
   put "no result"
end if
end mousemove

On Sat, Mar 11, 2017 at 2:30 AM, Mike Bonner <bonnm...@gmail.com> wrote:


mousemove works.  It does appear that "mousecontrol" doesn't fire when the
mouse is down so that is out.

You can also use "within" which is pretty fast.

Have a variable with a list of the objects you wish to check against (or
array, or whatever)
on mousemove

if the mouse is down then

repeat for each line tLine  in objectList

if within(tLine,the mouseloc) then
put tLine into tResult
  exit repeat
end repeat

end if
if tResult
end mousemove

On Sat, Mar 11, 2017 at 1:02 AM, Tim Selander via use-livecode <
use-livecode@lists.runrev.com> wrote:


I miss the Zynga "Pathwords" game on Facebook, so for my own amusement
I'm trying to recreate it in Livecode.

For those who don't know the game, it had a solid screenful of
Scrabble-like lettered tiles. Click and drag the mouse through adjacent
letters to make words.

Without clicking, simply moving the mouse through the tiles (fields)
triggers mouseenter, mouseleave, etc. which makes it easy to pick up the
letters.

But when the mouse is down, it seems mouseloc() is the only thing I can
get. Using a variable what has all the field rectangles, I can use the
mouseloc() to ultimately identify the field under the pointer, but it's too
slow...

Does a moving mouse with the button down trigger any other messages
besides mouseloc()?

Thanks,

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Messages sent while mouse is down?

2017-03-11 Thread Tim Selander via use-livecode
I miss the Zynga "Pathwords" game on Facebook, so for my own 
amusement I'm trying to recreate it in Livecode.


For those who don't know the game, it had a solid screenful of 
Scrabble-like lettered tiles. Click and drag the mouse through 
adjacent letters to make words.


Without clicking, simply moving the mouse through the tiles 
(fields) triggers mouseenter, mouseleave, etc. which makes it 
easy to pick up the letters.


But when the mouse is down, it seems mouseloc() is the only thing 
I can get. Using a variable what has all the field rectangles, I 
can use the mouseloc() to ultimately identify the field under the 
pointer, but it's too slow...


Does a moving mouse with the button down trigger any other 
messages besides mouseloc()?


Thanks,

Tim Selander
Tokyo, Japan

___
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: Cancelling a script??

2017-02-10 Thread Tim Selander via use-livecode

Mike, that did the trick. I'll get into the same coding habit.

Thanks!

Tim Selander
Tokyo, Japan

On 2017.02.11, 0:09, Mike Bonner via use-livecode wrote:

If the loop is tight enough, the keypress never gets through.  I've just
got into the habit of putting an escape hatch into loops that can go wrong.
Something like:
if the environment is "development" and the shiftkey is down then exit to
top
(or if you want the user to have access to the same exit, don't check for
the environment)

Then all you have to do is hold shift and the loop will exit.

On Fri, Feb 10, 2017 at 8:00 AM, Tim Selander via use-livecode <
use-livecode@lists.runrev.com> wrote:


The documentation says Cmd + . should stop a running script.

I haveset the allowinterrupts to true  in my openstack script. But if
I get into a long repeat loop, cmd + . does not stop anything.

Community v8.1, OSX 10.9.

Any advice appreciated.

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Cancelling a script??

2017-02-10 Thread Tim Selander via use-livecode

The documentation says Cmd + . should stop a running script.

I haveset the allowinterrupts to true  in my openstack 
script. But if I get into a long repeat loop, cmd + . does not 
stop anything.


Community v8.1, OSX 10.9.

Any advice appreciated.

Tim Selander
Tokyo, Japan

___
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: Using LC server to check for existence of mp3 on our web server?

2017-01-22 Thread Tim Selander via use-livecode
Phil and Mike, Thanks for your pointers -- both look like they 
will work. Also in continuing to poke around the web, I also 
found this function that works:


function qrtHTTP_FileExists pURL
breakpoint
  local tSocket, tPath, tHeaders, tCommand
  set the itemDelimiter to "/"
  -- extract host IP address and file path from the URL
  put item 3 of pURL into tHost
  if tHost contains ":" then
put tHost into tSocket
  else
put tHost & ":80" into tSocket
  end if
  put "/" & item 4 to -1 of pURL into tPath
  -- build the command
  put "HEAD" && tPath && "HTTP/1.1" into tCommand
  -- build the http headers
  put "Connection: Close" & CRLF & \
  "Host:" && tHost & CRLF & \
  "User-Agent: Revolution (" & the version & ")" into tHeaders
  -- open the socket, write he request and read the response
  open socket tSocket
  write tCommand & CRLF & tHeaders & CRLF & CRLF to socket tSocket
  read from socket tSocket until CRLF
  put word 2 of it into tResultCode
  close socket tSocket
  -- return our interpretation of the result code
  return (tResultCode = 200)
end qrtHTTP_FileExists

It's working for me but now I can't re-find it so I can't 
credit whoever wrote it!


Copying here for posterity!

Tim Selander
Tokyo, Japan


On 2017.01.22, 19:09, Mike Bonner via use-livecode wrote:

If you have php on your second server, and don't have lc, you can do a
check with php similar to what you're talking about.  This is untested but..

If you have the following php file (perhaps named checkforfile.php) on the
alternate server, and send it a get request containing the path to the file
youre looking for, it will return true or false if it exists.  This is
obviously an extremely bare example.  You'd want to make sure the get
contains "myfile" and handle that too, as well as any other issues.   In
addition, you would probably want to limit the requests to only allowed
areas and file types in the php script.



From the lc side of things you could do something like this..


http://your.alternateserver.com/checkforfile.php?myfile=theFile.mp3;
if it is true then
   put "http://my.programserver.com/theFile.mp3>"
   else
   put "program not found."
   end if
?>

Of course if you DO have lc on the program server you can do the same type
of check and "put" true or false just like you did with php.  (Also can be
done with javascript, asp, etc)
On Sun, Jan 22, 2017 at 2:16 AM, Phil Davis via use-livecode <
use-livecode@lists.runrev.com> wrote:


Hi Tim,

Here is a very simplistic way of checking for a file on your server. It
assumes your mp3 files are in a 'programs' folder that resides in the
'document root' folder. This script as it is here would be in a .lc file on
your server. You pass it a filename in the url and it tells you if the file
is in the programs folder or not.

So the url would look something like this:

http://my.programserver.com/check.lc?1234.mp3


The text of the 'check.lc' file:






This is most likely not exactly what you need, but maybe it'll give you a
starting point.

Thanks -
Phil Davis



On 1/21/17 11:36 PM, Tim Selander via use-livecode wrote:


Hi,

On-rev.com hosting, using LC server to present a list of our AM/FM radio
programs for people to listening to on-demand.

Out of a month's 20 programs, 3 or 4 might not get uploaded due to
copyright issues, etc. Also, mp3's are not on the on-rev.com server, but
another hosting service we use as well.

Filenaming is standardized, so I know the list of programs. I want to hit
the server, if the mp3 files exists, present it as an http://lists.runrev.com/mailman/listinfo/use-livecode



--
Phil Davis


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Using LC server to check for existence of mp3 on our web server?

2017-01-21 Thread Tim Selander via use-livecode

Hi,

On-rev.com hosting, using LC server to present a list of our 
AM/FM radio programs for people to listening to on-demand.


Out of a month's 20 programs, 3 or 4 might not get uploaded due 
to copyright issues, etc. Also, mp3's are not on the on-rev.com 
server, but another hosting service we use as well.


Filenaming is standardized, so I know the list of programs. I 
want to hit the server, if the mp3 files exists, present it as an 
program not available" message.


If I wanted to check on the existence of a small text file, it 
would be fast enough for me to just get it, put it into a 
variable and see if the variable has anything in it. But mp3's 
are too big, so too slow.


Locally, I would simply write "if there is a file 'filename'..." 
 -- what's the equivalent command for checking on existence of a 
file on a server?


Thanks in advance.

Tim Selander
Tokyo, Japan







___
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: SSL?

2016-12-26 Thread Tim Selander
Ah, there it is! Have sent an enquiry to sales. Thanks for the pointer, 
Dave.


Tim

On 2016/12/26 8:54, Dave Kilroy wrote:

if you log in to your LiveCode account, click on ‘Hosting’ and then scroll down 
you should see it listed...



___
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 Server: Getting a file list when filenames use UTF8

2016-10-18 Thread Tim Selander

Good news!

Thanks, Lyn.

Tim Selander
Tokyo, Japan

On 2016/10/18 18:22, Lyn Teyla wrote:

I opened a bug report in August concerning this issue:

http://quality.livecode.com/show_bug.cgi?id=18202

Lyn



Tim Selander wrote:

Thanks for confirming that for me Ralf.

I wonder if the team can look into this

Tim Selander
Tokyo, Japan

On 2016/10/17 20:02, Ralf Bitter wrote:

Seems that I can confirm your findings.
Did a test on diesel using server version 8.1.1-rc-2.
If there is a file "こんにちは.txt" the file list retrieved
is empty. To get a file list I have to remove the
Japanese file.


Ralf



On 17.10.2016, at 10:21, Tim Selander <selan...@tkf.att.ne.jp> wrote:

Hi,

Using LC server as installed in my on-rev account.

This script


Only returns files with English filenames to the resulting web page. Japanese 
(utf8) filenames are ignored. If I change one of the Japanese filenames to 
English, then it appears. If I change it back to Japanese, it reverts to not 
appearing.

Any hints?

Thank you.

Tim Selander
Tokyo, Japan



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server: Getting a file list when filenames use UTF8

2016-10-18 Thread Tim Selander

Thanks for confirming that for me Ralf.

I wonder if the team can look into this

Tim Selander
Tokyo, Japan

On 2016/10/17 20:02, Ralf Bitter wrote:

Seems that I can confirm your findings.
Did a test on diesel using server version 8.1.1-rc-2.
If there is a file "こんにちは.txt" the file list retrieved
is empty. To get a file list I have to remove the
Japanese file.


Ralf



On 17.10.2016, at 10:21, Tim Selander <selan...@tkf.att.ne.jp> wrote:

Hi,

Using LC server as installed in my on-rev account.

This script


Only returns files with English filenames to the resulting web page. Japanese 
(utf8) filenames are ignored. If I change one of the Japanese filenames to 
English, then it appears. If I change it back to Japanese, it reverts to not 
appearing.

Any hints?

Thank you.

Tim Selander
Tokyo, Japan



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

LC Server: Getting a file list when filenames use UTF8

2016-10-17 Thread Tim Selander

Hi,

Using LC server as installed in my on-rev account.

This script


Only returns files with English filenames to the resulting web page. 
Japanese (utf8) filenames are ignored. If I change one of the Japanese 
filenames to English, then it appears. If I change it back to Japanese, 
it reverts to not appearing.


Any hints?

Thank you.

Tim Selander
Tokyo, Japan

___
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: Japanese (unicode?) text problem

2016-09-20 Thread Tim Selander

Hi Nicolas,

Finally something I can answer!

I have found that you need to use 'open file' because that let's you 
specify the file's encoding.


Assume the path to your file is in tFile, these lines should work:

  open file tFile for utf8  read
  read from file tFile until end
  put it into fld "indices"
  close file tFile

If there is a more elegant way, I'm sure the pros will chime in!

Tim Selander
Tokyo, Japan


On 2016/09/21 13:30, Nicolas Cueto wrote:

​With Notepad++​, created a new file, pasted English and Japanese text, set
encoding to UTF-8,  then saved as .txt. (Confirmed the file by opening with
Windows' "Notepad".)

Next, in LC8.1 ran this button script:

on mouseUp
put empty into field "indices"
set the itemdel to quote
put item 2 of the long name of this stack into tDataPath
set the itemdel to "/"
delete the last item of tDataPath
put "/Data/bilingual.txt" after tDataPath
put "file:" & tDataPath  into tURL
put url tURL into field "indices"
end mouseUp

The text appears in the field, but with Japanese text garbled.

What am I doing wrong?

Thanks.

--
Nicolas Cueto
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: System date

2016-09-06 Thread Tim Selander
This thread has been instructive, as I've had the same grief as Antti. 
I've been using dateItems for all my date stuff, and reconstructing my 
own Japanese dates.


However, I didn't know about the useSystemDate command. It's working 
great here. Mac OS10.11.5, system running in Japanese, LC 8.0.2 
community edition.


This info doesn't help Antti much, though sorry. But thanks for 
asking the question!


Tim Selander
Tokyo, Japan

On 2016/09/07 14:02, Antti Ilola wrote:

Then maybe I have problems on my machines( MacBook Pro 2007 and iMac 2010),
because I have used different version of MacOs's  and different versions of
Livecode and both of your scripts and the answer is all the same - english
date. My computers primary language is Finnish.

Regards
Antti

2016-09-06 21:36 GMT+03:00 Richmond <richmondmathew...@gmail.com>:


You should have taken a bit longer to read the documention, this:

on mouseUp
set the useSystemDate to true
put the long date into fld "fDATE"
end mouseUp

returned this:

вторник, септември 6, 2016

as I am using a machine running Xubuntu 16.04 64-bit with the system date
system running
in Bulgarian - mainly because I live and work on Bulgaria.

Richmond.


On 6.09.2016 20:21, Antti Ilola wrote:


Is it the time to you to get the system date work.I have done everything I
found your guide, but no avail, every time english date. I made it a bug
report since version 6 was announced. and still it doesn't work. Now I'm
using Mac OS 10.10 and 10.11 in Finnish. Today I tired SperCard for fun
and
even it I got finnish date without any larger measures, just "answer the
date" and that's it. And it is not the only software which understands the
finnish date, for example Xcode and Xojo knows how it should be display.
You made many wondrous things into your software, but simple as date won't
work. I think there are many people in this world who use different date
form than english.

Antti
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: The Joy of Removing Features - Part 2: Finding / removing duplicate files / photos.

2016-08-18 Thread Tim Selander

Very enlightening. Thanks for taking the time to share this with us.

Tim Selander
Tokyo, Japan

On 2016/08/19 8:20, Alex Tweedly wrote:


Part 2 of a 4-part series on developing simple apps for photo management
and viewing.

[ previously ... Part 1 described the justification and development of a
very simple photo viewing app ]

The next issue to deal with is the run-away number of photos, and the
amount of disk space taken up by them. I strongly suspect that is at
least partly due to my casual (some would say "disorganized") approach
to managing the photos, and the multiple computers they originated from
and are kept on (my desktop, laptop, daughter's laptop, back-up disks,
safe copies on other external drives, USB drives previously used to
store / transfer folders of photos, etc.)

So the next step is to find and eliminate (or at least reduce)
duplicated photos. Of course, I could simply Google "remove duplicate
photos mac" and follow some of the 382,000 resulting links - but where's
the fun in that :-)

At least some of those apps do, or claim to do, amazing things - find
different resolution or different quality versions of the same photo,
etc. - but I don't feel a need to look for those; I just need, initially
at least, to find the simple, exact duplicates.  To give some context, I
have been using a sample subset of 16,000 out of my approx 55,00 photos;
these are mostly low/med resolution (i.e. iPhone or old digital camera
JPEGs, between 200Kb and 1.5Mb each). However. my new camera is rather
more resource-hungry (JPEGs are 24Mb or so - hence the urgency to
actually implement some of these ideas that I have been kicking around
for a long time :-)

I have a variety of schemes in mind to speed up the process, though each
of them needs to be verified for effectiveness, or indeed necessity.

The basic outline *was*

1. walk through to collect all folder names (i.e. the complete tree(s)
within the folder(s) specified by the user)

2. visit each folder in turn to collect details of all (relevant) files
- with optimizations for folders/files that haven't changed since the
info was previously collected

3. partition the files by size; and then reduce the list of files to the
potential duplicates

4. further reduce by file signature (i.e. a small sample of say 12 bytes
from pre-specified locations)

5. get the md5hash of remaining files, and look for duplicates

6. present the data to the user (!?)

However, some simple benchmarking suggested that this was unnecessarily
complicated - i.e. I can again remove features, even before they have
been specified or implemented. The task of detecting and avoiding
redundant work in step 2a is not terribly complicated - but it's
definitely the most brain-taxing part of the whole problem - and in any
case, won't apply to the first time the app is used. So that part can be
delayed at least until I find out how slow the process is - i.e.
hopefully forever.

The need for using MD5 hashes, rather than simply comparing the files
completely is also questionable. It turns out that calculating an MD5
hash of a file takes roughly 10x as long as comparing that file to
another identical one (i.e. the worst case for comparison - comparing to
a differing file would complete more quickly). So step 5 can also be
delayed (or avoided) until we determine how often it is likely we will
be matching larger sets of files.

Similarly, step 4 can be delayed (or avoided) until we see how well the
file size works as a partition - and it turns out to do a good job.

Of the 16,073 files, there are 14652 different sizes; of these, 1400
sizes have 2 matching files while 10 sizes have 3 files, and the
remainder have only a single file.

And it turns out that all 1410 of those are genuine duplicates - i.e.
there are no cases of files which have the same size without actually
being the same; therefore size is a very effective discriminator for
photo files.
Even better - running this simplified algorithm on my 16,000 sample
takes about 20 seconds on my aging Macbook Pro. So I can indeed
eliminate all those extra features in steps 2a, 4 and 5.

Part 3 of this series will describe what I did for step 6 above - i.e.
how to present this data to the user, how to make it easy to eliminate
any duplicates found and how to not make it easy to inadvertently delete
files you shouldn't.

Part 4 will (probably) describe an app for removing uninteresting photos.

And Part 5 will (perhaps) describe whether or how I found it necessary
to improve the image viewer app described in part 1. The increase in
average file size from 0.5 Mb to 24 Mb means that the time to transition
from one photo to the next has gone from "feels instant" to "hmmm, feels
fairly quick". I'll decide from using the app regularly over the next
week or two whether "fairly quick" is good enough, or whether it's worth
implementing pre-caching for the adjacent photo(s) to get back the
"instant&q

Re: opening utf8 text file

2016-06-15 Thread Tim Selander

The hyphen and the quotes made it work.

Many thanks, Dar!

Tim

On 2016/06/16 11:10, Dar Scott wrote:

The encoding names are found with textEncode and textDecode.  There you can see the name 
needs a hyphen.  Try "UTF-8".  (You can also open the file for binary or use 
binfifle: and then use textDecode.)


On Jun 15, 2016, at 7:54 PM, Tim Selander <selan...@tkf.att.ne.jp> wrote:

LC 8, Dictionary says it can be done, but does not give a sample. No syntax 
I've tried works.

How do you open a file encoded in UTF8?

open file  for UTF8 read

does not work.

Thanks.

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


opening utf8 text file

2016-06-15 Thread Tim Selander
LC 8, Dictionary says it can be done, but does not give a sample. No 
syntax I've tried works.


How do you open a file encoded in UTF8?

open file  for UTF8 read

does not work.

Thanks.

Tim Selander
Tokyo, Japan

___
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: Getting a framegrab of the video in a player

2016-05-28 Thread Tim Selander

Found the old stack!

FWIW, assuming some future person needs the same thing,

 export snapshot from player 1 to file (variable for path) & 
the currenttime of player 1 & ".jpg" as JPEG


And then I re-imported the jpeg into a datagrid

Tim Selander
Tokyo, Japan

On 2016.05.28, 22:01, Paul Dupuis wrote:

On 5/28/2016 8:46 AM, Tim Selander wrote:

Hi,

Once upon a time I am almost positive that I could grab a screenshot
of the current video frame in a player, and paste it into a scrolling
field.

But I've forgotten how, and no scouring of the dictionary or google
help. Can anyone tell me how it's done?

many thanks.



The only way I have found is using "export snapshot" from the player
object. You first want to lock the screen and hide the controller though
so you only get the current frame. if the player border is an issue, use
the 'from rect' form of export snapshot with the player's rect less the
borderWidth on all sides.



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Getting a framegrab of the video in a player

2016-05-28 Thread Tim Selander

Hi Paul,

Thanks. That seems to work... putting it into a text fld results 
in the gibberish I'd expect from a jpeg in ascii form. Putting it 
into an image object shows the QT player frame and controls, but 
not the video frame itself...


Exporting to a file, a la the dictionary, didn't seem to do 
anything. No error reported, but no file made either.


Anyway, progress!

Tim

On 2016.05.28, 22:01, Paul Dupuis wrote:

On 5/28/2016 8:46 AM, Tim Selander wrote:

Hi,

Once upon a time I am almost positive that I could grab a screenshot
of the current video frame in a player, and paste it into a scrolling
field.

But I've forgotten how, and no scouring of the dictionary or google
help. Can anyone tell me how it's done?

many thanks.



The only way I have found is using "export snapshot" from the player
object. You first want to lock the screen and hide the controller though
so you only get the current frame. if the player border is an issue, use
the 'from rect' form of export snapshot with the player's rect less the
borderWidth on all sides.



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Getting a framegrab of the video in a player

2016-05-28 Thread Tim Selander

Hi,

Once upon a time I am almost positive that I could grab a 
screenshot of the current video frame in a player, and paste it 
into a scrolling field.


But I've forgotten how, and no scouring of the dictionary or 
google help. Can anyone tell me how it's done?


many thanks.

Tim Selander
Tokyo, Japan

___
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: Default tool on open stack

2016-04-12 Thread Tim Selander

Aha! That makes sense. The IDE is un-doing the command...

OK, not a bug -- just a quirk. ;-)

Tim Selander
Tokyo, Japan

On 16/04/13 1:13, J. Landman Gay wrote:

On April 12, 2016 8:27:15 AM Tim Selander <selan...@tkf.att.ne.jp> wrote:


However, after reading some of the various other comments,
including Jacqueline's here, it strikes me that this has to be
considered some kind of bug, doesn't it?

A valid command (choose browse tool) in a valid handler
(openstack) does not work!?


I'm not sure it's actually a bug. The command does work, but the IDE
chooses the edit tool late in its startup sequence, which undoes the
earlier command.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Default tool on open stack

2016-04-12 Thread Tim Selander

Hi again,

Basically, my problem is solved with Peter's work-around. 
However, after reading some of the various other comments, 
including Jacqueline's here, it strikes me that this has to be 
considered some kind of bug, doesn't it?


A valid command (choose browse tool) in a valid handler 
(openstack) does not work!?


Tim Selander
Tokyo, Japan

On 2016/04/12, 9:50, J. Landman Gay wrote:

It works if you send the instruction a few milliseconds after
opencard finishes. Basically the whole IDE has to be done with
its stuff first.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com



On April 11, 2016 6:43:23 PM Roger Guay <i...@mac.com> wrote:


That does not work for me in v 7.1.2 but I wish it did!! I
think this should be a LC Preference setting.


Roger




On Apr 11, 2016, at 4:23 PM, Peter Bogdanoff
<bogdan...@me.com> wrote:

What I do is—in the openStack handler I place:

if the environment is "development" then
 choose browse tool
end if

Seems to be reliable.

Peter Bogdanoff
UCLA

On Apr 11, 2016, at 4:17 PM, Tim Selander
<selan...@tkf.att.ne.jp> wrote:


When I open a stack, in v7 or v8, it always comes up with the
Edit Tool chosen.

In the openstack handler (stack script) and opencard handler
(card script), I have "choose browse tool" but it has no effect.

I save the stacks with the browse tool chosen, and quit.

Re-open and the Edit tool is active.

Why???

Any help appreciated.

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage
your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage
your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Default tool on open stack

2016-04-11 Thread Tim Selander

Hi!

That worked! Many thanks, Peter.

Though I agree with Roger, the default tool should be a preference 
somewhere.


I'm making little utilities to use at work, and the staff that use them 
are always befuddled when they try to click a field to enter text, but 
the whole field gets selected and pushed around the screen instead.


Tim Selander
Tokyo, Japan



On 16/04/12 8:23, Peter Bogdanoff wrote:

What I do is—in the openStack handler I place:

  if the environment is "development" then
   choose browse tool
end if

Seems to be reliable.

Peter Bogdanoff
UCLA

On Apr 11, 2016, at 4:17 PM, Tim Selander <selan...@tkf.att.ne.jp> wrote:


When I open a stack, in v7 or v8, it always comes up with the Edit Tool chosen.

In the openstack handler (stack script) and opencard handler (card script), I have 
"choose browse tool" but it has no effect.

I save the stacks with the browse tool chosen, and quit.

Re-open and the Edit tool is active.

Why???

Any help appreciated.

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Default tool on open stack

2016-04-11 Thread Tim Selander
When I open a stack, in v7 or v8, it always comes up with the Edit Tool 
chosen.


In the openstack handler (stack script) and opencard handler (card 
script), I have "choose browse tool" but it has no effect.


I save the stacks with the browse tool chosen, and quit.

Re-open and the Edit tool is active.

Why???

Any help appreciated.

Tim Selander
Tokyo, Japan

___
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: Programmatically determine the average greyscale

2016-02-20 Thread Tim Selander
Would it be better to do what we do in the video world? Put a 
black edge on the "Realm of Knowledge" text. Any video editor can 
do that, but you can fake a reasonable fascimile put using the 
text twice, in layers. Top layer is the text in white. Bottom 
layer in black. Shift the black text down and to the right a 
couple of pixels. Puts a black edge on the bottom-right of the 
white text. Improves readability. You can even blur the black 
text a bit to make the effect a bit more subtle.


Tim Selander
Tokyo, Japan

On 2/20/16, 11:32, Sannyasin Brahmanathaswami wrote:


HH You are right of course. one pixel was an expediency and certainly does not 
cover all cases. In fact it is a rather weak algorithm as you can see here:

https://www.evernote.com/l/ABHZ6MzemNNJY6SXFJ3HTMb7afCnCElhYfE

the text field crosses a blown out highlight (white hair) over to a dark 
background.

in a case like this a midtone is usually all one can decide on. in this case

220,220,220

at

200,200,200

we start to hit the same level as the background. in this particular photo:

https://www.evernote.com/l/ABFY-T8OCqNDYK4QOed3qr0G6GfqZUXWjEo

For this particular context I'm actually happy with the "homeKey" field being 
subdued.

but in other cases one wants a stronger presence

https://www.evernote.com/l/ABE267idXlBHrY4Xs4ND27ziH1UjmGtU-eY

Musings:

A random algorithm also does not help us out either.

In this "FlipBoard" model/copy-cat (which is what I'm aiming for in V1) image 
will be dynamically replaced on every return to the same card, not only per session, but 
even if the user just leaves the card and returns.

"Only God will know for sure" what the luminance of the background will be under the 
field, because I'll be dynamically adding more and more images in the category over time... if we 
want to get really "manic" (your term ha!) we could write an analyzer to scan every pixel 
across the whole area underneath the field. but I worry this will take up so much CPU time, 
especially on Android that it will delay rendering the card.

In print we often decide to put a background frame behind the type and change 
the opacity of the area to give some weight to the background, but on these 
small mobile spaces, that just adds more noise to the design

I may settle finally on 200,200,200 for all and forget the attempt to analyze the 
background... though it was a very useful exercise and I have other context where I can 
and will use this new "skill"

FlipBoard uses white and I guess they must have a staff of 50 people who curate 
every image and crop to make sure there is dark matter underneat their type...

"not gonna happen here"

BR

On February 19, 2016 at 11:05:52 AM, [-hh] 
(h...@livecode.org(mailto:h...@livecode.org)) wrote:


BR,

you do estimate the luminance of a 120x175 = 21000 px region
on base of the evaluation of ONE single deterministic pixel?

Accepted, of course, but then it may be better, from a
probabilistic point of view, not to take "the" pixel (40,40)
but *any* randomly chosen pixel of that region.

You could do for that:

set randomseed to (char -8 to -1 of the millisecs)
put 19+random(120) into pX ; put 19+random(175) into 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



___
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: Charset problems with .lc web page

2016-01-05 Thread Tim Selander

Hi Peter,

Thanks for the tip. However, it didn't seem to do anything for 
me. According to the trick Alex told me about getting the server 
version, the On-rev account I'm using has livecode-server-6.6.2 
installed.


FWIW, Kojima-san's tip worked great; it's in another post in this 
thread.


Appreciate everyone's help with this!

Tim Selander
Tokyo, Japan


On 1/4/16, 20:39, Peter TB Brett wrote:

On 24/12/2015 07:55, Tim Selander wrote:
> Dear list,
>
> I'm having trouble making a .lc web pages correctly show the 
charset.

>
> I have two test files:
> http://www.pba.on-rev.com/5_today.lc
> http://www.pba.on-rev.com/5_today.irev
>
> They are identical except for the .lc/.irev file extensions, 
and also

> the  and  tags in the html.
>
> The .irev file correctly shows Japanese UTF8, the .lc file 
does not.

>
> Anyone else having problems with this? Can .lc files not 
handle charset

> correctly?

Hi Tim,

I think that if you put a comment like:

-- encoding: utf8

in the first line of the .lc file (or the second line if you 
have a shebang), the server engine will treat the .lc file as 
UTF-8 text rather than native text.


On the other hand, that solution might not work except in 
LiveCode 6.7 or later.  I'm not sure!


   Peter




___
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: Charset problems with .lc web page

2016-01-05 Thread Tim Selander

Kojima-san,

Thank you! Your instructions worked perfectly.

For the others:
1)   --> must be the 
first line of the .lc
2) set the outputTextEncoding to native   -->  must be the first 
line of the first  script in the file


If you put "set the outputTextEncoding to native" later in the 
script, UTF-8 above that line will be garbled; after that line it 
will show properly.


Very interesting.

Tim Selander
Tokyo, Japan



On 1/4/16, 21:06, Kenji Kojima wrote:

Tim,


The .irev file correctly shows Japanese UTF8, the .lc file does not.

I wrote about it in Japanese.
http://kenjikojima.com/basic_iRev/main/rev11.html

http://kenjikojima.com/basic_iRev/

--
Kenji Kojima / 小島健治
http://www.kenjikojima.com/



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Charset problems with .lc web page

2016-01-05 Thread Tim Selander

Hi Lyn,

When I first tried your tip, it didn't work for me. But when I looked at 
the tutorial you linked to, I saw that the


was the very first line of the .lc file, before  or anything else.

When I tried that, it worked great! I had been inserting the command:
put header "Content-Type: text/html; charset=UTF-8"
into the first line of my 
Tim Selander wrote:


1)   --> must be the first line of 
the .lc
2) set the outputTextEncoding to native   -->  must be the first line of the first 
 script in the file

If you put "set the outputTextEncoding to native" later in the script, UTF-8 
above that line will be garbled; after that line it will show properly.

This can get unnecessarily convoluted if you have to keep alternating between "native" 
and "utf-8" outputTextEncodings between different blocks of LiveCode script and HTML.

I can imagine that one would tend to forget to change the outputTextEncoding 
somewhere along the way.

Did you run into any problems with the "put header" method that I had 
suggested, where you only need to insert a single line at the top of the file?

I use the single-line solution and it works perfectly fine on many versions of 
revServer and LiveCode Server, including 3.5, 6.6.2 (the one you’re using), 
6.7.8, 7.1.1, and 8.0.0 DP 12.

This article on HostM.com also mentions the same solution. Perhaps it explains 
it better than I did:

https://www.hostm.com/tutorials/livecode/utf-8-output

Lyn



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

More questions regarding Server oddities

2015-12-25 Thread Tim Selander

I'm continuing to work on a .irev web page, with varying success.

On-Rev account, server sage, 
software:/usr/local/cpanel/cgi-sys/ireviam-engine  according to 
the tip Alex gave me earlier.


Brief description of page's function:
1) Load static .csv file from web server into a variable. This is 
a list of radio programs, the data is simply 3 items: Broadcast 
date, Program Title and Host.

2) Get today's date from the server.
3) Using the date, find today's program in variable vlist, show 
the broadcast date, the program Title, the Host.
4) Again using the date, fetch the appropriate mp3 filename from 
our web server and plug it into the audio tag's src.


Extremely simple, no css or formatting of any kind. Just trying 
to get the three items of data on the screen and load the audio 
player with the correct mp3.


Was working great, and I was plugging in test dates...

When suddenly it stopped reading in the csv file. The command is: 
put URL "http://pba.on-rev.com/ynh5list_UTF8.txt; into vlist
Instead of the data, vlist contains the html 404 page not found 
error.


But the file is there.

Copy and paste the url into the browser, and the text loads up. 
The csv file is in the very same directory as the .irev file 
(http://www.pba.on-rev.com/ynh5today.irev). Both are in the root 
of the public_html folder. But the {put URL 
"http://pba.on-rev.com/ynh5list_UTF8.txt; into vlist} command 
returns a 404 error.


Moved the csv file to two other web servers, On-Rev's deisel, and 
a Japanese web host I use.
put URL etc. using the Japanese web host also fails. (could 
not connect to server)

put URL etc. using deisel DOES WORK.

Thought maybe Safari was acting up, so tried Chrome and Firefox. 
Same problem.


I'm puzzled.
Suddently, "Put URL..." can't find the file, but the browser can.
(For what it's worth, also tried "Get URL" with same results.
Not related to browser software
Non- on-rev web server fails
Sage on-rev server fails
Deisel on-rev server succeeds (for now?)

Could this be some kind of latency problem? Is some kind of 
'wait' period needed?


Long time HC scripter, not a professional programmer....

Any tips appreciated.

Tim Selander
Tokyo, Japan

___
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: More questions regarding Server oddities

2015-12-25 Thread Tim Selander

Thanks all!

Just to re-cap, I'm having two problems on this little project. 
1) Showing UTF-8 correctly. I have "solved" this by using the 
older revolution server that On-Rev provides. 2) My text list of 
programs, from which I retrieve program title and host, suddenly 
'disappeared' as far as the script is concerned.


Tried Lyn's and Mike's suggestion to access the file directly 
(didn't know you could do that!) and it is working again!


Just in case those curious would like to see the problem, here is 
the script. It now dumps the contents of vlist; of course that 
will be cleaned up. But I will leave that script as it is now on 
the server for awhile


Not sure what will happen with linewraps, but here goes*










put "The command put URL 
'http://pba.on-rev.com/ynh5list_UTF8.txt' into vlist results 
in vlist containing this: "


put URL "http://pba.on-rev.com/ynh5list_UTF8.txt; into vlist
put vlist
put URL "binfile:ynh5list_UTF8.txt" into vlist
put vlist


--calculate date and time for Japan
put the date && the time into vdate
convert vdate to dateitems
add 8 to item 4 of vdate
convert vdate to dateitems

--If date is Sunday, change to prev Saturday (not aired on Sundays)
if last item of vdate is "1" then subtract 1 from item 3 of vdate
convert vdate to dateitems

--create a variable with the broadcast date in FileMaker format 
(program list exported from Filemaker)
put item 1 of vdate & "/" & item 2 of vdate & "/" & item 3 of 
vdate into vFMdate


--get today's program information from CSV list
put line lineoffset(vFMdate,vlist) of vlist into vtoday

--add "0" to single digit days and months
if length(item 2 of vdate) = 1 then put "0" before item 2 of vdate
if length(item 3 of vdate) = 1 then put "0" before item 3 of vdate


if vtoday is empty then
put "番組を見つかりませんでした。申し訳ありません。" into vtoday
else
put item 1 of vtoday into vHosobi
put item 2 of vtoday into vTitle
put item 3 of vtoday into vHost
replace quote with empty in vHosobi
replace quote with empty in vTitle
replace quote with empty in vHost

put "http://pba-net.com/radio/05/yono; & item 1 of vdate & "_" & 
item 2 of vdate & item 3 of vdate & ".mp3" into vfile

end if
put vHosobi & ""
put vTitle & ""
put vHost & ""
put vfile & ""

?>

 controls='' 
preload='metadata'>







Tim Selander
Tokyo, Japan





On 12/26/15, 6:52, Peter W A Wood wrote:

Lyn


On 26 Dec 2015, at 05:34, Lyn Teyla <lyn.te...@gmail.com> wrote:
6.6.2 is not the latest version of LiveCode Server.

The suggestion that I had put forth regarding the original issue was for Tim to 
perform both of the following:

1. Use the "put header" line provided;

I don’t think the problem is related to the HTTP Header. It is the same for 
both Tim’s rev page and his lc page:




and

2. Utilize any one of the latest versions of LiveCode: 6.7.8, 7.1.1 or 
8.0.0dp12.

That would indeed fix the original issue.

Tim doesn’t really have a choice over which version of the server to use with 
the On-Rev service. The version is chosen by LiveCode.

I suspect Tim will need to wait until LiveCode update the server before porting 
his scripts to .lc

Regards

Peter


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

TOO Bizarre Re: More questions regarding Server oddities

2015-12-25 Thread Tim Selander
Ok, without touching a thing in the script/.irev file, it is NOW 
once again correctly retrieving the file from On-rev's sage 
server using


put URL "http://pba.on-rev.com/ynh5list_UTF8.txt; into vlist

But it is still not retrieving the file from our Japan-based web 
host. (.irev web page file still on On-Rev, of course. Data file 
only on another server.)


So, logically, the problem must be some kind of server connection 
problem??


Which argues for continuing to use Lyn & Mike's direct access 
method... no http involved.


But it makes no sense to me. It is this kind of thing that has my 
love-hate relationship with computers tilting towards hate! What 
other industry gets away with selling us a product the 
inexplicably stops working, then starts working again? If my 
refrigerator did that, I'd dump it back on GE's doorstep and get 
my money back. :-)


Tim Selander
Tokyo, Japan

On 12/26/15, 9:35, Tim Selander wrote:

Thanks all!

Just to re-cap, I'm having two problems on this little project. 
1) Showing UTF-8 correctly. I have "solved" this by using the 
older revolution server that On-Rev provides. 2) My text list 
of programs, from which I retrieve program title and host, 
suddenly 'disappeared' as far as the script is concerned.


Tried Lyn's and Mike's suggestion to access the file directly 
(didn't know you could do that!) and it is working again!


Just in case those curious would like to see the problem, here 
is the script. It now dumps the contents of vlist; of course 
that will be cleaned up. But I will leave that script as it is 
now on the server for awhile


Not sure what will happen with linewraps, but here goes*










put "The command put URL 
'http://pba.on-rev.com/ynh5list_UTF8.txt' into vlist 
results in vlist containing this: "


put URL "http://pba.on-rev.com/ynh5list_UTF8.txt; into vlist
put vlist
put URL "binfile:ynh5list_UTF8.txt" into vlist
put vlist


--calculate date and time for Japan
put the date && the time into vdate
convert vdate to dateitems
add 8 to item 4 of vdate
convert vdate to dateitems

--If date is Sunday, change to prev Saturday (not aired on 
Sundays)

if last item of vdate is "1" then subtract 1 from item 3 of vdate
convert vdate to dateitems

--create a variable with the broadcast date in FileMaker format 
(program list exported from Filemaker)
put item 1 of vdate & "/" & item 2 of vdate & "/" & item 3 of 
vdate into vFMdate


--get today's program information from CSV list
put line lineoffset(vFMdate,vlist) of vlist into vtoday

--add "0" to single digit days and months
if length(item 2 of vdate) = 1 then put "0" before item 2 of vdate
if length(item 3 of vdate) = 1 then put "0" before item 3 of vdate


if vtoday is empty then
put "番組を見つかりませんでした。申し訳ありません。" into vtoday
else
put item 1 of vtoday into vHosobi
put item 2 of vtoday into vTitle
put item 3 of vtoday into vHost
replace quote with empty in vHosobi
replace quote with empty in vTitle
replace quote with empty in vHost

put "http://pba-net.com/radio/05/yono; & item 1 of vdate & "_" 
& item 2 of vdate & item 3 of vdate & ".mp3" into vfile

end if
put vHosobi & ""
put vTitle & ""
put vHost & ""
put vfile & ""

?>

 controls='' 
preload='metadata'>







Tim Selander
Tokyo, Japan





On 12/26/15, 6:52, Peter W A Wood wrote:

Lyn


On 26 Dec 2015, at 05:34, Lyn Teyla <lyn.te...@gmail.com> wrote:
6.6.2 is not the latest version of LiveCode Server.

The suggestion that I had put forth regarding the original 
issue was for Tim to perform both of the following:


1. Use the "put header" line provided;
I don’t think the problem is related to the HTTP Header. It is 
the same for both Tim’s rev page and his lc page:






and

2. Utilize any one of the latest versions of LiveCode: 6.7.8, 
7.1.1 or 8.0.0dp12.


That would indeed fix the original issue.
Tim doesn’t really have a choice over which version of the 
server to use with the On-Rev service. The version is chosen 
by LiveCode.


I suspect Tim will need to wait until LiveCode update the 
server before porting his scripts to .lc


Regards

Peter


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage 
your subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Charset problems with .lc web page

2015-12-24 Thread Tim Selander

Hi Alex,

Thanks.

I added
http://www.pba.on-rev.com/5_today.lc;] & "" & CR ?>

and also
" & CR ?>

in the script but it didn't return any info.

I'm using On-Rev, the server is sage -- so whatever installs they have 
is what I'm using. I do find it curious that the older .irev works while 
.lc does not!


Tim


On 15/12/24 17:18, Alex Tweedly wrote:

Hi Tim,

I'm afraid I know little or nothing about charsets, so I can't 
directly help :-)


The difference between .irev and .lc is which version of the server 
engine they are running - and obviously that depends on your server 
setup. So, to help with answering this, we (might) need to know which 
versions are being used on your server.


You could add
   put $_SERVER[" SCRIPT_FILENAME"] & "" & CR

Presumably it will be a pre-Unicode and a post-Unicode version - but 
knowing which ones might help someone answer your question.


-- Alex.


On 24/12/2015 07:55, Tim Selander wrote:

Dear list,

I'm having trouble making a .lc web pages correctly show the charset.

I have two test files:
http://www.pba.on-rev.com/5_today.lc
http://www.pba.on-rev.com/5_today.irev

They are identical except for the .lc/.irev file extensions, and also 
the  and  tags in the html.


The .irev file correctly shows Japanese UTF8, the .lc file does not.

Anyone else having problems with this? Can .lc files not handle 
charset correctly?


Thanks,

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Charset problems with .lc web page

2015-12-24 Thread Tim Selander

Hi Lyn,

Thanks for the tip.

But I tried it, and it didn't solve the problem with .lc & ?>. However, without fail, using .irev as the filename extension 
and  tags in the web page show utf8 Japanese correctly 
-- so I am content to use those. Problem solved, as far as I'm 
concerned.


Thanks!

Tim Selander
Tokyo, Japan


On 12/24/15, 20:18, Lyn Teyla wrote:

Lyn Teyla wrote:


Try inserting the following 3 lines right at the top of your .lc script, 
leaving everything else untouched:




There was a slight typo (missed the quotes); try this at the top of the script:




Lyn :)



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Charset problems with .lc web page

2015-12-24 Thread Tim Selander

Hi Alex,

Got it!

The .lc file shows:
/usr/local/cpanel/cgi-sys/livecode-server-6.6.2

The .irev file shows
/usr/local/cpanel/cgi-sys/ireviam-engine

And the .irev file continues to show utf-8 (Japanese) correctly 
while the .lc file does not. Actually tested it with the exact 
same file, simply re-tagging the changing the file extension to .irev. All other content in the 
file untouched.


.irev works, and .lc doesn't.

This is true even when I tried Lyn's suggestion of adding the 
charset command right in the 

I wonder if this is a bug? (Not that I know how to report it if 
it is!)


At this point, I'm content to use .irev & Sorry Tim, I should have been clearer - it is literally 
$_SERVER["SCRIPT_FILENAME"] that you want to print.
That's one of the built-in $_SERVER variables, showing which 
'cgi' script (i.e. which version of the engine is running).


So you'll get something like

  /usr/local/cpanel/cgi-sys/livecode-server-6.6.2

-- Alex.

On 24/12/2015 08:33, Tim Selander wrote:

Hi Alex,

Thanks.

I added
http://www.pba.on-rev.com/5_today.lc;] & 
"" & CR ?>


and also
" & CR ?>

in the script but it didn't return any info.

I'm using On-Rev, the server is sage -- so whatever installs 
they have is what I'm using. I do find it curious that the 
older .irev works while .lc does not!


Tim


On 15/12/24 17:18, Alex Tweedly wrote:

Hi Tim,

I'm afraid I know little or nothing about charsets, so I 
can't directly help :-)


The difference between .irev and .lc is which version of the 
server engine they are running - and obviously that depends 
on your server setup. So, to help with answering this, we 
(might) need to know which versions are being used on your 
server.


You could add
   put $_SERVER[" SCRIPT_FILENAME"] & "" & CR

Presumably it will be a pre-Unicode and a post-Unicode 
version - but knowing which ones might help someone answer 
your question.


-- Alex.


On 24/12/2015 07:55, Tim Selander wrote:

Dear list,

I'm having trouble making a .lc web pages correctly show the 
charset.


I have two test files:
http://www.pba.on-rev.com/5_today.lc
http://www.pba.on-rev.com/5_today.irev

They are identical except for the .lc/.irev file extensions, 
and also the  and  tags in the html.


The .irev file correctly shows Japanese UTF8, the .lc file 
does not.


Anyone else having problems with this? Can .lc files not 
handle charset correctly?


Thanks,

Tim Selander
Tokyo, Japan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage 
your subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage 
your subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage 
your subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Charset problems with .lc web page

2015-12-23 Thread Tim Selander

Dear list,

I'm having trouble making a .lc web pages correctly show the charset.

I have two test files:
http://www.pba.on-rev.com/5_today.lc
http://www.pba.on-rev.com/5_today.irev

They are identical except for the .lc/.irev file extensions, and also 
the  and  tags in the html.


The .irev file correctly shows Japanese UTF8, the .lc file does not.

Anyone else having problems with this? Can .lc files not handle charset 
correctly?


Thanks,

Tim Selander
Tokyo, Japan

___
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: CSV again.

2015-10-15 Thread Tim Selander


So, tell us what you really think about .CSV, Richard!  :-)

Tim Selander
Tokyo, Japan

On 15/10/16 8:34, Richard Gaskin wrote:

 stupidly complex
really stupid 
stupid format 
really dumb idea



___
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 for the rest of us

2015-09-18 Thread Tim Selander

Roland,

Amen, preach it brother!

Filemaker with xTalk replacing FM's miserable "scripting."  I 
have been looking for that product, to no avail, since the demise 
of HyperCard.


Tim Selander
Tokyo, Japan


On 9/19/15, 1:59, R.H. wrote:

Following the really interesting discussions on this list for two years,
enjoying the verve with which those developers in Edinburgh are trying to
stitch the pieces together – and I know how much dedication this requires
supporting so many different platforms and aspects of the LiveCode engine –
and I want to thank them and support them  - I think, not being a hard-core
programmer, just maybe an advanced user, just someone with ideas about
possible applications, I sometimes feel a bit lost.


I enjoy the smart contributions seen here on the list, maybe it from Monte,
or Peter, or Rick or whoever.


So, I am not sure my contribution here would lead to another thread about
LiveCode and how the "rest of us" – the non programmers – might see it. It
is just my very subjective contribution as a non-programmer.


Even I am thinking often, how such group of dedicated LiveCode mothership
developers could receive more support, or how the business model for them
would work out. Because without money nothing can be done. For example, I
am paying for a Microsoft membership, for Adobe creative tools, for Google
Cloud space, for a dedicated VPN to allow myself to not being detected as a
Swiss user only (10 dollars per month), I am paying 5 bucks for my daily
coffee in the coffee shop.


Assuming 100,000 paying LiveCode customers, every one paying 10 dollars
each month, it would be sufficient to get things really going and inviting
many more supporters and developers to be on board. If it does not reach
big numbers, what would be the future of LiveCode? It has to grow BIG.


To me and my clients, the front end usability is what we see and what we
want.


I love LiveCode for its language and doing what I tell it to do (more or
less) with simple English expressions. I question it for not providing me
the necessary building blocks of an integrated framework allowing to do
simple things without having to worry about the details. I do not really
like its current standard visual interface, and it requires quite some work
to make this interface shine and be really usable to end users.


I love Filemaker as one of the tools I am using for in-house-development,
but I hate its scripting language and its slow upgrade cycle, its many
limitations, and for a small company it is already much too costly to
distribute solutions to other users. It is not a language. It is just a
nice database application development engine.


What I am up to in my contribution would be the vision that LiveCode would
introduce aspects of something like Filemaker.


I am convinced that the majority of paying users (monthly 10 dollars) would
be business people, smallest companies for 1-10 people - but they have
business needs – and business almost always needs database applications.
So, we are talking about database driven applications.


Such apps are not made just for fun or done as a hobby, or to develop a lot
of games. There is a definite business reason, abiding to platform specific
usability guidelines, looking sexy, and doing what they have to do for lots
of end users, non programmers, just users like you and me. And a business
is ready to pay for that. Business is not paying for games. The game market
is a different market, even though game-like presentations are sometimes
also very useful. ( I am not against using LiveCode for game-development or
anything to not be misunderstood ))).


The Filemaker market is already big enough. I am sure many Filemaker users
and developers would switch to LiveCode if it would provide a similar ease
of development and deployment. And that means possibly using the new-born
widgets technology.


But today, I am still much faster in developing a small solution for a
company using Filemaker compared to LiveCode. Much faster!


Why not there is a field that can easily be set to display international
date and time formats and automatically would default to local standards
without having to script a lot and redoing the same work over and over
again? Why not a field can be defined to represent whatever data it should
provide and automatically check user input? Why not there are classes of
fields that can be defined behaving the same using a domain-like concept?


Why not there is a data grid working like a portal in Filemaker, just
allowing to insert whatever we want, buttons and pictures, fields and
menus? I do not have the time to work with the details of the current data
grid – except for simple text input. Why should I have to script myself all
the small bits and pieces? It needs too much time. And if fields are
connected with an underlying database, I want to see the updates
immediately. And why not there is a data input mechanism - add data, edit
data, re

Amateur looking for advice on web security/CGI folder....

2015-08-13 Thread Tim Selander

Hi all,

I work at a small broadcast production company, and since HC days have 
made in-house programs that have helped us in a variety of ways. Now 
using a bit of LC v7 with its unicode support.


Would like to have data available to staff who are on the road. A few 
months ago, asking about sql stuff, Richard Gaskin suggested just using 
text files for data. In my testing, this has worked great. Loading up 
sample data sets that are far larger than anything we really need, 
performance has been fine. Don't need a database.


So I avoid all the SQL security discussion all you pros have been having 
(along with version control, github and a whole bunch of other stuff 
that makes me realize I'm a real amateur and that we're not in HC's 
Kansas, anymore)


My remaining question is on keeping text data secure on our web server 
(on-rev). I use LC scripts in the cgi folder. My understanding is that 
the cgi folder is secure from any outside breach. Is that understanding 
correct? So if I store my company's customer data in the cgi folder, it 
is secure?


Thanks,

Tim Selander
Tokyo, Japan

___
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: Amateur looking for advice on web security/CGI folder....

2015-08-13 Thread Tim Selander

OK, glad I asked the list had a hunch my understanding was inadequate.

Not using real data for the tests...

Guess I need to go study. Any pointers to good articles appreciated!

Tim Selander
Tokyo, Japan

On 15/08/14 12:50, Mark Wieder wrote:

On 08/13/2015 04:29 PM, Tim Selander wrote:


My remaining question is on keeping text data secure on our web server
(on-rev). I use LC scripts in the cgi folder. My understanding is that
the cgi folder is secure from any outside breach. Is that understanding
correct? So if I store my company's customer data in the cgi folder, it
is secure?


Oh my goodness no.
Don't put any data you need to keep secure on a publicly-facing server.
Especially not on a shared server ala on-rev.
You *are* requiring https already, right?
And you've modified the .htaccess file in the public_html folder?
And disabled anonymous ftp?




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