Re: Live LiveCode Create demo - join us tomorrow

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

Hi Heather,

Being in Japan, the time (midnight) is a little too late for this old 
man! Any chance it will be recorded? I would love to watch it later.


Thanks,

Tim Selander


On 2024/08/12 19:34, Heather Laine via use-livecode wrote:

Hello List Folks,

Just to make you aware, we are holding an open webinar tomorrow, at 4pm UK 
time, where we will be demo'ing LiveCode Create and taking questions. If you'd 
like to take part please go here to sign up:

https://us02web.zoom.us/webinar/register/WN_EAjwE614Q9Wi_366Y7b0vw

When you go to this link Zoom will tell you what time it is in your timezone.

Best Regards,

Heather

Heather Laine
Customer Services Manager
LiveCode Ltd
www.livecode.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: 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 > 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 
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/listin

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) &CR 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) &CR 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 "

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)&q=cat&source=en&target=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 

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-08 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-03 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 
 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 
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 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 
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 
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 
 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 :

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




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

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  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