Primary Student Livecode Interface (Simplified Developer Interface)

2019-10-10 Thread JOHN PATTEN via use-livecode
Good Morning from SoCal,

Quick question, anybody ever develop a simplified LiveCode “developer 
interface/tool“ project?

If you’ve been around awhile, you might remember how HyperCard had multiple 
development modes. Level one allowed you to use drawing tools create buttons 
that would allow you to ”go to next card” etc. Pretty much no script access. 

Levels 2-3 gradually provided more capabilities. 

If you new the correct procedure, you could completely unlock Hypercard, with 
access to all developer components (Level 4?)

Has anybody created a simplified Livecode developer interface for newbies?  
Something that could be used to introduce, but not initially over whelm a new 
user?

Just trying to not reinvent the wheel, if someone has already gone down this 
path and would be willing to share :)

Thank you!
John Patten



Sent from my iPhone

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


Copying Text from Field In HTML5 app?

2018-05-21 Thread JOHN PATTEN via use-livecode
HI All,

I have a little HTML5 project that creates some text data in a card field. I 
would like to let my user copy the text created in this field out the HTML5 app 
so that they can paste it into a spreadsheet in order to manipulate it.

Can this be done using an HTML5 app?

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


LiveCode and iOS Simulator Set Up

2018-02-20 Thread JOHN PATTEN via use-livecode
Hi All,

I am trying to set up a new school Mac laptop with Xcode so that I can run the 
iOS simulator on it with Livecode.

I have tried LiveCode 8.1.7 and 8.1.9 with Xcode most recent version of Xcode, 
9.0, and 9.1.  Each time I attempt to launch the simulator in LiveCode I get 
the message, “The simulator seems to be taking a long time to launch…”. 
Eventually, it times out and the app never launches in the simulator.  

I’m guessing I am not using the correct versions of LiveCode or, possibly, 
Xcode?  Is there a link to documentation on how to get the simulator to work?

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

Questions re: Michael McCreary Database Wizardry from LCGlobal?

2017-12-13 Thread JOHN PATTEN via use-livecode
Hello all!

I am trying to decipher Michael McCreary’s database wizardry form the Livecode 
conference.

Starting by duplicating what he had created with his Notes cloud app, but just 
using my own on-rev account and my mysql db.

His Notes app works fine when it is pointing to his on-rev/mysql db, but when I 
try to duplicate what he is done, my notes app opens fine, but under the drop 
down menu, in the categories area, I am getting a “tsneterr: HTTP response code 
404 returned from server.” I’m guessing it is not seeing my .lc files on my 
on-rev directory???  I also can’t create any new notes, obviously.

I have made the change in the sub stack libDataLayer for the constant kAPIURL = 
… to point to my on-rev and directory.

 I have also made the change on the .lc server file, libDataLayer.lc, within 
the libs folder, so that it is using my mysql db, username and password. 
However, I must be still missing changes to make this work on my own mysql db.

His use of db libraries in that example blew my mind, and I would like to learn 
how to do that myself, but I’m having trouble just trying to get “off the 
blocks.” :)

Are there more script changes in his example that need to be done in order for 
me to duplicate his Notes app on my on-rev account?



Thank you!

John Patten
SUSD

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

Re: Example Stack for MergAV (QR codes)?

2017-11-09 Thread JOHN PATTEN via use-livecode
Awesome…and...

thanks for the quick response!

John Patten
SUSD


> On Nov 9, 2017, at 3:55 PM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hello!
> 
> I’m attempting to use MergAV to put a little student qr code reader app 
> together. MergAV has many commands and I have not been successful with the 
> combinations I have chosen.
> 
> Does someone have an example stack or a link they can point me to and example 
> stack?
> 
> Thank you!
> 
> John Patten
> SUSD
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

Example Stack for MergAV (QR codes)?

2017-11-09 Thread JOHN PATTEN via use-livecode
Hello!

I’m attempting to use MergAV to put a little student qr code reader app 
together. MergAV has many commands and I have not been successful with the 
combinations I have chosen.

Does someone have an example stack or a link they can point me to and example 
stack?

Thank you!

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

Re: How to (in iOS) Import snapshot and paste resulting image to substack? (Solved)

2017-11-07 Thread JOHN PATTEN via use-livecode
I figured it out :)

Needed to just use export snapshot, instead of import snapshot, and create 
named image holders to “paste” the exported snapshots into.

export snapshot from rectangle (the rect of cd fld "pages 2-3") of this card to 
img "pages 2-3" of stack "Print Template"

go to stack "Print Template”

set the angle of img "pages 2-3" of this card to 90

set the loc of image "pages 2-3" of this card to 107,603



Cheers!

John Patten
SUSD

> On Nov 7, 2017, at 10:21 AM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi All,
> 
> In iOS on an iPad, I am trying to import a snapshot and then place the 
> resulting image on a substack of the main stack. The idea is to save the 
> substack out as a PDF after placing a number of snapshots on it.
> 
> The code I am using is:
> 
> -
> import snapshot from rectangle (the rect of cd fld "pages 2-3") of this card
> 
> set the name of last image to "pages 2-3"
> 
> set the angle of img "pages 2-3" of this card to 90
> 
> cut image "pages 2-3" of this card. —there is no cut in iOS???
> 
> go to stack "Print Template"
> 
> paste  — there is no paste in iOS
> 
> set the loc of last image of this card to 107,603
> 
> -
> 
> 
> This all works fine on a desktop, but I am having trouble with some of the 
> iOS.  What is the proper way to cut, copy and paste images from one stack, to 
> a sub stack, in iOS?
> 
> Thank you!
> 
> John Patten
> SUSD
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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

How to (in iOS) Import snapshot and paste resulting image to substack?

2017-11-07 Thread JOHN PATTEN via use-livecode
Hi All,

In iOS on an iPad, I am trying to import a snapshot and then place the 
resulting image on a substack of the main stack. The idea is to save the 
substack out as a PDF after placing a number of snapshots on it.

The code I am using is:

-
import snapshot from rectangle (the rect of cd fld "pages 2-3") of this card

set the name of last image to "pages 2-3"

set the angle of img "pages 2-3" of this card to 90

cut image "pages 2-3" of this card. —there is no cut in iOS???

go to stack "Print Template"

paste  — there is no paste in iOS

set the loc of last image of this card to 107,603

-


This all works fine on a desktop, but I am having trouble with some of the iOS. 
 What is the proper way to cut, copy and paste images from one stack, to a sub 
stack, in iOS?

Thank you!

John Patten
SUSD


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

Re: How do I play sound files in HTML5?

2017-10-07 Thread JOHN PATTEN via use-livecode
In LiveCode under the Dictionary/Guide, there is a link in the Guide for HTML5. 
At the bottom of that information is what is required in your html to display 
the app. It is surprisingly little.

LiveCode actually creates an html page that contains, from what I can tell, a 
considerable amount of html/code just to create the html layout (i.e. loader, 
images, etc.)

Hope that helps!

John Patten
SUSD

Sent from my iPad

> On Oct 7, 2017, at 8:59 AM, Kenji Kojima via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi, 
> I used LC 9.0.0 (dp9). I could play a sound file. Thanks. 
> 
> It had a strange thing the result of 
>do tScript as “JavaScript” 
>was “execution error” though it played. 
> http://kenjikojima.com/HTML5PlaySound/HTML5PlaySound.html 
> <http://kenjikojima.com/HTML5PlaySound/HTML5PlaySound.html>
> 
> How can I hide a black bold belt at the bottom? It’s very ugly. 
> And I don’t need the LiveCode logo at the top left.
> 
> Thanks,
> --
> Kenji Kojima / 小島健治
> http://kenjikojima.com
> 
> 
> 
> 
>> On Oct 5, 2017, at 7:16 PM, hh via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Hi,
>> 
>> do as "javascript" was introduced not before LC 9.0.0-dp4.
>> 
>> Get additional info here (=subforum HTML5):
>> http://forums.livecode.com/viewtopic.php?p=155667#p155667.
>> 
>> ___
>> use-livecode mailing list
>> use-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

Beginners Guide?

2017-10-06 Thread JOHN PATTEN via use-livecode
Hi All,

I’m going to be doing some short introductions to some of our teachers about 
LiveCode. I was reviewing the support resources, specifically the Beginners 
Guide. The info seems to need a bit of an update. Is there another link with a 
more current Beginners Guide?

i.e.. 

General
To use LiveCode you will need:

1024×768 or larger monitor
True color display (16-bit or 32-bit depth)
At least 256Mb of memory
At least 150Mb of disk space (is this still accurate?)
Windows
LiveCode supports the following versions of Windows:

Windows 2000 SP4
Windows XP SP2 and above
Windows Server 2003
Windows Vista SP1 and above (both 32-bit and 64-bit)
Windows 7 (both 32-bit and 64-bit)
Windows Server 2008
Windows 8 and 8.1 Desktop
Additionally, QuickTime 7 or later is required for most multimedia features.

Mac OS X
LiveCode supports the following versions of Mac OS X:

10.3.9 (Panther) on PowerPC
10.4.11 (Tiger) on Intel and PowerPC
10.5.8 and later (Leopard) on Intel and PowerPC
10.6.x (Snow Leopard) on Intel
10.7.x (Lion)
10.8.x (Mountain Lion)
10.9.x (Mavericks)
10.10 (Yosemite)
Linux
The minimal requirements for LiveCode to run on Linux are:

32-bit installation, or a 64-bit linux distribution that has a 32-bit 
compatibility layer
2.4.x or later kernel
glibc 2.3.2 or later X11R5 capable Xserver running locally on a 24-bit display
compositing window manager (optional – required for alpha-blended window shapes)
gtk/gdk/glib (optional – required for native theme support)
pango/xft (optional – required for pdf printing, anti-aliased text and unicode 
font support)
lcms (optional – required for color profile support in JPEGs and PNGs)
gksu (optional – required for elevate process support)
mplayer (optional – required for video playback)
esd (optional – required for audio playback)
Thank  you!

John Patten
SUSD

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

HTML5 - Javascript send text to textarea html object?

2017-09-26 Thread JOHN PATTEN via use-livecode
Hello all,

Is it possible for and HTML5 app to send text from a variable in the HTML5 
stack to a textarea object in, say, a web form via javascript? 

While I’m at it, would it be possible to trigger the web form submit action, 
via javascript in the HTML5 app?

If so, how might that look?

Thank you!

John Patten
SUSD








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

Storing/Saving User Data via HTML5 app?

2017-09-24 Thread JOHN PATTEN via use-livecode
Hi All,

Is it possible to save user activity in an HTML5 application? Post to database? 
Save out to a text file? Send out via a PHP post command?

What is the current recommended strategy for this type of typical action?

Thank you!



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


Re: HTML5 and Copy and Pasting of graphics?

2017-09-22 Thread JOHN PATTEN via use-livecode
Thanks Richard!

That works :)

http://jpatten.on-rev.com/circletest1/circletest.html 
<http://jpatten.on-rev.com/circletest1/circletest.html>


> On Sep 22, 2017, at 12:41 PM, Richard Gaskin via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> JOHN PATTEN wrote:
> 
> > I am pretty sure I did a copy and paste from card 2 to card 1 in a
> > HTML5 project.  I may have been dreaming though :)
> >
> > I have two cards. First card has a button with this script:
> >
> > on mouseUp
> > copy grc "circle" of cd 2
> > do paste
> > set the loc of last grc of cd 1 to 100,100
> > end mouseUp
> >
> > The second card has a blue circle graphic.
> >
> > I save this out as an html5 project load it into on-rev. 
> > (http://jpatten.on-rev.com/circletest/circletest.html 
> > <http://jpatten.on-rev.com/circletest/circletest.html>)
> >
> > And it does not work???
> 
> When I load that here I see only a single button, which does nothing when I 
> click.  I do not see any graphic, nor any means of navigating to other cards.
> 
> 
> > HTML5 does not allow for copy and past of grcs from one card to
> > another?
> 
> I don't know, but that won't stop me from guessing. :)
> 
> My hunch would be that using both the copy and paste commands would not work, 
> because IIRC the HTML export runtime does not currently work with the 
> system's clipboard.
> 
> That said, using the copy option which lets you specify a destination, e.g.:
> 
>  copy grc "cricle" to cd 2
> 
> ...may work because that method doesn't affect the system clipboard.
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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


HTML5 and Copy and Pasting of graphics?

2017-09-22 Thread JOHN PATTEN via use-livecode
Hi All!

I am pretty sure I did a copy and paste from card 2 to card 1 in a HTML5 
project.  I may have been dreaming though :)

I have two cards. First card has a button with this script:

on mouseUp
copy grc "circle" of cd 2

do paste

set the loc of last grc of cd 1 to 100,100

end mouseUp


The second card has a blue circle graphic.

I save this out as an html5 project load it into on-rev. 
(http://jpatten.on-rev.com/circletest/circletest.html 
)

And it does not work???


HTML5 does not allow for copy and past of grcs from one card to another?

Thank you!

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


HTML5 and Post tArgs to URL "http://..." ?

2017-08-27 Thread JOHN PATTEN via use-livecode
Hi All,

I was experimenting with HTML 5 this weekend. I have a script that posts some 
data to a server side .lc script. The script inserts the data into a mySQL 
database.

I get a “-1” javascript error the minute the

post tArgList to URL "http://.on-rev.com/folder/tracker.lc” script runs 
from my html5 stack.

I’m guessing that is something you are not allowed to do in a Livecode HTML5 
stack?

Thank you! 
___
use-livecode mailing list
use-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 "Launch URL" without actually opening browser?

2017-08-26 Thread JOHN PATTEN via use-livecode
Hi Mike,

I tried "Get URL" too. 

It may not be possible to submit/post the data in the URL (launch url 
"https://docs.google.com/forms/d/e/1FAIpQLScoYoEfrcewj4IEG0FnfjBnfeVVSLva5tWv-dVexoP95trNNA/formResponse
 
<https://docs.google.com/forms/d/e/1FAIpQLScoYoEfrcewj4IEG0FnfjBnfeVVSLva5tWv-dVexoP95trNNA/formResponse>?"&
 tStudentName & tDate & tSecondsSince & tCardName & tTargetObject) without 
getting the Google Form response.  I was thinking of possible using this 
strategy in an HTML5 stack with student Chromebooks.

Too bad, that would have been an easy way to store light weight stack data 
without a lot of effort :(

Thank you!






> On Aug 26, 2017, at 2:21 PM, Mike Bonner via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Try
> get url "https://docs.google.com/forms/d/e/1FAIpQLScoYoEfrcewj4IEG0FnfjBn
> feVVSLva5tWv-dVexoP95trNNA/formResponse?"& tStudentName & tDate &
> tSecondsSince & tCardName & tTargetObject
> 
> On Sat, Aug 26, 2017 at 3:15 PM, JOHN PATTEN via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Hi All,
>> 
>> I’m using the Google spreadsheet that gets created when you create a
>> Google Form to collect data from a stack.
>> 
>> I’ve copied out the specific Google submit form button to send my stack
>> data to the Google spreadsheet.
>> 
>> This works fine using “Launch URL” however it opens the browser and give
>> me the Google Form Submission Confirmation page.  Is there any way to
>> submit the URL without actually launching the browser?
>> 
>> I experimenting with tracking my students’ mouse clicks while using a
>> learning app I may create, and was looking at a easy way to store that
>> data, and utilize Google Forms simple data reports.
>> 
>> Here’s the card script I’m using:
>> 
>> on mouseDown
>> 
>> --put the short name of target
>> 
>> put the millisecs into TCurrentTime
>> 
>> --convert tCurrentTime to milliseconds
>> 
>> put cd fld "lastAction" into tOldTime
>> 
>> put (tCurrentTime - tOldTime)/1000 into tSecondsSince
>> 
>> if tSecondsSince > 60 then
>> 
>> put "entry.133167263=" & tSecondsSince/60 & " minutes" & "&" into
>> tSecondsSince
>> 
>> put "entry.1059711654=" & cd fld "studentName" into tStudentName
>> 
>> put "entry.630316753=" & the short date & "&" into tDate
>> 
>> put "entry.768691577=" & the name of current card & "&" into tCardName
>> 
>> put "entry.1264876799=" & the short name of target into tTargetObject
>> 
>> launch url "https://docs.google.com/forms/d/e/
>> 1FAIpQLScoYoEfrcewj4IEG0FnfjBnfeVVSLva5tWv-dVexoP95trNNA/formResponse?"&
>> tStudentName & tDate & tSecondsSince & tCardName & tTargetObject
>> 
>> end if
>> 
>> put tSecondsSince && "seconds" && "-" && the short name of target
>> 
>> put "entry.133167263=" & tSecondsSince && "seconds" & "&" into
>> tSecondsSince
>> 
>> put "entry.1059711654=" & cd fld "studentName" & "&" into tStudentName
>> 
>> put "entry.630316753=" & the short date & "&" into tDate
>> 
>> put "entry.768691577=" & the name of current card & "&" into tCardName
>> 
>> put "entry.1264876799=" & the short name of target into tTargetObject
>> 
>> launch url "https://docs.google.com/forms/d/e/
>> 1FAIpQLScoYoEfrcewj4IEG0FnfjBnfeVVSLva5tWv-dVexoP95trNNA/formResponse?"&
>> tStudentName & tDate & tSecondsSince & tCardName & tTargetObject
>> 
>> put tCurrentTime into cd fld "lastAction"
>> end mouseDown
>> 
>> on openCard
>> put the millisecs into cd fld  “lastAction"
>> end openCard
>> 
>> Thank you!
>> 
>> ___
>> use-livecode mailing list
>> use-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 "Launch URL" without actually opening browser?

2017-08-26 Thread JOHN PATTEN via use-livecode
Hi All,

I’m using the Google spreadsheet that gets created when you create a Google 
Form to collect data from a stack. 

I’ve copied out the specific Google submit form button to send my stack data to 
the Google spreadsheet. 

This works fine using “Launch URL” however it opens the browser and give me the 
Google Form Submission Confirmation page.  Is there any way to submit the URL 
without actually launching the browser?

I experimenting with tracking my students’ mouse clicks while using a learning 
app I may create, and was looking at a easy way to store that data, and utilize 
Google Forms simple data reports.  

Here’s the card script I’m using:

on mouseDown

--put the short name of target

put the millisecs into TCurrentTime

--convert tCurrentTime to milliseconds

put cd fld "lastAction" into tOldTime

put (tCurrentTime - tOldTime)/1000 into tSecondsSince

if tSecondsSince > 60 then

put "entry.133167263=" & tSecondsSince/60 & " minutes" & "&" into tSecondsSince

put "entry.1059711654=" & cd fld "studentName" into tStudentName

put "entry.630316753=" & the short date & "&" into tDate

put "entry.768691577=" & the name of current card & "&" into tCardName

put "entry.1264876799=" & the short name of target into tTargetObject

launch url 
"https://docs.google.com/forms/d/e/1FAIpQLScoYoEfrcewj4IEG0FnfjBnfeVVSLva5tWv-dVexoP95trNNA/formResponse?";
 tStudentName & tDate & tSecondsSince & tCardName & tTargetObject

end if

put tSecondsSince && "seconds" && "-" && the short name of target

put "entry.133167263=" & tSecondsSince && "seconds" & "&" into tSecondsSince

put "entry.1059711654=" & cd fld "studentName" & "&" into tStudentName

put "entry.630316753=" & the short date & "&" into tDate

put "entry.768691577=" & the name of current card & "&" into tCardName

put "entry.1264876799=" & the short name of target into tTargetObject

launch url 
"https://docs.google.com/forms/d/e/1FAIpQLScoYoEfrcewj4IEG0FnfjBnfeVVSLva5tWv-dVexoP95trNNA/formResponse?";
 tStudentName & tDate & tSecondsSince & tCardName & tTargetObject

put tCurrentTime into cd fld "lastAction"
end mouseDown

on openCard
put the millisecs into cd fld  “lastAction"
end openCard

Thank you!

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

Re: HTML5 - Playing Audio files tutorial?

2017-08-25 Thread JOHN PATTEN via use-livecode
Hi Collin,

No, the mp3 will not play either. I must be missing a step.  :(

http://jpatten.on-rev.com/sylvan/HTNML5%20Test.html 
<http://jpatten.on-rev.com/sylvan/HTNML5%20Test.html>. (no audio plays)

http://jpatten.on-rev.com/sylvan/ 
<http://jpatten.on-rev.com/sylvan/>TestAudio2.mp3. (plays from browser)


> On Aug 25, 2017, at 11:47 AM, Colin Holgate via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Normally you would play MP3 or OGG in HTML5. Do MP3 files play ok?
> 
> 
>> On Aug 25, 2017, at 11:06 AM, JOHN PATTEN via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Hi All,
>> 
>> I have followed the tutorial here on playing audio files, 
>> http://lessons.livecode.com/m/4071/l/742506-how-do-i-play-sound-files-in-html5
>>  
>> <http://lessons.livecode.com/m/4071/l/742506-how-do-i-play-sound-files-in-html5>
>> 
>> I have tried with both a wav file, and a m4a.  Neither of them seem to play.
>> 
>> Do I have to “include" the file in the Standalone Settings configuration 
>> panel, or can I just add it to my HTML5 project folder?
>> 
>> Also, the audio tag,
>> 
>>   
>> 
>> 
>> ...that can go right before the ending /body tag?
>> 
>> 
>> Thank you!
> 
> 
> ___
> use-livecode mailing list
> use-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

HTML5 - Playing Audio files tutorial?

2017-08-25 Thread JOHN PATTEN via use-livecode
Hi All,

I have followed the tutorial here on playing audio files, 
http://lessons.livecode.com/m/4071/l/742506-how-do-i-play-sound-files-in-html5 


I have tried with both a wav file, and a m4a.  Neither of them seem to play.

Do I have to “include" the file in the Standalone Settings configuration panel, 
or can I just add it to my HTML5 project folder?

Also, the audio tag,
  

  

...that can go right before the ending /body tag?


Thank you!


___
use-livecode mailing list
use-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: MobileControlCreate Scroller? SOLVED

2017-07-12 Thread JOHN PATTEN via use-livecode
Never mind :(  I hate when that happens :) wrong fld  name in


> On Jul 12, 2017, at 11:00 AM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi All,
> 
> I have a group that consists of a couple of buttons and a field. The field 
> can contain text that fits nicely with it, and at times, text that is outside 
> the bounds of the field. This app is targeted for an iPhone. I wanted to 
> create a mobile scroller to allow the user to scroll the field when the text 
> is longer than the field.
> 
> I am using the tutorial online 
> (http://lessons.livecode.com/m/4069/l/94412-creating-a-native-scroller-to-scroll-a-field
>  
> <http://lessons.livecode.com/m/4069/l/94412-creating-a-native-scroller-to-scroll-a-field>)
>  and this scrip. I have placed the script in the stack as the group 
> containing the field is a background and appears on every card.
> 
> On cards where the text extends beyond the field, the mobile scroller 
> appears, however when I scroll the field in the iPhone, the text does not 
> move and I don’t see the text below the boundary of the field.
> 
> What am i doing incorrect?
> 
> 
> local sScrollerID
> 
> on preOpenCard
> 
> local tScrollerRect,tContentRect
> 
> if environment() is not "mobile" then exit preOpenCard
> 
> mobileControlCreate "scroller", "loremScroll"
> 
> put the result into sScrollerID
> 
> put the rect of fld "FieldNotes" of group id 1012 into tScrollerRect
> 
> --put the rect of group id 1012 into tScrollerRect
> 
> put the topleft of fld "FieldNotes" of group id 1012 & "," & the right of fld 
> "FieldNotes" of group id 1012 &","&( the top of fld "FieldNotes" of group id 
> 1012 + the formattedHeight of fld "FieldNotes" of group id 1012) into 
> tContentRect
> 
> mobileControlSet "loremScroll", "rect", tScrollerRect
> 
> mobileControlSet "loremScroll", "contentRect", tContentRect
> 
> mobileControlSet "loremScroll", "visible", true
> 
> mobileControlSet "loremScroll", "scrollingEnabled", true
> 
> mobileControlSet "loremScroll", "vIndicator", true
> 
> mobileControlSet "loremScroll", "vscroll", 0
> 
> mobileControlSet "loremScroll", "canBounce", true
> 
> end preOpenCard
> 
> 
> on scrollerDidScroll hOffset, vOffset
> 
> // When the user scrolls move the displayed content
> 
> set the vScroll of fld "scrollMe" to vOffset
> 
> --set the vScroll of group id 1012 to vOffset
> 
> end scrollerDidScroll
> 
> 
> 
> Thank you!
> John Patten
> SUSD
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

MobileControlCreate Scroller?

2017-07-12 Thread JOHN PATTEN via use-livecode
Hi All,

I have a group that consists of a couple of buttons and a field. The field can 
contain text that fits nicely with it, and at times, text that is outside the 
bounds of the field. This app is targeted for an iPhone. I wanted to create a 
mobile scroller to allow the user to scroll the field when the text is longer 
than the field.

I am using the tutorial online 
(http://lessons.livecode.com/m/4069/l/94412-creating-a-native-scroller-to-scroll-a-field
 
<http://lessons.livecode.com/m/4069/l/94412-creating-a-native-scroller-to-scroll-a-field>)
 and this scrip. I have placed the script in the stack as the group containing 
the field is a background and appears on every card.

On cards where the text extends beyond the field, the mobile scroller appears, 
however when I scroll the field in the iPhone, the text does not move and I 
don’t see the text below the boundary of the field.

What am i doing incorrect?


local sScrollerID

on preOpenCard

local tScrollerRect,tContentRect

if environment() is not "mobile" then exit preOpenCard

mobileControlCreate "scroller", "loremScroll"

put the result into sScrollerID

put the rect of fld "FieldNotes" of group id 1012 into tScrollerRect

--put the rect of group id 1012 into tScrollerRect

put the topleft of fld "FieldNotes" of group id 1012 & "," & the right of fld 
"FieldNotes" of group id 1012 &","&( the top of fld "FieldNotes" of group id 
1012 + the formattedHeight of fld "FieldNotes" of group id 1012) into 
tContentRect

mobileControlSet "loremScroll", "rect", tScrollerRect

mobileControlSet "loremScroll", "contentRect", tContentRect

mobileControlSet "loremScroll", "visible", true

mobileControlSet "loremScroll", "scrollingEnabled", true

mobileControlSet "loremScroll", "vIndicator", true

mobileControlSet "loremScroll", "vscroll", 0

mobileControlSet "loremScroll", "canBounce", true

end preOpenCard


on scrollerDidScroll hOffset, vOffset

// When the user scrolls move the displayed content

set the vScroll of fld "scrollMe" to vOffset

--set the vScroll of group id 1012 to vOffset

end scrollerDidScroll



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

Header Widget troubles and orientationchange examples?

2017-07-11 Thread JOHN PATTEN via use-livecode
Hi All,

I am trying to do some simple navigation with the header widget.

on mouseUp

local tActionName

put the mouseAction of me into tActionName

--if tActionName is not empty then
-- Execute script triggered by the given action

if tActionName is "back" then

go prev card

else

if tActionName is  “next" then

go next card

end if

end if

end mouseUp

I have changed the action name to Back and Next. However Back works fine, but 
Next does not. If i reset the action to “new item” the next button then works.

This doesn’t see quite right. Also, why does it not display the label “Next” 
near the icon like it does for “Back?” Is that because the widget was made to 
not show labels on additional icons?

I am also getting weird results for orientation changes . I am trying to get 
the header to stay at the top of the window, however on my resize command it 
appears to only work some of the times. Is there an example of floating around 
that shows a header widget updating it’s location after each rotation of the 
device?

Thank you!

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

Re: iOS Browser Widget and PDFs? SOLVED

2017-07-07 Thread JOHN PATTEN via use-livecode
FWIW…

The issue was related to the specialFolderPath. When I was testing this aspect 
of the app I had it point to specialFolderPath(“Desktop").  Naturally, on the 
iPad I changed it to specialFolderPath(“engine”) thinking that would cover the 
iOS app. Nope. Apparently you can’t save files (pdfs) to the “engine” folder.

I changed it to specialFolderpath(“Documents”) and everything seems to be good 
now.

Cheers!

John Patten
SUSD


> On Jul 6, 2017, at 3:32 PM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> I had it “Answer" me the path to the pdf in the iOS app on the iPad and it 
> reports back:
> 
> /var/containerns/Bundle?Application?CA0B0721-80F7-4B24-92C4-0B156D/PTP 
> System.app/Teacher Laptop Replacement Quote (19).dpf
> 
> This should be the path that the - set url of the widget “quoteBrowser” - is 
> set to on the , correct?
> 
> Thank you!
> 
> 
>> On Jul 6, 2017, at 3:19 PM, JOHN PATTEN via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Hi All!
>> 
>> I have little app that I’m using track our department quotes/purchases etc. 
>> It pulls the info out of a mySQl db. I have an issue with browser widget 
>> displaying the pdf quotes on iOS. The app pulls the PDF out of mysql via:
>> Put "SELECT attachment FROM quotes WHERE name ='" & jQuote & "'" into btSQL
>> 
>> put revDataFromQuery(tab, cr, gConnectionID, btSQL) into btData
>> 
>> put base64Decode(btData) into vtemp
>> 
>> put specialFolderPath("engine") & "/" & jQuote into vPath
>> 
>> open file vPath for binary write
>> 
>> write vtemp to file vPath
>> 
>> close file vPath
>> 
>> I then have to replace the spaces in the name of the pdf file with a:
>> 
>> replace space with "%20" in vPath
>> set the url of widget "quoteBrowser" of cd id 1067 to "file:" & vPath
>> 
>> replace "%20" with space in vPath
>> 
>> set the script button "Print Quote" of cd id 1067 to "on mouseUp" & return & 
>> "Launch url " & quote & "file:" & vPath & quote & return & "end mouseUp"
>> 
>> 
>> Again this works fine on my Mac and on the iOS simulator. The PDF shows up 
>> just fine in the browser widget. 
>> 
>> However, when I build the app, and try it out on he actual iPad, it does 
>> not. I just get the blank white widget.
>> 
>> Any suggestions on what I might try?
>> 
>> Thank you!
>> ___
>> use-livecode mailing list
>> use-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: iOS Browser Widget and PDFs?

2017-07-06 Thread JOHN PATTEN via use-livecode
I had it “Answer" me the path to the pdf in the iOS app on the iPad and it 
reports back:

/var/containerns/Bundle?Application?CA0B0721-80F7-4B24-92C4-0B156D/PTP 
System.app/Teacher Laptop Replacement Quote (19).dpf

This should be the path that the - set url of the widget “quoteBrowser” - is 
set to on the , correct?

Thank you!


> On Jul 6, 2017, at 3:19 PM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi All!
> 
> I have little app that I’m using track our department quotes/purchases etc. 
> It pulls the info out of a mySQl db. I have an issue with browser widget 
> displaying the pdf quotes on iOS. The app pulls the PDF out of mysql via:
> Put "SELECT attachment FROM quotes WHERE name ='" & jQuote & "'" into btSQL
> 
> put revDataFromQuery(tab, cr, gConnectionID, btSQL) into btData
> 
> put base64Decode(btData) into vtemp
> 
> put specialFolderPath("engine") & "/" & jQuote into vPath
> 
> open file vPath for binary write
> 
> write vtemp to file vPath
> 
> close file vPath
> 
> I then have to replace the spaces in the name of the pdf file with a:
> 
> replace space with "%20" in vPath
> set the url of widget "quoteBrowser" of cd id 1067 to "file:" & vPath
> 
> replace "%20" with space in vPath
> 
> set the script button "Print Quote" of cd id 1067 to "on mouseUp" & return & 
> "Launch url " & quote & "file:" & vPath & quote & return & "end mouseUp"
> 
> 
> Again this works fine on my Mac and on the iOS simulator. The PDF shows up 
> just fine in the browser widget. 
> 
> However, when I build the app, and try it out on he actual iPad, it does not. 
> I just get the blank white widget.
> 
> Any suggestions on what I might try?
> 
> Thank you!
> ___
> use-livecode mailing list
> use-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

iOS Browser Widget and PDFs?

2017-07-06 Thread JOHN PATTEN via use-livecode
Hi All!

I have little app that I’m using track our department quotes/purchases etc. It 
pulls the info out of a mySQl db. I have an issue with browser widget 
displaying the pdf quotes on iOS. The app pulls the PDF out of mysql via:
Put "SELECT attachment FROM quotes WHERE name ='" & jQuote & "'" into btSQL

put revDataFromQuery(tab, cr, gConnectionID, btSQL) into btData

put base64Decode(btData) into vtemp

put specialFolderPath("engine") & "/" & jQuote into vPath

open file vPath for binary write

write vtemp to file vPath

close file vPath

I then have to replace the spaces in the name of the pdf file with a:

replace space with "%20" in vPath
set the url of widget "quoteBrowser" of cd id 1067 to "file:" & vPath

replace "%20" with space in vPath

set the script button "Print Quote" of cd id 1067 to "on mouseUp" & return & 
"Launch url " & quote & "file:" & vPath & quote & return & "end mouseUp"


Again this works fine on my Mac and on the iOS simulator. The PDF shows up just 
fine in the browser widget. 

However, when I build the app, and try it out on he actual iPad, it does not. I 
just get the blank white widget.

Any suggestions on what I might try?

Thank you!
___
use-livecode mailing list
use-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: Display PDF in Browser Widget Error?

2017-06-21 Thread JOHN PATTEN via use-livecode
Thank you!

The spaces where the culprit

Now working :)

> On Jun 21, 2017, at 11:40 AM, Paul Dupuis via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> If the browser widget is expecting an  encoded URL (i.e. %20 vs a space)
> then instead of replacing characters, you should use the urlEncode
> function, as in
> 
> put URLEncode(tFile) into tFile
> 
> This way any characters (spaces or Unicode or whatever) that are an
> issue are properly encoded.
> 
> 
> 
> On 6/21/2017 2:24 PM, panagiotis merakos via use-livecode wrote:
>> @Roger
>> 
>> Nice!
>> 
>> This code works with filenames with spaces, too:
>> 
>> on mouseUp
>> 
>> local tFile
>> 
>> answer file "Please choose the file you would like to display" with type "PDF
>> document|pdf|PDF"
>> 
>> if it is not empty then
>> 
>> put it into tFile
>> 
>> replace space with "%20" in tFile
>> 
>> set the url of widget 1 to tFile
>> 
>> end if
>> 
>> end mouseUp
>> 
>> On Wed, Jun 21, 2017 at 7:19 PM, Roger Eller via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> Have you tried "my%20Pdf"?
>>> 
>>> ~Roger
>>> 
>>> On Wed, Jun 21, 2017 at 2:04 PM, panagiotis merakos via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>> 
>>>> Hmm, it seems that the spaces are the culprit. I did a quick test, and
>>>> selecting a pdf "myPdf" works fine, whereas selecting a pdf "my Pdf"
>>> throws
>>>> an error.
>>>> 
>>>> This looks like a bug to me :)
>>>> 
>>>> Best,
>>>> Panos
>>>> --
>>>> 
>>>> On Wed, Jun 21, 2017 at 6:50 PM, JOHN PATTEN via use-livecode <
>>>> use-livecode@lists.runrev.com> wrote:
>>>> 
>>>>> It contains spaces, but no unicode that I can see.  i.e.
>>> "Transportation
>>>>> Bus Software Laptop.pdf”
>>>>> 
>>>>> Thank you!
>>>>> 
>>>>> 
>>>>>> On Jun 21, 2017, at 10:47 AM, panagiotis merakos via use-livecode <
>>>>> use-livecode@lists.runrev.com> wrote:
>>>>>> Hi John,
>>>>>> 
>>>>>> Does the pdf filename you select contain any unicode characters?
>>>>>> 
>>>>>> Best,
>>>>>> Panos
>>>>>> --
>>>>>> 
>>>>>> On Wed, Jun 21, 2017 at 6:31 PM, JOHN PATTEN via use-livecode <
>>>>>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com
>>>>> wrote:
>>>>>>> Hi All,
>>>>>>> 
>>>>>>> I am trying to display a PDF in a browser widget using the tutorial
>>>>> here:
>>>>>>> http://lessons.livecode.com/m/4071/l/727199-how-do-i- <
>>>>> http://lessons.livecode.com/m/4071/l/727199-how-do-i->
>>>>>>> display-a-pdf-in-livecode <http://lessons.livecode.com/ <
>>>>> http://lessons.livecode.com/>
>>>>>>> m/4071/l/727199-how-do-i-display-a-pdf-in-livecode>
>>>>>>> 
>>>>>>> and this code:
>>>>>>> 
>>>>>>> on mouseUp
>>>>>>>  local tFile
>>>>>>>  answer file "Please choose the file you would like to display"
>>> with
>>>>>>> type "PDF document|pdf|PDF"
>>>>>>>  if it is not empty then
>>>>>>> put it into tFile
>>>>>>> set the url of widget "browser" to tFile
>>>>>>>  end if
>>>>>>> end mouseUp
>>>>>>> 
>>>>>>> 
>>>>>>> I’m getting this error:
>>>>>>> 
>>>>>>> button "Button": execution error at line 6 (extension: error occured
>>>>> with
>>>>>>> domain) near "runtime", char 1
>>>>>>> 
>>>>>>> 
>>>>>>> Would this be a bug, or am I doing something incorrectly?
>>>>>>> 
>>>>>>> 
>>>>>>> Thank you!
>>>>>>> John Patten
>>>>>>> SUSD
>>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> ___
>> use-livecode mailing list
>> use-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: Display PDF in Browser Widget Error?

2017-06-21 Thread JOHN PATTEN via use-livecode
It contains spaces, but no unicode that I can see.  i.e. "Transportation Bus 
Software Laptop.pdf”

Thank you!


> On Jun 21, 2017, at 10:47 AM, panagiotis merakos via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi John,
> 
> Does the pdf filename you select contain any unicode characters?
> 
> Best,
> Panos
> --
> 
> On Wed, Jun 21, 2017 at 6:31 PM, JOHN PATTEN via use-livecode <
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>> wrote:
> 
>> Hi All,
>> 
>> I am trying to display a PDF in a browser widget using the tutorial here:
>> http://lessons.livecode.com/m/4071/l/727199-how-do-i- 
>> <http://lessons.livecode.com/m/4071/l/727199-how-do-i->
>> display-a-pdf-in-livecode <http://lessons.livecode.com/ 
>> <http://lessons.livecode.com/>
>> m/4071/l/727199-how-do-i-display-a-pdf-in-livecode>
>> 
>> and this code:
>> 
>> on mouseUp
>>   local tFile
>>   answer file "Please choose the file you would like to display" with
>> type "PDF document|pdf|PDF"
>>   if it is not empty then
>>  put it into tFile
>>  set the url of widget "browser" to tFile
>>   end if
>> end mouseUp
>> 
>> 
>> I’m getting this error:
>> 
>> button "Button": execution error at line 6 (extension: error occured with
>> domain) near "runtime", char 1
>> 
>> 
>> Would this be a bug, or am I doing something incorrectly?
>> 
>> 
>> Thank you!
>> John Patten
>> SUSD
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode 
>> <http://lists.runrev.com/mailman/listinfo/use-livecode>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode 
> <http://lists.runrev.com/mailman/listinfo/use-livecode>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Display PDF in Browser Widget Error?

2017-06-21 Thread JOHN PATTEN via use-livecode
Hi All,

I am trying to display a PDF in a browser widget using the tutorial here:  
http://lessons.livecode.com/m/4071/l/727199-how-do-i-display-a-pdf-in-livecode 
<http://lessons.livecode.com/m/4071/l/727199-how-do-i-display-a-pdf-in-livecode>

and this code:

on mouseUp
   local tFile
   answer file "Please choose the file you would like to display" with type 
"PDF document|pdf|PDF"
   if it is not empty then
  put it into tFile
  set the url of widget "browser" to tFile
   end if
end mouseUp  


I’m getting this error:  

button "Button": execution error at line 6 (extension: error occured with 
domain) near "runtime", char 1


Would this be a bug, or am I doing something incorrectly?


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

Re: Uploading Image - Livecode Tutorial Example? Sessions?

2017-05-26 Thread JOHN PATTEN via use-livecode
Hi Mike,

It appears to be working for me now, and I did not have to override the version 
editing the .htaccess file. 

What I’d like to do now is keep the script from naming the new image with a 
random number. :)

Cheers!




> On May 26, 2017, at 9:52 AM, Mike Bonner via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Theres another issue with on-rev.  Even if you set the sessionSavePath, it
> won't work due to the default version of LC on on-rev.  You need to
> override the version using an .htaccess file, but i've not managed to
> actually get that to work for me.  Looking for the link that tells you how
> to do this. If you actually get it to work please let me know how!
> 
> http://lessons.livecode.com/m/4070/l/41105-how-do-i-choose-which-livecode-server-engine-to-use-with-on-rev
> 
> Unless they've updated the default version for .lc files, you'll need to
> switch to a more recent version of the server to get sessions to work.
> 
> On Fri, May 26, 2017 at 10:15 AM, JOHN PATTEN via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> I think I figured out the issue based on an old post by Sturgis…
>> 
>> Apparently you have to set the sessionSavePath before you call the “start
>> session.”
>> 
>> set the sessionSavePath to the defaultfolder
>> 
>> Forum discussion here:
>> 
>> http://forums.livecode.com/viewtopic.php?f=15=10787=
>> 50056=session#p50034 <http://forums.livecode.com/
>> viewtopic.php?f=15=10787=50056=session#p50034>
>> 
>> Cheers!
>> 
>> 
>>> On May 26, 2017, at 8:39 AM, JOHN PATTEN via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hello!
>>> 
>>> Thanks for those that answered about the problem I was having with FTP.
>> It was the URLEncode issue that was tripping me up.
>>> 
>>> However, I’m changing gears as I hadn’t realized that I could not ftp
>> directly into a htmlpublic directory on On-Rev. Ultimately I am trying to
>> just create a little iOS app that will allow me upload and image and create
>> a simple html page to display the image.
>>> 
>>> I have been using the LiveCode tutorial here: “How do I use LiveCode
>> graphics features server-side?” (http://lessons.livecode.com/
>> m/15262/l/156710-how-do-i-use-livecode-graphics-features-server-side <
>> http://lessons.livecode.com/m/15262/l/156710-how-do-i-use-
>> livecode-graphics-features-server-side>)
>>> 
>>> I can’t get this to work the “start session” included in the script?
>>> 
>>> The example starts:
>>> ---
>>> >> start session
>>> ## enter the image file into our $_SESSION if one's just been uploaded
>>> if $_FILES["imagefile"] is not empty then
>>> put url("binfile:" & $_FILES["imagefile"]["filename"]) into
>> $_SESSION["imagedata"]
>>> end if
>>> if $_SESSION["imagedata"] is empty then
>>> printForm ## no image has been uploaded so display the form to
>> upload one
>>> else
>>> create image “myImage” …
>>> 
>>> 
>>> 
>>> If I take the “start session” out, the server script works, sort of…as I
>> think it will upload the image, but because there is no session, you can’t
>> manipulate the image.
>>> 
>>> Has anybody got this example to work? I have tried moving the “start
>> session” around to different areas of the server script, but that does not
>> seem to work either.
>>> 
>>> Thank you!
>>> John Patten
>>> SUSD
>>> 
>>> 
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-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: Uploading Image - Livecode Tutorial Example? Sessions?

2017-05-26 Thread JOHN PATTEN via use-livecode
I think I figured out the issue based on an old post by Sturgis…

Apparently you have to set the sessionSavePath before you call the “start 
session.”

set the sessionSavePath to the defaultfolder

Forum discussion here:

http://forums.livecode.com/viewtopic.php?f=15=10787=50056=session#p50034
 
<http://forums.livecode.com/viewtopic.php?f=15=10787=50056=session#p50034>

Cheers!


> On May 26, 2017, at 8:39 AM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hello!
> 
> Thanks for those that answered about the problem I was having with FTP. It 
> was the URLEncode issue that was tripping me up. 
> 
> However, I’m changing gears as I hadn’t realized that I could not ftp 
> directly into a htmlpublic directory on On-Rev. Ultimately I am trying to 
> just create a little iOS app that will allow me upload and image and create a 
> simple html page to display the image.
> 
> I have been using the LiveCode tutorial here: “How do I use LiveCode graphics 
> features server-side?” 
> (http://lessons.livecode.com/m/15262/l/156710-how-do-i-use-livecode-graphics-features-server-side
>  
> <http://lessons.livecode.com/m/15262/l/156710-how-do-i-use-livecode-graphics-features-server-side>)
>  
> 
> I can’t get this to work the “start session” included in the script?
> 
> The example starts:
> ---
>  start session
> ## enter the image file into our $_SESSION if one's just been uploaded
> if $_FILES["imagefile"] is not empty then
>  put url("binfile:" & $_FILES["imagefile"]["filename"]) into 
> $_SESSION["imagedata"]
> end if
> if $_SESSION["imagedata"] is empty then
>  printForm ## no image has been uploaded so display the form to 
> upload one
> else
>  create image “myImage” …
> 
> 
> 
> If I take the “start session” out, the server script works, sort of…as I 
> think it will upload the image, but because there is no session, you can’t 
> manipulate the image.
> 
> Has anybody got this example to work? I have tried moving the “start session” 
> around to different areas of the server script, but that does not seem to 
> work either.
> 
> Thank you!
> John Patten
> SUSD
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-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 Image - Livecode Tutorial Example? Sessions?

2017-05-26 Thread JOHN PATTEN via use-livecode
Hello!

Thanks for those that answered about the problem I was having with FTP. It was 
the URLEncode issue that was tripping me up. 

However, I’m changing gears as I hadn’t realized that I could not ftp directly 
into a htmlpublic directory on On-Rev. Ultimately I am trying to just create a 
little iOS app that will allow me upload and image and create a simple html 
page to display the image.

I have been using the LiveCode tutorial here: “How do I use LiveCode graphics 
features server-side?” 
(http://lessons.livecode.com/m/15262/l/156710-how-do-i-use-livecode-graphics-features-server-side
 
)
 

I can’t get this to work the “start session” included in the script?

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

FTP from iOS but getting tsneterr: (67) Access denied: 530

2017-05-25 Thread JOHN PATTEN via use-livecode
Hi All,

I’m trying to ftp and image from the photo gallery on iOS to my on-rev account. 
 I’m using the example:

on mouseUp
mobilepickphoto “library"
--upload to FTP
put the last image into url 
("ftp://autoim...@jdoe.on-rev.com:xx...@jdoe.on-rev.com/autoimage/images/newimage.jpg”)
--Informs of successful or unsuccessful upload
if the result is not empty then
answer "url put failed:" && the result
else
answer "success!”
end if
end mouseUp
——

It is throwing and an error, tsnetterr:(67) Access Denied: 530.

I can use Fetch (a mac FTP client) just fine with the same credentials and 
upload an image with no problem. I don’t even have to give Fetch the full ftp 
directory, just the host.

What am I missing?

Thank you!

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

Snaptshot of Browser Widget in iOS?

2017-05-18 Thread JOHN PATTEN via use-livecode
Hi All!

I am trying to lay some objects (text fields, graphics, etc.) over a browser 
widget. I am essentially just taking a screen capture and then layering the 
objects on top of the image. Here is my script:

on mouseUp
lock screen
put the rect of current stack into tCoord

set the width of image 1 to the width of current stack
set the height of image 1 to the height of current stack
set the topleft of image 1 to 0,0
export snapshot from rect tCoord to file specialFolderPath("documents") & 
"File1.png"
set the visible of widget "browser" to false
set the filename of image id 1008 to ""
wait 2
set the filename of image id 1008 to SpecialFolderPath("documents") & 
"File1.png"
-- I believe i needed the three previous lines to get this to work for some 
reason???
show image id 1008 with visual effect dissolve slowly
unlock screen

end mouseUp


This works fine on my Mac, but when I test it in the iOS simulator it does not 
work. Is it not possible to take a snapshot of the browser widget in iOS?

Thank you!

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


Error connecting to SQLlite in iOS

2017-04-20 Thread JOHN PATTEN via use-livecode
Hi All,

I have a simple project that uses an sql lite database. It works fine in 
LiveCode, but when I test it in the iOS simulator, i get an error.

I have copied to the SQL.lite database to the “Copy Files” in the standalone 
settings. I have also added the SqLite and MySQL inclusions.

Here is the link to the project and db: Here is a link to the stack and sql db: 
 https://www.dropbox.com/s/74rhx88dod6cs2k/CCSS%20App.zip?dl=0 


Here is the script I am using.

local sDatabaseID

command databaseConnect
local tDatabasePath, tDatabaseID

 put specialFolderPath("Documents") &  "/ccssdb-ela.sqlite" into 
tDatabasePath

## Test if a database exists

if there is a file tDatabasePath then

answer "A database already exists" with "Okay"

end if

if there is a file tDatabasepath then
put  revOpenDatabase("sqlite", tDatabasePath, , , , ) into tDatabaseID
setDatabaseID tDatabaseID

put cd fld "targetGrade" into tGrade

if tGrade is 10 then

put 9 into tGrade

end if

if tGrade is 12 then

put 11 into tGrade

end if

put revQueryDatabase(tDatabaseID,"SELECT * FROM ccss_data WHERE grade 
=:1","tGrade") into theCursor

if theCursor is an integer then

ConvertSQLCursorToArray theCursor, theDataGridArray

put the result into theError

if theError is empty then

set the dgData of group "ccss_data" to theDataGridArray

end if

revCloseCursor theCursor


revCloseDatabase tDatabaseID

else


Answer "Error connecting to the database:" && tDatabaseID & "."
end if


else

Answer "Having trouble locating database."

end if

end DatabaseConnect

command setDatabaseID pDatabaseID

  put pDatabaseID into sDatabaseID

end setDatabaseID


function getDatabaseID

  return sDatabaseID

end getDatabaseID


command ConvertSQLCursorToArray pCursor, @pOutArrayA

local i

local theFields

local theError


put revDatabaseColumnNames(pCursor) into theFields

if theFields begins with "revdberr," then

put item 2 to -1 of theFields into theError

end if

if theError is empty then

put 0 into i

repeat until revQueryIsAtEnd(pCursor)

add 1 to i


repeat for each item theField in theFields

put revDatabaseColumnNamed(pCursor, theField) into pOutArrayA [i] [theField]

end repeat


revMoveToNextRecord pCursor

end repeat

end if

return theError

end ConvertSQLCursorToArray


Thank you!

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

Re: OT (?): Bookmarking GPS coords

2017-04-09 Thread JOHN PATTEN via use-livecode
This sound interesting, I'd be interested in learning more too.

Thank you
John Patten
SUSD

Sent from my iPad

> On Apr 9, 2017, at 1:34 AM, Graham Samuel via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> I’d love it if this topic could stay on the list for a bit, as I’m just 
> getting involved in reconstructing an existing desktop Geographical 
> Information System which has been very successfully sold to UK 
> schoolchildren, who use it to understand maps and map symbols based on their 
> own locality; but it very much overdue to be re-designed and implemented for 
> mobile devices - mostly tablets. The use of GPS to explore and record a 
> locality is clearly a very powerful and necessary addition to the program. As 
> it’s the UK, even Alex’s interest in postcodes is highly relevant to me (to 
> those outside the UK, and individual UK postcode identifies a very small area 
> - normally seen as a postman’s walk. This is different from other countries 
> like France where postcodes are wide-ranging and therefore less useful for 
> apps like this.)
> 
> Thanks
> 
> Graham
> 
> 
>> On 9 Apr 2017, at 03:40, J. Landman Gay via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> If you go for Android it is trivial to build and distribute. There are no 
>> restrictions, you can email the app or supply a web download link, or put it 
>> on a public server. Apple is more restrictive, so you'd need to get the 
>> UUIDs of everyone who will use the device, or else pay for an Enterprise 
>> license, or else put it in the App Store.
>> 
>> If you want to create the stack I'd be happy to build it in Android for you, 
>> and show you how to do it yourself if you like. It isn't difficult.
>> 
>>> On 4/8/17 7:58 PM, Alex Tweedly via use-livecode wrote:
>>> It would be the most trivial app to write in LC
>>> 
>>> - ask the postcode
>>> 
>>> - download the list of addresses in that postcode, and put it into a
>>> selection control
>>> 
>>> - have a button that takes current location and stores it for the
>>> selected address
>>> 
>>> [walk along the road, selecting and clicking as I pass each house :-) ]
>>> 
>>> - upload the completed file of locations + addresses
>>> 
>>> BUT - I would need to figure out how to build an iOS and/or Android app,
>>> and how to release it or get it on to the phones of my volunteers, which
>>> seems to be so troublesome I'd rather avoid it :-)
>> 
>> 
>> -- 
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software   | http://www.hyperactivesw.com
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-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: MDM and App deployment

2017-04-06 Thread JOHN PATTEN via use-livecode
ess to the device's camera
NSContactsUsageDescription
This application requires access to your Contacts
NSMicrophoneUsageDescription
This application requires access to the device's 
microphone
NSMotionUsageDescription
This application requires access to the device's 
accelerometer
NSRemindersUsageDescription
This application requires access to your Reminders
NSPhotoLibraryUsageDescription
This application requires access to Photo Library



——

Xcode Food App info.plist


http://www.apple.com/DTDs/PropertyList-1.0.dtd;>

  
CFBundleName
FoodTracker
DTXcode
0820
DTSDKName
iphoneos10.2
UILaunchStoryboardName
LaunchScreen
DTSDKBuild
14C89
CFBundleDevelopmentRegion
en
CFBundleVersion
1
BuildMachineOSBuild
16E195
DTPlatformName
iphoneos
CFBundlePackageType
APPL
UIMainStoryboardFile
Main
CFBundleSupportedPlatforms

  iPhoneOS

CFBundleShortVersionString
1.0
CFBundleInfoDictionaryVersion
6.0
UIRequiredDeviceCapabilities

  armv7

CFBundleExecutable
FoodTracker
DTCompiler
com.apple.compilers.llvm.clang.1_0
UISupportedInterfaceOrientations~ipad

  UIInterfaceOrientationPortrait
  UIInterfaceOrientationPortraitUpsideDown
  UIInterfaceOrientationLandscapeLeft
  UIInterfaceOrientationLandscapeRight

CFBundleIdentifier
com.sylvanapps.FoodTracker
MinimumOSVersion
10.0
DTXcodeBuild
8C38
DTPlatformVersion
10.2
LSRequiresIPhoneOS

UISupportedInterfaceOrientations

  UIInterfaceOrientationPortrait
  UIInterfaceOrientationLandscapeLeft
  UIInterfaceOrientationLandscapeRight

UIDeviceFamily

  1
  2

DTPlatformBuild
14C89
  




Thank you!

> On Apr 6, 2017, at 8:28 AM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Thanks Terry and Jacqueline,
> 
> The file/app is being served via our MDM which is using https.
> 
> Terry, you mention that the manifest file has to be perfect, do you happen to 
> know what that would look like? I have never tweaked the manifest file that 
> gets created automatically. 
> 
> I have been following Richard Miller’s challenges with getting his app into 
> the regular app store so I know the info.plist file can be problematic, 
> depending on what you are trying to do.  However, I’m not quite sure what a 
> “perfect” plist file should look like. Someone else had mentioned being sure 
> that I,…  "Call all the links on the plist and html with https,” but I’m not 
> sure what that means.  It was pulled from this this stackoverflow 
> conversation, 
> http://stackoverflow.com/questions/34820355/enterprise-app-installing-but-immediatelly-dissapears
>  
> <http://stackoverflow.com/questions/34820355/enterprise-app-installing-but-immediatelly-dissapears>,
>  but I have  a hunch it is not the same problem as mine.
> 
> Let me know if I’ missing something in the plist file….
> 
> 
> Thank you!
> 
> 
> 
> 
>> On Apr 5, 2017, at 7:35 PM, Terry Judd via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> I missed the start of this thread so I might be off target but the app needs 
>> to be server from a secure (https) server. If it isn’t and/or if your 
>> manifest file isn’t perfect then you will get that sort of message as well.
>> 
>> Terry...
>> 
>> On 6/04/2017 12:18 pm, "use-livecode on behalf of J. Landman Gay via 
>> use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of 
>> use-livecode@lists.runrev.com> wrote:
>> 
>>   On 4/5/17 5:17 PM, JOHN PATTEN via use-livecode wrote:
>>> A student iPad can see the app in their Self Service app, but when
>>> they go to install it reports it can’t download at this time.
>> 
>>   I don't know if things are different with an Enterprise account, but in 
>>   my experience an app that partially downloads and then errors indicates 
>>   something wrong with the distribution profile.
>> 
>>   -- 
>>   Jacqueline Landman Gay | jac...@hyperactivesw.com
>>   HyperActive Software   | http://www.hyperactivesw.com
>> 
>> 
>>   ___
>>   use-livecode mailing list
>>   use-livecode@lists.runrev.com
>>   Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>>   http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livec

Re: MDM and App deployment

2017-04-06 Thread JOHN PATTEN via use-livecode
Thanks Terry and Jacqueline,

The file/app is being served via our MDM which is using https.

Terry, you mention that the manifest file has to be perfect, do you happen to 
know what that would look like? I have never tweaked the manifest file that 
gets created automatically. 

I have been following Richard Miller’s challenges with getting his app into the 
regular app store so I know the info.plist file can be problematic, depending 
on what you are trying to do.  However, I’m not quite sure what a “perfect” 
plist file should look like. Someone else had mentioned being sure that I,…  
"Call all the links on the plist and html with https,” but I’m not sure what 
that means.  It was pulled from this this stackoverflow conversation, 
http://stackoverflow.com/questions/34820355/enterprise-app-installing-but-immediatelly-dissapears
 
<http://stackoverflow.com/questions/34820355/enterprise-app-installing-but-immediatelly-dissapears>,
 but I have  a hunch it is not the same problem as mine.

Let me know if I’ missing something in the plist file….


Thank you!




> On Apr 5, 2017, at 7:35 PM, Terry Judd via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> I missed the start of this thread so I might be off target but the app needs 
> to be server from a secure (https) server. If it isn’t and/or if your 
> manifest file isn’t perfect then you will get that sort of message as well.
> 
> Terry...
> 
> On 6/04/2017 12:18 pm, "use-livecode on behalf of J. Landman Gay via 
> use-livecode" <use-livecode-boun...@lists.runrev.com on behalf of 
> use-livecode@lists.runrev.com> wrote:
> 
>On 4/5/17 5:17 PM, JOHN PATTEN via use-livecode wrote:
>> A student iPad can see the app in their Self Service app, but when
>> they go to install it reports it can’t download at this time.
> 
>I don't know if things are different with an Enterprise account, but in 
>my experience an app that partially downloads and then errors indicates 
>something wrong with the distribution profile.
> 
>-- 
>Jacqueline Landman Gay | jac...@hyperactivesw.com
>HyperActive Software   | http://www.hyperactivesw.com
> 
> 
>___
>use-livecode mailing list
>use-livecode@lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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

MDM and App deployment

2017-04-05 Thread JOHN PATTEN via use-livecode
Hi All,

History - We use JAMF (Casper) as our MDM. Our math teachers have been using an 
app called Casper Focus which locks students into a particular web site for 
when they are giving  the students an assessment. JAMF no longer supports 
Casper Focus now that Apple has created the Classroom app. However, the 
Classroom app does not have the ability to lock students to a specific webs 
site, only to specific apps.  

In comes LiveCode. I create a little secure web browser app that only goes to 
their, one,  math web site, and now teachers can use Apple Classroom and my app 
to secure students to  the app i created when giving their assessments. 

Problem: I can upload the App just fine into JAMF and into the JAMF Self 
Service app. We use our Enterprise Apple Developer profile to create an iOS app 
in LiveCode. I then, because of past practice, create a folder and title it 
“Payload, “ drop the iOS app into the folder, compress the folder, and rename 
it my app.ipa.  

A student iPad can see the app in their Self Service app, but when they go to 
install it reports it can’t download at this time.

Here is a little video demo:  https://youtu.be/--JJPUx3Zlg 


The app is not pretty, but it is functional. It is essentially a browser object 
with a little behind the scenes data gathering via mysql on its usage. The data 
is just for me to see how it’s being used.

Anybody distributed iOS apps via an MDM? Is there anything that has to be done 
beyond the Standalone Settings configuration window, i.e info.plist etc. etc?

If I can get this MDM distribution thing figured out, I hope to do more :)

Thank you!







___
use-livecode mailing list
use-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: Quasi Student Secure Web Browser?

2017-03-30 Thread JOHN PATTEN via use-livecode
Never mind… Figured out where all commands that go with the new browser widget 
were located (release notes).  I was looking in the dictionary and never saw 
them until I saw another post on the list.

This works:

on browserDocumentLoadBegin pURL

put the itemDel into tOrgItemDel

set the itemDel to "/"

if item 3 of pURL is not "www.myopenmath.com" then

launch url "https://www.myopenmath.com; in widget "OpenMathBrowser"

answer "Sorry that link is not accessible at this time."

end if

end browserDocumentLoadBegin


If anybody else is looking for those browser widget commands they can be found 
in the release notes here:  

http://livecodestatic.com/downloads/livecode/8_0_0/LiveCodeNotes-8_0_0_dp_11.pdf
 
<http://livecodestatic.com/downloads/livecode/8_0_0/LiveCodeNotes-8_0_0_dp_11.pdf>

Cheers!

John Patten
SUSD

> On Mar 29, 2017, at 6:32 PM, JOHN PATTEN via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hi All,
> 
> I’m attempting to create a simple secure web browser iOS app for some 
> teachers. I want to prevent any links within an approved site (i.e. 
> “www.approvedsite.com") that link out to others sites from launching. For 
> example, if the "www.approvedsite.com" has a link out to Youtube.com, I want 
> to detect that it is outside the target site and prevent it from loading in 
> the browser object. If the link is within the approved site, i.e. 
> "www.approvedsite.com/anotherpage.html,” I want to allow that page to load in 
> the browser object.
> 
> At first I thought i would use a widget, but then did not see any command 
> that would get the url. So, I switched gears and went with the 
> mobileControlCreate browser strategy.  I thought I could use the 
> browserStartedLoading command, but I’m not quite sure how to go about it. 
> 
> I am not sure how to capture the link url when the user clicks/taps on the 
> link in the browser, and then check it against acceptable urls? 
> 
> I had this is the card script:
> 
> on browserStartedLoading pUrl
> put pUrl into tUrlLoading
> wait 50
> answer tUrlLoading
> set the itemdel to "/"
> answer item 2 of tUrlLoading
> if item 2 of tUrlLoading is not "www.myopenmath.com" then
> answer “You can not access this site."
> end if
> end browserStartedLoading
> 
> 
> Is there a better way to go about accomplishing this in LiveCode?
> 
> Thank you!
> 
> John Patten
> SUSD
> 
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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

Quasi Student Secure Web Browser?

2017-03-29 Thread JOHN PATTEN via use-livecode
Hi All,

I’m attempting to create a simple secure web browser iOS app for some teachers. 
I want to prevent any links within an approved site (i.e. 
“www.approvedsite.com") that link out to others sites from launching. For 
example, if the "www.approvedsite.com" has a link out to Youtube.com, I want to 
detect that it is outside the target site and prevent it from loading in the 
browser object. If the link is within the approved site, i.e. 
"www.approvedsite.com/anotherpage.html,” I want to allow that page to load in 
the browser object.

At first I thought i would use a widget, but then did not see any command that 
would get the url. So, I switched gears and went with the mobileControlCreate 
browser strategy.  I thought I could use the browserStartedLoading command, but 
I’m not quite sure how to go about it. 

I am not sure how to capture the link url when the user clicks/taps on the link 
in the browser, and then check it against acceptable urls? 

I had this is the card script:

on browserStartedLoading pUrl
put pUrl into tUrlLoading
wait 50
answer tUrlLoading
set the itemdel to "/"
answer item 2 of tUrlLoading
if item 2 of tUrlLoading is not "www.myopenmath.com" then
answer “You can not access this site."
end if
end browserStartedLoading


Is there a better way to go about accomplishing this in LiveCode?

Thank you!

John Patten
SUSD





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

Resize Images in on-rev folder via lc script?

2017-03-12 Thread JOHN PATTEN via use-livecode
Hi All,

I have a simple html form that uploads images to a directory on the on-rev 
server. The images are uploaded at different resolutions. I would like to have 
the on-rev server resize the width of the images  in that folder when users 
drop them into the server via an html form.

Is it possible using lc scripts on the on-rev server to resize the images? I 
can do the resize easily via a stack using the example here, 
http://lessons.livecode.com/m/4071/l/15018-how-to-proportionally-resize-an-image
 
<http://lessons.livecode.com/m/4071/l/15018-how-to-proportionally-resize-an-image>
 , but I’m not sure how that could be applied to a folder on the server using 
.lc scripts?

Thank you!
John Patten
SUSD


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

Re: Browser Widget Appears to be caching data (javascript)?

2017-02-05 Thread JOHN PATTEN via use-livecode
Hi Bill,

Did not seem to make a difference with the “?” added to the end. It is still 
going to the old site.

I have attached an example stack. 
https://dl.dropboxusercontent.com/u/6767916/Pano%20JavaScript%20Tester.livecode.zip

The “cow” hotspot should launch the NASA site instead of the cow site.  (I’m 
guessing it will work for you the first time though. I would have to change the 
url in the javascript after you were to try it once, and then see if the 
hotspot goes to the new url.)

The cow hotspot should be going to the nasa.gov site.


Thank you!

John Patten
SUSD
> On Feb 5, 2017, at 11:53 AM, William Prothero via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> John:
> Try adding “?” to the URL. This should force reload.
> Bill
> 
>> On Feb 5, 2017, at 11:31 AM, JOHN PATTEN via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Hi All,
>> 
>> How do you get the browser widget to dump any cached web content?
>> 
>> I have an html5 panoramic running in a browser widget. I change the 
>> javascript code associated to a hotspot to point to a different url, but the 
>> hotspot link continues to point to the old URL. 
>> 
>> If I launch the panorama in a browser (Chrome,) the hotspot points to the 
>> changed url.  
>> 
>> Why after loading the panorama in the browser widget does the hotspot 
>> continue to point to the old url?
>> 
>> Thank you!
>> 
>> John Patten
>> SUSD
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-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

Browser Widget Appears to be caching data (javascript)?

2017-02-05 Thread JOHN PATTEN via use-livecode
Hi All,

How do you get the browser widget to dump any cached web content?

I have an html5 panoramic running in a browser widget. I change the javascript 
code associated to a hotspot to point to a different url, but the hotspot link 
continues to point to the old URL. 

If I launch the panorama in a browser (Chrome,) the hotspot points to the 
changed url.  

Why after loading the panorama in the browser widget does the hotspot continue 
to point to the old url?

Thank you!

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


Re: JavaScript, Browser Object, VR with Hotspots?

2017-02-03 Thread JOHN PATTEN via use-livecode
Thanks Mike!

I posted this question on Pano2VR ggnome forum with a  little animation of the 
particular challenge. 

https://ggnome.com/forum/viewtopic.php?f=13=11663 
<https://ggnome.com/forum/viewtopic.php?f=13=11663>

There may be folks interested in what Livecode could do for their workflow too 
:)

Cheers!


> On Feb 2, 2017, at 7:56 PM, Mike Bonner via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Hmm. NO easy way to see the critical stuff from here but I found this post.
> 
> https://ggnome.com/forum/viewtopic.php?f=6=9123=35818=custom+function+hotspot#p35818
> 
> I think the key is to do similar to what is being done in the post.
> Basically,pass the value of me.hotspot.id to livecode as part of the
> function call, and add a switch block that gives a message based on the
> hotspot id. Very hard to actually test anything from here, but maybe there
> is something useful in the post.
> 
> On Thu, Feb 2, 2017 at 8:12 PM, JOHN PATTEN via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Hi All,
>> 
>> I managed to trial and error together a working html5 panorama using
>> Pan2VR (http://ggnome.com/pano2vr <http://ggnome.com/pano2vr>). The
>> interface of their software allows you to attach a javascript action to a
>> vr hotspot. The interface creates the following javascript for the hotspot
>> to trigger the LiveCode handler:
>> 
>> this._svg2.onclick=function (e) {
>>window.addEventListener('click',
>> function() {liveCode.myLiveCodeHandler2();});
>>}
>> 
>> (svg2 is the hotspot icon).
>> 
>> The hotspot in the vr adds some text to a field on the card when clicked,
>> waits 2 seconds, and then removes the text.
>> 
>> This javascript works only the first time, because after the hotspot is
>> clicked, the LiveCode handler is triggered any time the user clicks within
>> the vr of the browser object. (Javascript “event listener” listens for any
>> click in the browser object, after the hotspot is clicked once.)
>> 
>> The only solution I have found is to reload the html for the vr into the
>> browser object again. But that is not ideal.
>> 
>> I am aware of a the javascript command removeEventListener, and that
>> appears to be what I need, however I am not sure how I would go about and
>> use the script?  Its appears that “this.” is defined in the js as the
>> hotspot, and _svg2 is the hot spot ID, but everything I have tried to
>> cobble together to apply this command has not worked. I’m not sure where it
>> should even be located in the process?
>> 
>> I’ve shared the LiveCode project and VR files here:
>> https://dl.dropboxusercontent.com/u/6767916/VR_and_Javascript_Example.zip
>> <https://dl.dropboxusercontent.com/u/6767916/VR_and_Javascript_Example.zip
>>> 
>> 
>> Any help is greatly appreciated!
>> 
>> John Patten
>> SUSD
>> 
>> 
>> 
>>> On Jan 30, 2017, at 8:01 PM, Mike Bonner via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>> 
>>> Depending on what version of LC you're using,k and if you're using the
>>> widget, or openrevbrowser
>>> look at revBrowserAddJavascriptHandler in the dictionary.
>>> 
>>> If using the widget, use the dropdown to select the browser widget in the
>>> dictionary and look at the javascripthandlers property.
>>> 
>>> 
>>> 
>>> On Mon, Jan 30, 2017 at 8:22 PM, JOHN PATTEN via use-livecode <
>>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>>
>> wrote:
>>> 
>>>> Hi All,
>>>> 
>>>> I’m not sure if this is possible with Livecode, but I thought I’d ask
>>>> anyways.
>>>> 
>>>> I have a html5 panorama I created in a trial version of Pano2VR. I
>> posted
>>>> it up here: http://jpatten.on-rev.com/vrjs/index.html <
>> http://jpatten.on-rev.com/vrjs/index.html> <
>>>> http://jpatten.on-rev.com/vrjs/index.html <http://jpatten.on-rev.com/
>> vrjs/index.html>>
>>>> 
>>>> This pano has one hot spot that just throws a JavaScript alert, “Hello
>>>> World.”  So I know I can create a Javascript inside a hotspot in the
>> pano
>>>> using the Pano2VR app.
>>>> 
>>>> Here are my questions.
>>>> 
>>>> 1. Can Livecode intercept the Javascript result in the browser object
>> and
>>>> act on it?  If it can, I’m guessing I could have it r

Re: JavaScript, Browser Object, VR with Hotspots?

2017-02-02 Thread JOHN PATTEN via use-livecode
Hi All,

I managed to trial and error together a working html5 panorama using Pan2VR 
(http://ggnome.com/pano2vr <http://ggnome.com/pano2vr>). The interface of their 
software allows you to attach a javascript action to a vr hotspot. The 
interface creates the following javascript for the hotspot to trigger the 
LiveCode handler: 

this._svg2.onclick=function (e) {
window.addEventListener('click', function() 
{liveCode.myLiveCodeHandler2();});
}

(svg2 is the hotspot icon).

The hotspot in the vr adds some text to a field on the card when clicked, waits 
2 seconds, and then removes the text.

This javascript works only the first time, because after the hotspot is 
clicked, the LiveCode handler is triggered any time the user clicks within the 
vr of the browser object. (Javascript “event listener” listens for any click in 
the browser object, after the hotspot is clicked once.)

The only solution I have found is to reload the html for the vr into the 
browser object again. But that is not ideal.

I am aware of a the javascript command removeEventListener, and that appears to 
be what I need, however I am not sure how I would go about and use the script?  
Its appears that “this.” is defined in the js as the hotspot, and _svg2 is the 
hot spot ID, but everything I have tried to cobble together to apply this 
command has not worked. I’m not sure where it should even be located in the 
process?

I’ve shared the LiveCode project and VR files here:  
https://dl.dropboxusercontent.com/u/6767916/VR_and_Javascript_Example.zip 
<https://dl.dropboxusercontent.com/u/6767916/VR_and_Javascript_Example.zip>

Any help is greatly appreciated!

John Patten
SUSD



> On Jan 30, 2017, at 8:01 PM, Mike Bonner via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> Depending on what version of LC you're using,k and if you're using the
> widget, or openrevbrowser
> look at revBrowserAddJavascriptHandler in the dictionary.
> 
> If using the widget, use the dropdown to select the browser widget in the
> dictionary and look at the javascripthandlers property.
> 
> 
> 
> On Mon, Jan 30, 2017 at 8:22 PM, JOHN PATTEN via use-livecode <
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>> wrote:
> 
>> Hi All,
>> 
>> I’m not sure if this is possible with Livecode, but I thought I’d ask
>> anyways.
>> 
>> I have a html5 panorama I created in a trial version of Pano2VR. I posted
>> it up here: http://jpatten.on-rev.com/vrjs/index.html 
>> <http://jpatten.on-rev.com/vrjs/index.html> <
>> http://jpatten.on-rev.com/vrjs/index.html 
>> <http://jpatten.on-rev.com/vrjs/index.html>>
>> 
>> This pano has one hot spot that just throws a JavaScript alert, “Hello
>> World.”  So I know I can create a Javascript inside a hotspot in the pano
>> using the Pano2VR app.
>> 
>> Here are my questions.
>> 
>> 1. Can Livecode intercept the Javascript result in the browser object and
>> act on it?  If it can, I’m guessing I could have it return text and then
>> have Livecode run an action. Something like…  if varText = “picture 1”
>> then, show picture one … else/switch if vartex = "picture 2" then open
>> "picture 2", etc. etc. etc.
>> 
>> 
>> 2. I would like to have hotspots in a panoramic image run JavaScripts that
>> LiveCode intercepts, and then act on what it catches to runs scripts in the
>> stack. One hot spot might open and image. Another might open a substack,
>> etc. etc. all within the LiveCode project. The Browser Object is used only
>> to present the panoramic image, and the pano image acts as s pseudo
>> navigation object for additional content.
>> 
>> Anybody have a simple example of what the Javascript in the pano might
>> look like, as opposed to just an alert? What scripts would I use to capture
>> and act on the Javascript in the browser object?
>> 
>> Or, maybe this is not possible…?
>> 
>> Thank you!
>> 
>> John Patten
>> SUSD
>> 
>> 
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode 
>> <http://lists.runrev.com/mailman/listinfo/use-livecode>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode 
> <http://lists.runrev.com/mailman/listinfo/use-livecode>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

JavaScript, Browser Object, VR with Hotspots?

2017-01-30 Thread JOHN PATTEN via use-livecode
Hi All,

I’m not sure if this is possible with Livecode, but I thought I’d ask anyways. 

I have a html5 panorama I created in a trial version of Pano2VR. I posted it up 
here: http://jpatten.on-rev.com/vrjs/index.html 
<http://jpatten.on-rev.com/vrjs/index.html>

This pano has one hot spot that just throws a JavaScript alert, “Hello World.”  
So I know I can create a Javascript inside a hotspot in the pano using the 
Pano2VR app.

Here are my questions.

1. Can Livecode intercept the Javascript result in the browser object and act 
on it?  If it can, I’m guessing I could have it return text and then have 
Livecode run an action. Something like…  if varText = “picture 1” then, show 
picture one … else/switch if vartex = "picture 2" then open "picture 2", etc. 
etc. etc.


2. I would like to have hotspots in a panoramic image run JavaScripts that 
LiveCode intercepts, and then act on what it catches to runs scripts in the 
stack. One hot spot might open and image. Another might open a substack, etc. 
etc. all within the LiveCode project. The Browser Object is used only to 
present the panoramic image, and the pano image acts as s pseudo navigation 
object for additional content.

Anybody have a simple example of what the Javascript in the pano might look 
like, as opposed to just an alert? What scripts would I use to capture and act 
on the Javascript in the browser object?

Or, maybe this is not possible…?

Thank you!

John Patten
SUSD





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

Re: Inconsistent results in simple script

2016-11-16 Thread JOHN PATTEN
Thanks Everyone,

One follow up question, how is the script that Richard provided:

on mouseUp
  put fld "csv1" into tStudentArray
  split tStudentArray by cr and comma
  put fld "csv2" into tDeviceArray
  split tDeviceArray by cr and comma
  repeat for each key tStudentID in tStudentArray
 put tStudentArray[tStudentID] into tStudentName
 put tDeviceArray[tStudentID] into tDeviceID
 put tStudentID &","& tStudentName &","& tDeviceID  \
 after tCombinedList
  end repeat
  delete last char of tCombinedList -- trailing CR
  put tCombinedList into fld "Upload File"
end mouseUp

…find the correct line via the barcode in the serial number list?  


Is he using the array item [tStudentID] (which I believe is actually 
[tBarcodeID]) to key in on the content in both arrays?  So in a sense, it is 
doing a find this barcode, but in an array construct?

When you don’t use arrays very much, and you have old, slow, brute force 
scripting skills, arrays are kind of hard to wrap your head around. But I 
obviously see their advantages :)

Thank you!




> On Nov 16, 2016, at 1:08 PM, JOHN PATTEN <johnpat...@me.com> wrote:
> 
> Thanks Mike and Craig,
> 
> One of my challenges is the two lists do not mirror each other by barcode 
> number. The barcodes are not on the same lines in each list. That is why I 
> was running the “find barcode in list two.”  I have teachers and other staff 
> in the list of serial numbers and I was hoping not to have to weed them out 
> of my lists so that the two lists lined up.
> 
> Can I use an array and still search be barcode prior to doing the username 
> and serial number?
> 
> /..Yes Craig, old HyperCard habits are hard to break, at least for me :) …/
> 
> Thank you!
> 
> John Patten
> SUSD
> 
> 
> 
>> On Nov 16, 2016, at 12:58 PM, Mike Bonner <bonnm...@gmail.com> wrote:
>> 
>> Craig is right, this is asking to be an array, though if you prefer a flat
>> file you can combine it at the end like so.
>> 
>> on mouseUp
>> repeat for each line tLine in field "csv1"
>>  put item 2 of tLine into tDataA[item 1 of tLine]
>> end repeat
>> 
>> repeat for each line tLIne in field "csv2"
>>  put comma & item 2 of tLine after tDataA[item 1 of tLine]
>> end repeat
>> combine tDataA with return and comma
>> 
>> /*
>> Places the following into tDataA
>> 11234,maryjane,SDKTHYUPTO9
>> 12234,stevesmith,SDTKLL54RR2
>> 12345,johndoe,SDTKNY12345
>> */
>> end mouseUp
>> 
>> On Wed, Nov 16, 2016 at 1:43 PM, JOHN PATTEN <johnpat...@me.com> wrote:
>> 
>>> Hi Craig,
>>> 
>>> I have about 1000 students that are in a library system showing them as
>>> having checked out an iPad. In the library system it uses the student
>>> username and the barcode as the item identifier.
>>> 
>>> I have another list that shows our iPads by barcode and serial number.
>>> 
>>> Unfortunately there is no way for me to pull a report that shows the
>>> student username and the device serial number in one report. So I was
>>> essentially searching for the barcode in both lists and then combining the
>>> username from one and the serial number from the other. Ultimately ending
>>> up with a list that consists of student username and device serial number.
>>> 
>>> I hope that is a little clearer.
>>> 
>>> Thank you!
>>> 
>>> John Patten
>>> SUSD
>>> 
>>> 
>>>> On Nov 16, 2016, at 12:22 PM, dunbarx <dunb...@aol.com> wrote:
>>>> 
>>>> HI.
>>>> 
>>>> So, a single list. What is the relationship between the fact that a
>>>> particular barcode refers both to a student and a serial number? In other
>>>> words, if you had a single list, how would "12345" relate to both "john
>>> doe"
>>>> and "SDTKNY12345"?
>>>> Would you simply have two lines:
>>>> 
>>>> 12345,johndoe
>>>> 12345,SDTKNY12345
>>>> 
>>>> Also, I do not understand what you mean when you said:
>>>> 
>>>> "I have cut my username list down to about 30."
>>>> 
>>>> Does that mean that in your 1000 line first list, the usernames appear
>>> with
>>>> multiple barcodes? Or are those lines empty? Or is that list now only 30
>>>> lines long?
>>>> 
>>>> It looks like this begs for an array, but I am missing what you expect as
>>>> o

Re: Inconsistent results in simple script

2016-11-16 Thread JOHN PATTEN
Thanks Mike and Craig,

One of my challenges is the two lists do not mirror each other by barcode 
number. The barcodes are not on the same lines in each list. That is why I was 
running the “find barcode in list two.”  I have teachers and other staff in the 
list of serial numbers and I was hoping not to have to weed them out of my 
lists so that the two lists lined up.

Can I use an array and still search be barcode prior to doing the username and 
serial number?

/..Yes Craig, old HyperCard habits are hard to break, at least for me :) …/

Thank you!

John Patten
SUSD



> On Nov 16, 2016, at 12:58 PM, Mike Bonner <bonnm...@gmail.com> wrote:
> 
> Craig is right, this is asking to be an array, though if you prefer a flat
> file you can combine it at the end like so.
> 
> on mouseUp
> repeat for each line tLine in field "csv1"
>   put item 2 of tLine into tDataA[item 1 of tLine]
> end repeat
> 
> repeat for each line tLIne in field "csv2"
>   put comma & item 2 of tLine after tDataA[item 1 of tLine]
> end repeat
> combine tDataA with return and comma
> 
> /*
> Places the following into tDataA
> 11234,maryjane,SDKTHYUPTO9
> 12234,stevesmith,SDTKLL54RR2
> 12345,johndoe,SDTKNY12345
> */
> end mouseUp
> 
> On Wed, Nov 16, 2016 at 1:43 PM, JOHN PATTEN <johnpat...@me.com> wrote:
> 
>> Hi Craig,
>> 
>> I have about 1000 students that are in a library system showing them as
>> having checked out an iPad. In the library system it uses the student
>> username and the barcode as the item identifier.
>> 
>> I have another list that shows our iPads by barcode and serial number.
>> 
>> Unfortunately there is no way for me to pull a report that shows the
>> student username and the device serial number in one report. So I was
>> essentially searching for the barcode in both lists and then combining the
>> username from one and the serial number from the other. Ultimately ending
>> up with a list that consists of student username and device serial number.
>> 
>> I hope that is a little clearer.
>> 
>> Thank you!
>> 
>> John Patten
>> SUSD
>> 
>> 
>>> On Nov 16, 2016, at 12:22 PM, dunbarx <dunb...@aol.com> wrote:
>>> 
>>> HI.
>>> 
>>> So, a single list. What is the relationship between the fact that a
>>> particular barcode refers both to a student and a serial number? In other
>>> words, if you had a single list, how would "12345" relate to both "john
>> doe"
>>> and "SDTKNY12345"?
>>> Would you simply have two lines:
>>> 
>>> 12345,johndoe
>>> 12345,SDTKNY12345
>>> 
>>> Also, I do not understand what you mean when you said:
>>> 
>>> "I have cut my username list down to about 30."
>>> 
>>> Does that mean that in your 1000 line first list, the usernames appear
>> with
>>> multiple barcodes? Or are those lines empty? Or is that list now only 30
>>> lines long?
>>> 
>>> It looks like this begs for an array, but I am missing what you expect as
>>> output. Whatever it is, the procedure will be simple. But I cannot even
>>> start to advise about that procedure until I know what the answer is.
>>> 
>>> Craig
>>> 
>>> 
>>> 
>>> --
>>> View this message in context: http://runtime-revolution.
>> 278305.n4.nabble.com/Inconsistent-results-in-simple-script-
>> tp4710376p4710377.html
>>> Sent from the Revolution - User mailing list archive at Nabble.com.
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


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

Re: Inconsistent results in simple script

2016-11-16 Thread JOHN PATTEN
Hi Craig,

I have about 1000 students that are in a library system showing them as having 
checked out an iPad. In the library system it uses the student username and the 
barcode as the item identifier.

I have another list that shows our iPads by barcode and serial number.

Unfortunately there is no way for me to pull a report that shows the student 
username and the device serial number in one report. So I was essentially 
searching for the barcode in both lists and then combining the username from 
one and the serial number from the other. Ultimately ending up with a list that 
consists of student username and device serial number.

I hope that is a little clearer. 

Thank you!

John Patten
SUSD


> On Nov 16, 2016, at 12:22 PM, dunbarx <dunb...@aol.com> wrote:
> 
> HI.
> 
> So, a single list. What is the relationship between the fact that a
> particular barcode refers both to a student and a serial number? In other
> words, if you had a single list, how would "12345" relate to both "john doe"
> and "SDTKNY12345"?
> Would you simply have two lines:
> 
> 12345,johndoe
> 12345,SDTKNY12345 
> 
> Also, I do not understand what you mean when you said:
> 
> "I have cut my username list down to about 30."
> 
> Does that mean that in your 1000 line first list, the usernames appear with
> multiple barcodes? Or are those lines empty? Or is that list now only 30
> lines long?
> 
> It looks like this begs for an array, but I am missing what you expect as
> output. Whatever it is, the procedure will be simple. But I cannot even
> start to advise about that procedure until I know what the answer is.
> 
> Craig
> 
> 
> 
> --
> View this message in context: 
> http://runtime-revolution.278305.n4.nabble.com/Inconsistent-results-in-simple-script-tp4710376p4710377.html
> Sent from the Revolution - User mailing list archive at Nabble.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


Inconsistent results in simple script

2016-11-16 Thread JOHN PATTEN
Hi All,

I have two, two column lists. Each list has the same barcode item (item 1). The 
second item in the first list is a username, and the second item in the second 
list is a serial number. I am trying to combine the username and serial number 
into one list. I have about 1000 lines in each list. However, I have cut my 
username list down to about 30. My script is leaving out username/serial number 
combinations that are common in each list. I am not sure why?

For example: 

List 1

12345,johndoe
11234,maryjane
12234,stevesmith

List 2

12345,SDTKNY12345
12234,SDTKLL54RR2
11234,SDKTHYUPTO9

I’m sure there are more elegant ways to do this, but here is my script:

on mouseUp

   lock screen

   put cd fld "csv1" into tcsv1

   repeat for number of lines in tcsv1

  put line 1 of tcsv1 into tStudentInfo

  put item 1 of tStudentInfo into tbarcode

  put the number of chars of tBarcode into tCharCount

  --if tCharCount > 5 then

  --   delete char 1 of tbarcode

  --end if

  put cd fld "csv2" into tcsv2

  find tBarcode in cd fld "csv2"

  if the result is empty then

 put the foundLine into tLine

 select tLine

 --put the selectedText of tcsv2 into tdeviceInfo

 put the selectedText of cd fld "csv2" into tDeviceInfo

 delete char 1 of item 2 of tDeviceInfo
 put item 2 of tStudentInfo & "," & item 2 of tDeviceInfo & return 
after tUploadFile

   else 

  end if

  put empty into tStudentInfo

  put empty into tbarcode

  put empty into tCharCount

  put empty into tLine

  put empty into tDeviceInfo

  delete line 1 of tcsv1

   end repeat

   put tUploadFile into cd fld "Upload File"

   unlock screen

end mouseUp


Any suggestions would be helpful.

Thank you!
John Patten
SUSD


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

MergeMK at getting Lat and Log on drop of marker?

2016-08-14 Thread JOHN PATTEN
Hi All,

For those of you that have used MergeMk (Google Maps) extension in Livecode, is 
is possible to get the latitude, longitude of a user’s click on the map? Or, if 
they drop a marker at a specific location, is it possible to get the latitude 
and longitude of the marker?  

Thank you!

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

Re: Using the MergGoogle with Google Sheets

2016-05-26 Thread JOHN PATTEN
Hi Mike,

Depends on what issue you are referring to :) ...

I filed a bug report and it appears to be making its way through the process.

Thank you!
John Patten 
SUSD

Sent from my iPad

> On May 25, 2016, at 7:20 AM, Mike Kerner <mikeker...@roadrunner.com> wrote:
> 
> Did you guys get your issue figured out?
> 
>> On Sun, May 22, 2016 at 1:43 AM, Peter Bogdanoff <bogdan...@me.com> wrote:
>> 
>> You’re right. I wonder if they thought about non-beneficial ways this tech
>> might be used/hacked, like sending your “friend” decayed fish.
>> 
>> Peter
>> 
>>> On May 21, 2016, at 5:41 PM, Martin Koob <mk...@rogers.com> wrote:
>>> 
>>> If you have the oPhone app you don't need to be in the same room anymore
>> to
>>> get their attention that way.
>>> 
>>> http://www.wired.com/2015/04/ophone-onotes-itune-of-smell/
>>> 
>>> That would the worst ring scent.  Although it would also be really mean
>> to
>>> send someone 'burnt toast'.
>>> 
>>> I guess the 'o' stands for odour?
>>> 
>>> I think a better name would be the smellophone.  The smellovision will be
>>> out soon after I am sure.
>>> 
>>> Martin
>>> 
>>> 
>>> 
>>> 
>>> 
>>> --
>>> View this message in context:
>> http://runtime-revolution.278305.n4.nabble.com/Using-the-MergGoogle-with-Google-Sheets-tp4704900p4705018.html
>>> Sent from the Revolution - User mailing list archive at Nabble.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
> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> use-livecode mailing list
> use-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: Using the MergGoogle with Google Sheets

2016-05-21 Thread JOHN PATTEN
I submitted a bug report, Bug 17706 
<http://quality.livecode.com/show_bug.cgi?id=17706>


Thank you!

John Patten
SUSD



> On May 20, 2016, at 2:28 PM, Monte Goulding <mo...@appisle.net> wrote:.

> 
> 
>> On 21 May 2016, at 5:53 AM, Roger Eller <roger.e.el...@sealedair.com> wrote:
>> 
>> That's so weird.  Me too.
> 
> Woah guys stop farting and submit a bug report ;-)
> 
> Clearly there’s something that needs to be investigated.
> 
> Cheers
> 
> Monte
> ___
> use-livecode mailing list
> use-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: Using the MergGoogle with Google Sheets

2016-05-20 Thread JOHN PATTEN
Mike,

I never remember ever getting a request for Keychain access from LiveCode. I 
may have a long time ago, and just don’t remember though.  

Is there a way to check and see if LiveCode has access to the Keychain? When I 
look in the KeyChain app I don’t see any references for LiveCode.

Thanks!

John Patten
SUSD

> On May 20, 2016, at 11:06 AM, Mike Kerner <mikeker...@roadrunner.com> wrote:
> 
> I just tried 6.7.8 mac with merggoogle 1.0.12 test stack, and it works
> fine.  if I go up to 7.1.4 Stable or 8.0.1 rc1 I get the answer dialogs of
> death.
> 
> Next question:  Did you ever ban LC from getting access to your keychain?
> At some time, you probably got a dialog asking for access to it.
> 
> On Fri, May 20, 2016 at 1:56 PM, JOHN PATTEN <johnpat...@me.com 
> <mailto:johnpat...@me.com>> wrote:
> 
>> Hi All,
>> 
>> I have tried the demo stack in multiple versions of Livecode, including
>> 6.7.8, and I get the same result. An answer dialog appears when the stack
>> launches: https://flic.kr/p/Hkzs88 <https://flic.kr/p/Hkzs88> 
>> <https://flic.kr/p/Hkzs88 <https://flic.kr/p/Hkzs88>>
>> 
>> I even copied the mergGoogle.lcext extension into the Extensions folder
>> identified in the Preferences.
>> 
>> There must be something else that is not quite right now with published
>> extension, or a change at Google. However, that doesn’t explain why Mike’s
>> is still working.
>> 
>> Thank you!
>> 
>> John Patten
>> SUSD
>> 
>> 
>> 
>> 
>>> On May 20, 2016, at 10:44 AM, Mike Kerner <mikeker...@roadrunner.com>
>> wrote:
>>> 
>>> OK, so try it with 6.8.10.  I just ran the latest version with 6.7.2,
>>> though.  My every-day instance runs in 6.7.8
>>> 
>>> On Fri, May 20, 2016 at 12:48 PM, Roger Eller <
>> roger.e.el...@sealedair.com>
>>> wrote:
>>> 
>>>> Monte said a few emails back that 6.8.10 is the oldest version that
>> works
>>>> with the external.
>>>> 
>>>> ~Roger
>>>> 
>>>> On Fri, May 20, 2016 at 12:23 PM, Mike Kerner <
>> mikeker...@roadrunner.com>
>>>> wrote:
>>>> 
>>>>> I just tried opening the sample in 8 and in 7 and it fails in both.
>> Try
>>>>> 6.  I did 6.7.8 and 6.7.2.  mergGoogle might require a recompile.
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> On the first day, God created the heavens and the Earth
>>> On the second day, God created the oceans.
>>> On the third day, God put the animals on hold for a few hours,
>>>  and did a little diving.
>>> And God said, "This is good."
>>> ___
>>> use-livecode mailing list
>>> use-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 <mailto:use-livecode@lists.runrev.com>
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode 
>> <http://lists.runrev.com/mailman/listinfo/use-livecode>
>> 
> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode 
> <http://lists.runrev.com/mailman/listinfo/use-livecode>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Using the MergGoogle with Google Sheets

2016-05-20 Thread JOHN PATTEN
Hi All, 

I have tried the demo stack in multiple versions of Livecode, including 6.7.8, 
and I get the same result. An answer dialog appears when the stack launches: 
https://flic.kr/p/Hkzs88 <https://flic.kr/p/Hkzs88>

I even copied the mergGoogle.lcext extension into the Extensions folder 
identified in the Preferences.

There must be something else that is not quite right now with published 
extension, or a change at Google. However, that doesn’t explain why Mike’s is 
still working. 

Thank you!

John Patten
SUSD




> On May 20, 2016, at 10:44 AM, Mike Kerner <mikeker...@roadrunner.com> wrote:
> 
> OK, so try it with 6.8.10.  I just ran the latest version with 6.7.2,
> though.  My every-day instance runs in 6.7.8
> 
> On Fri, May 20, 2016 at 12:48 PM, Roger Eller <roger.e.el...@sealedair.com>
> wrote:
> 
>> Monte said a few emails back that 6.8.10 is the oldest version that works
>> with the external.
>> 
>> ~Roger
>> 
>> On Fri, May 20, 2016 at 12:23 PM, Mike Kerner <mikeker...@roadrunner.com>
>> wrote:
>> 
>>> I just tried opening the sample in 8 and in 7 and it fails in both.  Try
>>> 6.  I did 6.7.8 and 6.7.2.  mergGoogle might require a recompile.
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> use-livecode mailing list
> use-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: Using the MergGoogle with Google Sheets

2016-05-20 Thread JOHN PATTEN
Hi Mike,

Oh, Should mention there is no “login” request either. It just shows the 
“answer” dialogue when the demo app is launched.

Thank you!


> On May 20, 2016, at 8:49 AM, JOHN PATTEN <johnpat...@me.com> wrote:
> 
> When I launch the example mergGoogle stack this is what it does:
> 
> https://flic.kr/p/Hkzs88 <https://flic.kr/p/Hkzs88>
> 
> Thanks!
> 
> 
>> On May 20, 2016, at 8:39 AM, Mike Kerner <mikeker...@roadrunner.com> wrote:
>> 
>> Let's back you up.  When you open the test stack and log in, what happens?
>> 
>> On Fri, May 20, 2016 at 10:58 AM, JOHN PATTEN <johnpat...@me.com> wrote:
>> 
>>> Hi All,
>>> 
>>> I’m still not getting this to work. I thought maybe it was because I was
>>> trying to talk to Google through our Google Apps For Education (Enterprise)
>>> edition at school.  I tried with my regular Google Account at home, but got
>>> the same results. The stack answers with:
>>> 219,25,11,mergGoogleAuth465,25,11.
>>> 
>>> Just for clarification on the Google Console components screen, I am
>>> logging into the Google API site and creating new Credentials of type Web
>>> Application. Do I have to enable a specific API? I see all the Google Apps
>>> APIs, but nothing specifically for Google Sheets.
>>> 
>>> Also, I am putting the “client secret” in quotes like the rest of the
>>> mergeGoogleAuth script.
>>> 
>>> And, I am using LiveCode 8.0, Build 13018 on a Mac running OS X 10.11.3.
>>> 
>>> Thank you!
>>> 
>>> John Patten
>>> SUSD
>>> 
>>> 
>>> 
>>> 
>>>> On May 19, 2016, at 4:22 PM, Monte Goulding <mo...@appisle.net> wrote:
>>>> 
>>>> 
>>>>> On 20 May 2016, at 9:19 AM, Monte Goulding <mo...@appisle.net> wrote:
>>>>> 
>>>>> In earlier versions of LiveCode
>>>> 
>>>> I should mention here that it will not work in versions of LC prior to
>>> 6.7.10 or in any version of LC Community.
>>>> 
>>>> Cheers
>>>> 
>>>> Monte
>>>> ___
>>>> use-livecode mailing list
>>>> use-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
>>> 
>> 
>> 
>> 
>> -- 
>> On the first day, God created the heavens and the Earth
>> On the second day, God created the oceans.
>> On the third day, God put the animals on hold for a few hours,
>>  and did a little diving.
>> And God said, "This is good."
>> ___
>> use-livecode mailing list
>> use-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: Using the MergGoogle with Google Sheets

2016-05-20 Thread JOHN PATTEN
When I launch the example mergGoogle stack this is what it does:

https://flic.kr/p/Hkzs88 <https://flic.kr/p/Hkzs88>

Thanks!


> On May 20, 2016, at 8:39 AM, Mike Kerner <mikeker...@roadrunner.com> wrote:
> 
> Let's back you up.  When you open the test stack and log in, what happens?
> 
> On Fri, May 20, 2016 at 10:58 AM, JOHN PATTEN <johnpat...@me.com> wrote:
> 
>> Hi All,
>> 
>> I’m still not getting this to work. I thought maybe it was because I was
>> trying to talk to Google through our Google Apps For Education (Enterprise)
>> edition at school.  I tried with my regular Google Account at home, but got
>> the same results. The stack answers with:
>> 219,25,11,mergGoogleAuth465,25,11.
>> 
>> Just for clarification on the Google Console components screen, I am
>> logging into the Google API site and creating new Credentials of type Web
>> Application. Do I have to enable a specific API? I see all the Google Apps
>> APIs, but nothing specifically for Google Sheets.
>> 
>> Also, I am putting the “client secret” in quotes like the rest of the
>> mergeGoogleAuth script.
>> 
>> And, I am using LiveCode 8.0, Build 13018 on a Mac running OS X 10.11.3.
>> 
>> Thank you!
>> 
>> John Patten
>> SUSD
>> 
>> 
>> 
>> 
>>> On May 19, 2016, at 4:22 PM, Monte Goulding <mo...@appisle.net> wrote:
>>> 
>>> 
>>>> On 20 May 2016, at 9:19 AM, Monte Goulding <mo...@appisle.net> wrote:
>>>> 
>>>> In earlier versions of LiveCode
>>> 
>>> I should mention here that it will not work in versions of LC prior to
>> 6.7.10 or in any version of LC Community.
>>> 
>>> Cheers
>>> 
>>> Monte
>>> ___
>>> use-livecode mailing list
>>> use-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
>> 
> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> use-livecode mailing list
> use-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: Using the MergGoogle with Google Sheets

2016-05-20 Thread JOHN PATTEN
Hi All,

I’m still not getting this to work. I thought maybe it was because I was trying 
to talk to Google through our Google Apps For Education (Enterprise) edition at 
school.  I tried with my regular Google Account at home, but got the same 
results. The stack answers with: 219,25,11,mergGoogleAuth465,25,11.

Just for clarification on the Google Console components screen, I am logging 
into the Google API site and creating new Credentials of type Web Application. 
Do I have to enable a specific API? I see all the Google Apps APIs, but nothing 
specifically for Google Sheets.

Also, I am putting the “client secret” in quotes like the rest of the 
mergeGoogleAuth script.

And, I am using LiveCode 8.0, Build 13018 on a Mac running OS X 10.11.3.

Thank you!

John Patten
SUSD




> On May 19, 2016, at 4:22 PM, Monte Goulding <mo...@appisle.net> wrote:
> 
> 
>> On 20 May 2016, at 9:19 AM, Monte Goulding <mo...@appisle.net> wrote:
>> 
>> In earlier versions of LiveCode
> 
> I should mention here that it will not work in versions of LC prior to 6.7.10 
> or in any version of LC Community.
> 
> Cheers
> 
> Monte
> ___
> use-livecode mailing list
> use-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: Using the MergGoogle with Google Sheets

2016-05-19 Thread JOHN PATTEN
Oops… Yes that was a typo. It returns 219,25,11,mergGoogleAuth  465,25,11”

Is it my understanding that the example stack should work right out of the 
“box?”

Also, the part about the pScope in the sample stack, it is 
“https://spreadsheets.google.com/feeds 
<https://spreadsheets.google.com/feeds>,” does this need to be changed to a 
specific spreadsheet url? 

I’m a little unclear on what the result I should be seeing in the sample stack? 
However, it seems like I should be pointing the sample stack to a specific 
Google spreadsheet. 

I see a drop down button labeled Spreadsheets. Will this show all the 
spreadsheets currently in my Google account when the stack is working correctly?

Thank you!


> On May 19, 2016, at 3:28 PM, Monte Goulding <mo...@appisle.net> wrote:
> 
> Is this a typo in your code or in your copying the answer dialog content?
> 
> Sent from my iPhone
> 
>> On 20 May 2016, at 8:17 AM, JOHN PATTEN <johnpat...@me.com> wrote:
>> 
>> mergGoogelAuth
> 
> ___
> use-livecode mailing list
> use-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 the MergGoogle with Google Sheets

2016-05-19 Thread JOHN PATTEN
Hi all!

 I have the MergGoogle extension and sample stack. I am attempting to get the 
sample stack included with mergGoogle working. 

I have gone to Google and created a OAuth 2.0 client ID and client secret. I 
have exchanged the existing client ID and added my client secret the “on 
authorize” routine. When I execute authorize it answers 
“219,25,11,mergGoogelAuth  465,25,11” . So I’m doing something wrong, as I 
would expect to at lease see the text “loading spreadsheets…” in the fld “info” 
if I was doing it right. 

I am using LiveCode 8.0 and it’s been a while since I have used any externals. 
I could be very easily forgetting a step in order to make this work.

I have found the documentation on Monte’s site related to the calls in 
MergGoogle, but I am not quite sure how to make it all work. I was hoping to 
get the example working, and the piecemeal it from there.

Any suggestions?

Thank you!
___
use-livecode mailing list
use-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: Infinite LiveCode, APIs and the Google Sheets API?

2016-05-19 Thread JOHN PATTEN
Thanks Mike…

I’m going to go take a look right now :)

Cheers!

John Patten
SUSD
> On May 19, 2016, at 11:37 AM, Mike Kerner <mikeker...@roadrunner.com> wrote:
> 
> look at MergGoogle.  It's a widget that we paid Monte to write so we could
> have all sorts of fun with Google Sheets, and might I say, we have all
> sorts of fun with Google Sheets.
> 
> On Thu, May 19, 2016 at 1:56 PM, JOHN PATTEN <johnpat...@me.com> wrote:
> 
>> Hi All,
>> 
>> So, I have never dived into any APIs, or LiveCode (Widget) Builder, but
>> yesterday I read about the the release of the Google Sheets API (
>> https://developers.google.com/sheets/ <
>> https://developers.google.com/sheets/>). If you look at the Google Sheets
>> documentation it lists some quick start strategies (
>> https://developers.google.com/sheets/quickstart/dotnet <
>> https://developers.google.com/sheets/quickstart/dotnet>) that require
>> specific development languages. What!?? No LiveCode option?  :)
>> 
>> Before I spend time trying to understand whether it would be possible to
>> tie a LiveCode project to a Google Spreadsheet, …the thinking here is that
>> it would be very useful to allow people/teachers/students to create
>> LiveCode apps and store simple data into a Google Spreadsheets. This would
>> be as opposed to storing them on an db. Google Sheets would give them the
>> ability to generate reports from the data their LiveCode apps sent to the
>> Google Sheet.
>> 
>> Does Infinite LiveCode (Widgets) and the Google Sheets API a provide the
>> potential to create a widget that would/could be used to say, define the
>> Google Sheet, the columns in a Google Sheet, and then the ability to send
>> data from LiveCode to the Google Spreadsheet? (Like maybe send an array of
>> data to the spreadsheet) Or, am I totally off the tracks with this idea?
>> 
>> I would not know where to start with something like this, but if folks
>> think it is possible, I’m game to learn.
>> 
>> Thanks for any feedback you may have!
>> 
>> John Patten
>> SUSD
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> ___
> use-livecode mailing list
> use-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

Infinite LiveCode, APIs and the Google Sheets API?

2016-05-19 Thread JOHN PATTEN
Hi All,

So, I have never dived into any APIs, or LiveCode (Widget) Builder, but 
yesterday I read about the the release of the Google Sheets API 
(https://developers.google.com/sheets/ 
<https://developers.google.com/sheets/>). If you look at the Google Sheets 
documentation it lists some quick start strategies 
(https://developers.google.com/sheets/quickstart/dotnet 
<https://developers.google.com/sheets/quickstart/dotnet>) that require specific 
development languages. What!?? No LiveCode option?  :)  

Before I spend time trying to understand whether it would be possible to tie a 
LiveCode project to a Google Spreadsheet, …the thinking here is that it would 
be very useful to allow people/teachers/students to create LiveCode apps and 
store simple data into a Google Spreadsheets. This would be as opposed to 
storing them on an db. Google Sheets would give them the ability to generate 
reports from the data their LiveCode apps sent to the Google Sheet. 

Does Infinite LiveCode (Widgets) and the Google Sheets API a provide the 
potential to create a widget that would/could be used to say, define the Google 
Sheet, the columns in a Google Sheet, and then the ability to send data from 
LiveCode to the Google Spreadsheet? (Like maybe send an array of data to the 
spreadsheet) Or, am I totally off the tracks with this idea?

I would not know where to start with something like this, but if folks think it 
is possible, I’m game to learn.

Thanks for any feedback you may have!

John Patten
SUSD


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

ArrowKey Handler in LiveCode 8?

2016-05-06 Thread JOHN PATTEN
Hi All,

I was going to use the arrow keys to move an object, something like what Devin 
wrote up a while ago:

on arrowKey pWhich
  # determine some way to designate which object is to be nudged
  put the long id of btn "test" into tSelObj # for example
  switch pWhich
case "left"
  put -1 into tXamount
  put 0 into tYamount
  break
case "up"
  put 0 into tXamount
  put -1 into tYamount
  break
case "right"
  put 1 into tXamount
  put 0 into tYamount
  break
case "down"
  put 0 into tXamount
  put 1 into tYamount
  break
  end switch
  move tSelObj relative tXamount,tYamount
end arrowKey
…and after a few tests in LiveCode 8, I can’t get anything to budge with the 
arrowkeys? I opened the same stack in LiveCode 7.06 and it works fine. 
Something change or is this a bug in 8?

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

Script for finding duplicate accounts and identifying dups

2015-11-19 Thread JOHN PATTEN
Hi All,

I have a list of user accounts and unique IDs. The user accounts are first 
initial + last name. A typical list might look like the following:

jdoe, 123456
ggarcia, 121212
ggarcia, 131313

I’m trying identify the duplicates, list the username and their unique 6 digit 
id.

I have been using the following code that Bernd shared while ago: 
http://forums.livecode.com/viewtopic.php?f=9=6226#p28787 
<http://forums.livecode.com/viewtopic.php?f=9=6226#p28787>

…but it only works if i leave off my unique 6 digit IDs from my list of 
accounts, naturally.  

I would like to be able to identify the user accounts that are exact duplicates 
but then differentiate them by their unique 6 digit ID. So essentially, create 
a new list of just the duplicates and ids, i.e.

ggarcia, 121212
ggarcia, 131313

Thanks in advance for any ideas!

John Patten
SUSD



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

Re: Script for finding duplicate accounts and identifying dups

2015-11-19 Thread JOHN PATTEN
Thanks Mike and Craig,

My issues was figuring out how to identify the item (username) in my list when 
I create and check via the array. I wasn’t sure about what that would look 
like, i.e.  "if tDataArray[item 1 of tLine] is empty then…”

With 8000 + user accounts, there is a very good chance that we could have 
multiple “ggarcia” or “msmith" account duplicates. Mike solution allows me to 
pick out the account by unique id and configure them appropriately.

Thanks Again!


> On Nov 19, 2015, at 12:42 PM, Mike Bonner <bonnm...@gmail.com> wrote:
> 
> I thought about the sort and compare method, and it works well if theres
> only 2 that match, more lines of code are needed if there can be multiple
> dupes.  But the single time through sort method is probably faster than the
> array method I posted even after tweaking it to allow for multiple dupes.
> 
> On Thu, Nov 19, 2015 at 1:27 PM, <dunb...@aol.com> wrote:
> 
>> Hi.
>> 
>> 
>> I did not read Bernd's response. Are the records on separate lines?
>> 
>> 
>> jdoe, 123456
>> ggarcia, 121212
>> ggarcia, 131313
>> 
>> 
>> If they are not. make then so. And then, why not sort the list, and in a
>> "repeat with..."  loop check each line with the line following. If they
>> match, extract the two indexes. This should take only six lines of code.
>> 
>> 
>> Craig Newman
>> 
>> 
>> 
>> -Original Message-
>> From: JOHN PATTEN <johnpat...@me.com>
>> To: How to use LiveCode <use-livecode@lists.runrev.com>
>> Sent: Thu, Nov 19, 2015 3:14 pm
>> Subject: Script for finding duplicate accounts and identifying dups
>> 
>> Hi All,I have a list of user accounts and unique IDs. The user accounts
>> are first initial + last name. A typical list might look like the
>> following:jdoe, 123456ggarcia, 121212ggarcia, 131313I’m trying identify the
>> duplicates, list the username and their unique 6 digit id.I have been using
>> the following code that Bernd shared while ago:
>> http://forums.livecode.com/viewtopic.php?f=9=6226#p28787 <
>> http://forums.livecode.com/viewtopic.php?f=9=6226#p28787>…but it only
>> works if i leave off my unique 6 digit IDs from my list of accounts,
>> naturally.  I would like to be able to identify the user accounts that are
>> exact duplicates but then differentiate them by their unique 6 digit ID. So
>> essentially, create a new list of just the duplicates and ids, i.e.ggarcia,
>> 121212ggarcia, 131313Thanks in advance for any ideas!John
>> PattenSUSD___use-livecode
>> mailing listuse-livecode@lists.runrev.comPlease 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: Browser Widget and loading local files?

2015-11-03 Thread JOHN PATTEN
Thanks Monte!

That was it :) 

> On Nov 3, 2015, at 9:07 PM, Monte Goulding  wrote:
> 
> & specialFolderpath("documents") & "/PanoWeaverFinal/pano3/_html5/pano3.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

Browser Widget and loading local files?

2015-11-03 Thread JOHN PATTEN
Hi All,

I just noticed that the browser widget in LiveCode 8 allows to set the visible 
of the widget. Is setting the visible possible in the previous CEFBrowser? I 
don’t think I had noticed that in the old browser object…

Also, are these widgets going to be compatible in iOS/Android too, and if so 
how would I set the browser to open a local file? 

Normally I would do a:

put revBrowserOpenCEF (the windowId of this stack, "file:" & 
specialFolderpath("documents") & "/PanoWeaverFinal/pano3/_html5/pano3.html") 
into sBrowserID 

…and it works. I tried different flavors of this in the browser widget with no 
success.

Thanks in advance!

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

Re: Business Application Framework

2015-08-15 Thread JOHN PATTEN
Hi All!

I'd second what Graham and Jacqueline shared. My version control system is, 
Save as... and the corresponding file creation dates. I would be interested 
in learning more about versions control and tracking, though LiveCode 
development is not my primary job. (My primary job is K8 education and 
technology.)

A hands on tutorial, where we are using the system collaboratively, on a Hello 
World project might be a good start.

For students today, interested in programming and engineering, exposure to this 
type of system sounds like a primary skill to me. 

John Patten
SUSD



Sent from my iPad

 On Aug 14, 2015, at 12:05 PM, J. Landman Gay jac...@hyperactivesw.com wrote:
 
 On 8/14/2015 1:47 PM, Graham Samuel wrote:
 To me the ideal is a system which can be explained to a team in an
 hour and which everyone can then stick to. My (fractured) reading of
 this conversation gives me the idea that we are approaching
 Gnome-ville, where really nothing can be explained in an hour.
 
 That's kind of where I'm at too. I think I'd really like github, and the 
 things Marty said were enticing, but it's more than I can absorb quickly and 
 apparently requires study. In fact, there's so much to learn that there are 
 entire books explaining it.
 
 That's more than I have time to devote to it, especially since I don't 
 usually work in teams, so I stick with what I know which is backups and notes.
 
 If someone who knows this stuff puts together something LC-compatible and 
 idiot-friendly, I'll take another look.
 
 -- 
 Jacqueline Landman Gay | jac...@hyperactivesw.com
 HyperActive Software   | http://www.hyperactivesw.com
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

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


Save Image to mySQL and Retrieve Image?

2015-06-08 Thread JOHN PATTEN
Hi All,

I have a a mobile app that takes a photo and POSTs the base64Encoded image to 
an .lc server script that saves it to a mySQL field.

set the vis of templateImage to false
   mobilePickPhoto camera
   put the last image into img imageHold
   put the text of image imageHold into tPhotoData
   put base64Encode(tPhotoData) into tPhotoData
   set the cImageData of img ImageHold to tPhotoData
   reset the templateImage
   put urlEncode(cd fld comments) into $Comments
  put the cImageData of img imageHold into tImage
  put comments=  $Comments  image=  tImage into tArgList
  post tArgList to URL http://servername.on-rev.com/ipad_1/add_image.lc”

The .lc script:
?lc
put revOpenDatabase 
(mysql”,servername.on-rev.com”,servername_images”,servername_images”,password)
 into tConID
put images_data into tTableName

put $_POST[comments] into tComment
put the internet date into tDate
put $_POST[image] into tImage

put _date, comments, image into tFields
 

put INSERT INTO  tTableName  (  tFields  ) VALUES (:1, :2, :3); 
into tSQL

revExecuteSQL tConID, tSQL,  tDate, tComment, tImage

revCloseDatabase tConID
put empty

?

I can see that there is content in the fields in the table and BLOB field 
displays [BLOB - 64KiB]. So I’m assuming the image data is in the field.

On the App I am queuing the db by record ID and trying to display the image 
from the DB.

 put revOpenDatabase 
(mysql,servername.on-rev.com,server_images,server_images,password) 
into tConID
   put revQueryDatabase(tConID, SELECT * FROM images_data WHERE _id=  field 
db_id  ;) into tRecordSet
   get revDatabaseColumnNamed(tRecordSet, image, tImage)
   put base64Decode(tImage) into tImage
   set the text of image db_image to tImage
   RevCloseCursor tRecordSet
   revCloseDatabase tConID


The image turns into a gray fill? No image. I seem to remember this happening 
in the past but can’t remember the solution?

Thank you!

John Patten
SUSD



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

Re: Save Image to mySQL and Retrieve Image?

2015-06-08 Thread JOHN PATTEN
Thanks Peter,

I made those changes, quotes around get revDatabaseColumnNamed(tRecordSet, 
image, tImage”) and *b for the BLOB. I also checked the result and it 
reported a “1” on the INSERT command and empty on the RevDatabaseColumnNamed 
call. 

But it is still filling the image object with a gray fill and no image?  I even 
eliminated the base64 routines with no luck. This changed the data reported in 
the BLOB field to: [BLOB- 611 B] from [BLOB - 64 KiB].  But still resulted in  
a gray fill in the image object when querying for the image.

Is there a way to extract the BLOB data manually using phpMyAdmin (download) 
and manipulate the data directly in LiveCode?

Thanks for the advice!

John Patten
SUSD




 On Jun 8, 2015, at 3:44 PM, Peter Haworth p...@lcsql.com wrote:
 
 Hi John,
 
 Couple of things.
 
 In your call to revExecuteSQL, I think the variable name containing the
 image data should be preceded by *b.  I say I think because the
 dictionary says to do that if it holds binary data but since you're base64
 encoding it, I believe that results in only ASCII characters. Nevertheless,
 you're putting it into a BLOB column ( I think) so maybe LC uses that as
 its criteria rather than the actual contents of the variable, so:
 
 revExecuteSQL tConID, tSQL,  tDate, tComment, *btImage
 
 In your call to revDatabaseColumnNamed, timage needs to be in quotes:
 
 get revDatabaseColumnNamed(tRecordSet, image, tImage)
 
 Also, try checking the result after each call to makes sure no errors
 occurred.  After the INSERT, it should contain 1 and after the
 revDatabaseColumnNamed, it should be empty.
 
 Also curious as to the reason for base64 encoding the data.  If you're
 putting it into a BLOB column, it should accept binary data without a
 problem.
 
 
 Pete
 lcSQL Software http://www.lcsql.com
 Home of lcStackBrowser http://www.lcsql.com/lcstackbrowser.html and
 SQLiteAdmin http://www.lcsql.com/sqliteadmin.html
 
 On Mon, Jun 8, 2015 at 3:10 PM, JOHN PATTEN johnpat...@me.com wrote:
 
 Hi All,
 
 I have a a mobile app that takes a photo and POSTs the base64Encoded image
 to an .lc server script that saves it to a mySQL field.
 
 set the vis of templateImage to false
   mobilePickPhoto camera
   put the last image into img imageHold
   put the text of image imageHold into tPhotoData
   put base64Encode(tPhotoData) into tPhotoData
   set the cImageData of img ImageHold to tPhotoData
   reset the templateImage
   put urlEncode(cd fld comments) into $Comments
  put the cImageData of img imageHold into tImage
  put comments=  $Comments  image=  tImage into tArgList
  post tArgList to URL http://servername.on-rev.com/ipad_1/add_image.lc”
 
 The .lc script:
 ?lc
 put revOpenDatabase 
 (mysql”,servername.on-rev.com”,servername_images”,servername_images”,password)
 into tConID
 put images_data into tTableName
 
 put $_POST[comments] into tComment
 put the internet date into tDate
 put $_POST[image] into tImage
 
 put _date, comments, image into tFields
 
 
 put INSERT INTO  tTableName  (  tFields  ) VALUES (:1, :2,
 :3); into tSQL
 
 revExecuteSQL tConID, tSQL,  tDate, tComment, tImage
 
 revCloseDatabase tConID
 put empty
 
 ?
 
 I can see that there is content in the fields in the table and BLOB field
 displays [BLOB - 64KiB]. So I’m assuming the image data is in the field.
 
 On the App I am queuing the db by record ID and trying to display the
 image from the DB.
 
 put revOpenDatabase 
 (mysql,servername.on-rev.com,server_images,server_images,password)
 into tConID
   put revQueryDatabase(tConID, SELECT * FROM images_data WHERE _id= 
 field db_id  ;) into tRecordSet
   get revDatabaseColumnNamed(tRecordSet, image, tImage)
   put base64Decode(tImage) into tImage
   set the text of image db_image to tImage
   RevCloseCursor tRecordSet
   revCloseDatabase tConID
 
 
 The image turns into a gray fill? No image. I seem to remember this
 happening in the past but can’t remember the solution?
 
 Thank you!
 
 John Patten
 SUSD
 
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 ___
 use-livecode mailing list
 use-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: Simple .lc Script to INSERT data...?

2015-06-06 Thread JOHN PATTEN
Yup. That was it… It’s incredible how easy it is to miss this kind of thing and 
waste time :( 

I can’t wait until I can just tell the robot to write the code for what I 
describe. The robot would never make this type of error ;)

Thanks Again!


 On Jun 5, 2015, at 5:14 PM, Mike Bonner bonnm...@gmail.com wrote:
 
 You're putting your data to post into ArgList
 And you're posting tArgList
 
 If thats not a typo here, I suspect its the typo culprit there.
 
 On Fri, Jun 5, 2015 at 5:01 PM, JOHN PATTEN johnpat...@me.com wrote:
 
 Thanks Matthias,
 
 I did try both ways $_POST and $_GET.  I get the same results; a new
 record is created but the fields are empty.  By the way, the LiveCode
 Cloud tutorials show $_POST for inserting new record too.
 
 I’ll keep looking :)
 
 
 On Jun 5, 2015, at 3:39 PM, Matthias Rebbe | M-R-D 
 matthias_livecode_150...@m-r-d.de wrote:
 
 John,
 
 if you post data to a livecode server script then you need to use
 $_post[] instead of $_get
 
 $_get[] is used if you add the parameters to the url like
 
 put  URL (http://username.on-rev.com/ipad_1/add_datga_2.lc?object_name=“
  tName) into tResult
 
 Regards,
 
 Matthias
 
 
 
 
 Am 06.06.2015 um 00:31 schrieb JOHN PATTEN johnpat...@me.com:
 
 Hi All,
 
 I must be missing something simple and I can’t find it…
 
 I have a mysql database with one table and one field. Varchar(1000)
 
 I have a LiveCode project with one button and the following code:
 
 on mouseUp
 put urlEncode(the name of target) into tName
 put object_name=  tName into ArgList
 --answer ArgList
 post tArgList to URL http://username.on-rev.com/ipad_1/add_data_2.lc;
 end mouseUp
 
 
 My .lc file looks like this:
 
 ?lc
 put revOpenDatabase 
 (mysql”,username.on-rev.com”,username_ipad_2”,username_ipad_2”,password)
 into tConID
 put ipad_data into tTableName
 put $_GET[object_name] into object_name
 put object_name into tFields
 
 put INSERT INTO  tTableName  (  tFields  ) VALUES (:1);
 into tSQL
 
 revExecuteSQL tConID, tSQL, object_name
 revCloseDatabase tConID
 put empty
 ?
 
 The .lc script creates a new record but it never puts the name of the
 button in the object_name field? The record is completely empty.  I was
 having the same problem on a much more complex database and script, so I
 thought I would super simplify but I’m still having the problem.
 
 Does anybody see anything I’m missing?
 
 Thank you!
 John Patten
 SUSD
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
 ___
 use-livecode mailing list
 use-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

Simple .lc Script to INSERT data...?

2015-06-05 Thread JOHN PATTEN
Hi All,

I must be missing something simple and I can’t find it…

I have a mysql database with one table and one field. Varchar(1000)

I have a LiveCode project with one button and the following code:

on mouseUp
   put urlEncode(the name of target) into tName
   put object_name=  tName into ArgList
   --answer ArgList
   post tArgList to URL http://username.on-rev.com/ipad_1/add_data_2.lc;
end mouseUp


My .lc file looks like this:

?lc
put revOpenDatabase 
(mysql”,username.on-rev.com”,username_ipad_2”,username_ipad_2”,password) 
into tConID
put ipad_data into tTableName
put $_GET[object_name] into object_name
put object_name into tFields

put INSERT INTO  tTableName  (  tFields  ) VALUES (:1); into tSQL

revExecuteSQL tConID, tSQL, object_name
revCloseDatabase tConID
put empty
?

The .lc script creates a new record but it never puts the name of the button in 
the object_name field? The record is completely empty.  I was having the same 
problem on a much more complex database and script, so I thought I would super 
simplify but I’m still having the problem.

Does anybody see anything I’m missing?

Thank you!
 John Patten
SUSD

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

Re: Simple .lc Script to INSERT data...?

2015-06-05 Thread JOHN PATTEN
Thanks Matthias,

I did try both ways $_POST and $_GET.  I get the same results; a new record is 
created but the fields are empty.  By the way, the LiveCode Cloud tutorials 
show $_POST for inserting new record too.

I’ll keep looking :)


 On Jun 5, 2015, at 3:39 PM, Matthias Rebbe | M-R-D 
 matthias_livecode_150...@m-r-d.de wrote:
 
 John,
 
 if you post data to a livecode server script then you need to use $_post[] 
 instead of $_get
 
 $_get[] is used if you add the parameters to the url like
 
 put  URL (http://username.on-rev.com/ipad_1/add_datga_2.lc?object_name=“  
 tName) into tResult
 
 Regards,
 
 Matthias
 
 
 
 
 Am 06.06.2015 um 00:31 schrieb JOHN PATTEN johnpat...@me.com:
 
 Hi All,
 
 I must be missing something simple and I can’t find it…
 
 I have a mysql database with one table and one field. Varchar(1000)
 
 I have a LiveCode project with one button and the following code:
 
 on mouseUp
  put urlEncode(the name of target) into tName
  put object_name=  tName into ArgList
  --answer ArgList
  post tArgList to URL http://username.on-rev.com/ipad_1/add_data_2.lc;
 end mouseUp
 
 
 My .lc file looks like this:
 
 ?lc
 put revOpenDatabase 
 (mysql”,username.on-rev.com”,username_ipad_2”,username_ipad_2”,password)
  into tConID
 put ipad_data into tTableName
 put $_GET[object_name] into object_name
 put object_name into tFields
 
 put INSERT INTO  tTableName  (  tFields  ) VALUES (:1); into tSQL
 
 revExecuteSQL tConID, tSQL, object_name
 revCloseDatabase tConID
 put empty
 ?
 
 The .lc script creates a new record but it never puts the name of the button 
 in the object_name field? The record is completely empty.  I was having the 
 same problem on a much more complex database and script, so I thought I 
 would super simplify but I’m still having the problem.
 
 Does anybody see anything I’m missing?
 
 Thank you!
 John Patten
 SUSD
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
 
 
 ___
 use-livecode mailing list
 use-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: iOS Profile Problems...Could not find a valid identity... (SOLVED)

2015-04-28 Thread JOHN PATTEN
Okay… maybe I’m just impatient.  

The certificates seemed to be acting odd the first time I double-clicked to 
install it. I deleted it from the KeyChain app, double clicked the certificate 
again to install, and it showed up in the KeyChain app as I remembered. There 
must be some kind of delayed reaction between when the cert gets created in the 
Developer site and when you can install it on your development machine??? I 
don’t know… 

This time the Standalone Builder created the app, and i was able to drag it 
over to the iPad successfully. 

All’s right with the world again :)

Thank you!

 On Apr 28, 2015, at 12:34 PM, JOHN PATTEN johnpat...@me.com wrote:
 
 Hi All,
 
 I have messed up my iOS profile settings in Standalone Builder. 
 
 Two days ago I built a Enterprise iOS standalone app fine. Made some change 
 to the app, and attempted to save out a new standalone version and i got a 
 “could not find a valid identity to use for the selected profile” message and 
 the build failed. (I think I some how changed the identifier name and missed 
 that…water under the bridge now..)
 
 In troubleshooting, i think I have just made things worse. I would like to 
 start from scratch.
 
 I am using following previous post, 
 http://forums.livecode.com/viewtopic.php?f=7t=22341 
 http://forums.livecode.com/viewtopic.php?f=7t=22341 Vedus provides steps 
 on recreating the necessary identities, keys, certs, etc.
 
 I stil was not successful. 
 
 I want to start from scratch on the Apple Developer Portal. Should I delete 
 all my certificates, identifiers, and provisioning profiles first, and then 
 follow Vedus’s described steps, or does LiveCode have better documentation 
 for setting up necessary components for building iOS apps?
 
 Also, in Standalone Settings, LiveCode is showing all my iOS profiles, even 
 the ones that have long since expired. How do i delete these profiles from 
 the StandAlone settings interface?
 
 I could not find anything that lays the process down from scratch.  Again, 
 this is using our Enterprise developer license.
 
 Thank you!
 
 
 ___
 use-livecode mailing list
 use-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

iOS Profile Problems...Could not find a valid identity...

2015-04-28 Thread JOHN PATTEN
Hi All,

I have messed up my iOS profile settings in Standalone Builder. 

Two days ago I built a Enterprise iOS standalone app fine. Made some change to 
the app, and attempted to save out a new standalone version and i got a “could 
not find a valid identity to use for the selected profile” message and the 
build failed. (I think I some how changed the identifier name and missed 
that…water under the bridge now..)

In troubleshooting, i think I have just made things worse. I would like to 
start from scratch.

I am using following previous post, 
http://forums.livecode.com/viewtopic.php?f=7t=22341 
http://forums.livecode.com/viewtopic.php?f=7t=22341 Vedus provides steps on 
recreating the necessary identities, keys, certs, etc.

I stil was not successful. 

I want to start from scratch on the Apple Developer Portal. Should I delete all 
my certificates, identifiers, and provisioning profiles first, and then follow 
Vedus’s described steps, or does LiveCode have better documentation for setting 
up necessary components for building iOS apps?

Also, in Standalone Settings, LiveCode is showing all my iOS profiles, even the 
ones that have long since expired. How do i delete these profiles from the 
StandAlone settings interface?

I could not find anything that lays the process down from scratch.  Again, this 
is using our Enterprise developer license.

Thank you!


___
use-livecode mailing list
use-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: INSERT and SQLlite command

2015-04-23 Thread JOHN PATTEN
Gosh darn it!  

Nevermind… 

I had the colon in the wrong spots  1: and 2: instead of :1 and :2 etc…. 

Thanks anyways!


 On Apr 23, 2015, at 9:26 AM, JOHN PATTEN johnpat...@me.com wrote:
 
 Hi All,
 
 I have a very simple SQL Lite database consisting of three fields, an ID 
 (INTEGER PRIMARY KEY) and two basic fields (technology char(200) and notes 
 char(200).
 
 I am trying to INSERT records into the database.
 
 This works:
 
 repeat with x=1 to the number of items in tTopics
  put item y of tTopics into $technology
  put item y of tTopics into $notes
  put INSERT into teacher_notes VALUES (null,'  $technology  ','  
 $notes  '); into tSQL
  revExecuteSQL tDatabaseID, tSQL
 
 This doesn’t work:
 
 repeat with x=1 to the number of items in tTopics
  put item y of tTopics into $technology
  put item y of tTopics into $notes
  put null into $id
  put INSERT INTO teacher_notes(  return  \
“id, technology, notes)  \
VALUES(  return  \
1:, 2:, 3:) into tSQL
  --answer tSQL
  revExecuteSQL tDatabaseID, tSQL, $id, $technology, $notes”
 
 Can anybody point out what I’m missing in the second version?  
 
 Thank you!
 
 John Patten
 SUSD
 
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


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

INSERT and SQLlite command

2015-04-23 Thread JOHN PATTEN
Hi All,

I have a very simple SQL Lite database consisting of three fields, an ID 
(INTEGER PRIMARY KEY) and two basic fields (technology char(200) and notes 
char(200).

I am trying to INSERT records into the database.

This works:

 repeat with x=1 to the number of items in tTopics
  put item y of tTopics into $technology
  put item y of tTopics into $notes
  put INSERT into teacher_notes VALUES (null,'  $technology  ','  
$notes  '); into tSQL
  revExecuteSQL tDatabaseID, tSQL

This doesn’t work:

repeat with x=1 to the number of items in tTopics
  put item y of tTopics into $technology
  put item y of tTopics into $notes
  put null into $id
  put INSERT INTO teacher_notes(  return  \
“id, technology, notes)  \
VALUES(  return  \
1:, 2:, 3:) into tSQL
  --answer tSQL
  revExecuteSQL tDatabaseID, tSQL, $id, $technology, $notes”

Can anybody point out what I’m missing in the second version?  

Thank you!

John Patten
SUSD



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

Pasting into browser object web page?

2015-02-27 Thread JOHN PATTEN
Hi All,

I’m copying some text from a field on a card via script (clipboardData[]) and 
attempting to paste it into a Browser object. It appears this is not possible. 
When I attempt to paste the text on the clipboard into the browser object web 
page, it does not paste. But if I try to paste the text into a separate 
browser, separate application, say Firefox, it works.

Is it not possible, or am I missing some setting on my browser object that 
needs to be set to allow pasting to the web page in a browser object?

Thanks in Advance!

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

Sending Google Script Commands via POST?

2015-01-30 Thread JOHN PATTEN
Hi All!

I know LiveCode can send html post commands. Is is possible to send a post 
command that activates a Google Script?

There is a Google Script that allows you to create a basic web form to upload 
files to a specific Google Drive folder. It is available here: 
http://www.labnol.org/internet/receive-files-in-google-drive/19697/ 
http://www.labnol.org/internet/receive-files-in-google-drive/19697/ ...if 
you’re curious.

The Google Script resides in your Google Drive and the accompanying html form 
uses the following code:

form id=myForm
input type=text name=myName placeholder=Your name..
input type=file name=myFile
input type=submit value=Upload File 
   onclick=this.value='Uploading..';
google.script.run.withSuccessHandler(fileUploaded)
.uploadFiles(this.parentNode);
return false;
/form

div id=output/div

script
function fileUploaded(status) {
document.getElementById('myForm').style.display = 'none';
document.getElementById('output').innerHTML = status;
}
/script

style
 input { display:block; margin: 20px; }
/style


Would it be possible to utilize this process in a LiveCode project so that a 
resulting file, say for example, an audio recording, could be uploaded 
automatically to a specific Google Drive Folder? 

Any advice?

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

Re: Record Audio in OS X and Windows

2015-01-20 Thread JOHN PATTEN
Thanks Devin,

I will give that a try. I also found a work around that works fine too, 
AppleScript.

Put this in the a field:

tell application Finder
set savePath to (the path to the desktop folder as text)  record.m4a
tell application QuickTime Player
activate
set doku to new audio recording
start doku
delay 30
stop doku
set newDoc to last item of (documents whose name contains 
Untitled)
export newDoc in file savePath using settings preset Audio 
Only
close document 1 without saving
quit

end tell
end tell


…and the following in a button:

on mouseUp
   ask  Please name your recording:
   put it  .m4a into tFileName
   
   put cd fld 1 into myScript
   replace record.m4a with tFileName in myScript
   do myScript as AppleScript
   --wait 10 seconds
   revCopyFile (~/Desktop/  tFilename),~/Google Drive/CloseAudio/
   delete file (~/Desktop/  tFilename)
end mouseUp


Saves to your Google Drive and you could create a Google Site with the Google 
Folder embedded in the Google Site page. This makes your recordings available 
any play you have Internet access. Nice easy strategy for educators to save 
elementary school student reading samples and listen and review later.

A little clunky but functional :)

Cheers!

John Patten
SUSD





On Jan 20, 2015, at 3:51 PM, Devin Asay devin_a...@byu.edu wrote:

 
 On Jan 20, 2015, at 12:41 PM, JOHN PATTEN johnpat...@me.com wrote:
 
 Hi All,
 
 Is the record audio feature currently broken in LiveCode (7.0.0)?
 
 When I do this:
 
 on mouseUp
  set the dontuseQt to false
  record sound file test.wav
  answer the result
 end mouseUp
 
 I get message “error 2 starting recording”
 
 Thank you!
 
 John,
 
 This works for me in 7.0.2 RC1:
 
put “test.aif into sndName
 
# make sure there's a name
if sndName is empty then 
  exit mouseUp
end if
 
set the dontUseQT to false
record sound file sndName
 
 
 There have been a few audio-related bugs fixed in recent releases, so it may 
 be that you’re experiencing one of those.
 
 Devin
 
 Devin Asay
 Office of Digital Humanities
 Brigham Young University
 
 
 ___
 use-livecode mailing list
 use-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


Record Audio in OS X and Windows

2015-01-20 Thread JOHN PATTEN
Hi All,

Is the record audio feature currently broken in LiveCode (7.0.0)?

When I do this:

on mouseUp
   set the dontuseQt to false
   record sound file test.wav
   answer the result
end mouseUp

I get message “error 2 starting recording”

Thank you!

John Patten
SUSD


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

DataGrid Event for change of line highlighted?

2015-01-18 Thread JOHN PATTEN
HI All,

Is there a  built in datagrid event that occurs when the user arrows down in a 
datagrid list and the row is highlighted?

on dataGrid-lineHighlighted
do something
end dataGrid-lineHighlighted

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


Print link in PDF using Images?

2014-12-19 Thread JOHN PATTEN
Hi All,

Is it possible to use the rect of an image to create a link and have the image 
then become the link button? I’m trying to repeat through some images on a card 
and save them as links in the resulting PDF.

  get the ImageRect of img (MasterVideoPlay  x) of cd 5
  put it into tRect
  get the tImageBtnLink of cd fld (video  x ) of cd 5
  put it into tURL
  Answer  Print link to url  tURL  with rect  tRect
  print link to url tURL with rect tRect

Thank you!
John Patten
SUSD
  




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

revBrowserOpenCef revBrowserClose not working

2014-12-03 Thread JOHN PATTEN
Hi All,

Using LiveCode 7.0.0 with Yosemite…

I have an openCard script that does the following:

Global tBrowserID
on openCard
   put revBrowserOpenCef(the windowId of this stack, 
http://www.youtube.com/embed/9HF_FcHOP-s?controls=1showinfo=0showsearch=0modestbranding=1rel=0autoplay=0autohide=1iv_load_policy=3version=2start=0;)
 into tBrowserId
   revBrowserSet tBrowserID, rect, the rect of grc browser
end openCard

This works fine.

However when I try to close the browser it does not appear to redraw the screen 
and the browser is still visible.


Global tBrowserID
on mouseDown
answer tBrowserID - - double check to make sure id is there…
revBrowserClose tBrowserID
end mouseDown

When navigating to subsequent cards the browser still hangs around.  What’s 
worse, if i click the button again to close the browser again, it thinks the 
browser is closed, though it appears to be still on the screen. This completely 
locks Livecode up. You can move windows around, but not other events are 
triggered. I had to Force Quite out of LiveCode.

It doesn’t seem like it should work like this…? Am i missing something?

Thank you!

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

Colin's Book on Mobile Development - Webscraper Question?

2014-11-08 Thread JOHN PATTEN
Hi All,

I finally had a chance to begin looking at Colin’s book on Mobile Development 
with LiveCode. There are some nice examples in his book.

I had a question about the WebScraper example. I downloaded the most recent 
copy of the stack from the Packt publishing site. The images on the Media card 
do not appear. It looks like only a grayish rectangle of the size of the image 
appears. Anybody know why this might be the case?

Thank you!

John Patten
___
use-livecode mailing list
use-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: Colin's Book on Mobile Development - Webscraper Question?

2014-11-08 Thread JOHN PATTEN
Stepped away for a while, came back, and tried a: 

put url pMediaFile into omg “MediaImage” instead of:

 set the filename of image the number of images to “mediaImage”

The put url pMediaFile … worked.  :)


 On Nov 8, 2014, at 4:05 PM, JOHN PATTEN johnpat...@me.com wrote:
 
 Hi All,
 
 I finally had a chance to begin looking at Colin’s book on Mobile Development 
 with LiveCode. There are some nice examples in his book.
 
 I had a question about the WebScraper example. I downloaded the most recent 
 copy of the stack from the Packt publishing site. The images on the Media 
 card do not appear. It looks like only a grayish rectangle of the size of the 
 image appears. Anybody know why this might be the case?
 
 Thank you!
 
 John Patten
 ___
 use-livecode mailing list
 use-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

Extended ASCII Characters Showing Up Where Not Wanted...

2014-10-23 Thread JOHN PATTEN
Hi All…

I have a list of names in a field.

John Doe
Mary Jane
etc. etc.

When I do: 

put word one of the selectedText into tFirstname
put word two of the selectedText into tLastname

…and then try using the variables in an INSERT to SQL Lite it fails. It seems 
the put script above is inserting the extend ascii 168 character “¿” (upside 
down question mark). 

How do I clear those unwanted ascii characters out of my name variables? And 
why are they in there to begin with? It doesn’t seem like it should be just 
adding invisible characters to this process. I figured it out by adding the 
variable to a text editor and showing invisibles. Is this a bug?


Thanks for any advice!

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


Re: Extended ASCII Characters Showing Up Where Not Wanted...

2014-10-23 Thread JOHN PATTEN
Never mind…. 

I just downloaded LiveCode 7 and reopened project. The upside down questions 
marks are gone now. Coincidence, the weather, spirits…? :)

Thank you!

On Oct 23, 2014, at 2:50 PM, JOHN PATTEN johnpat...@me.com wrote:

 Hi All…
 
 I have a list of names in a field.
 
 John Doe
 Mary Jane
 etc. etc.
 
 When I do: 
 
 put word one of the selectedText into tFirstname
 put word two of the selectedText into tLastname
 
 …and then try using the variables in an INSERT to SQL Lite it fails. It seems 
 the put script above is inserting the extend ascii 168 character “¿” (upside 
 down question mark). 
 
 How do I clear those unwanted ascii characters out of my name variables? And 
 why are they in there to begin with? It doesn’t seem like it should be just 
 adding invisible characters to this process. I figured it out by adding the 
 variable to a text editor and showing invisibles. Is this a bug?
 
 
 Thanks for any advice!
 
 John Patten
 SUSD
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


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


Snapping To A Grid of TopLefts?

2014-10-19 Thread JOHN PATTEN
Hi All,

I’m trying to figure out a way to have objects snap to a grid on the mouseUp. I 
have a list of TopLeft coordinates.
500,50
500,125
500,200
500,275
400,50
400,125 …

I want the object to snap to the closest topLeft coordinate in the list upon a 
mouseUp.

I was tried subtracting current x and y coordinate from each item in list, but 
that quickly was getting complicated.

on mouseUp
   put the topLeft of me into tMyLoc
   put item 1 of tMyLoc into tXLoc
   put item 2 of tMyLoc into tYLoc
   put 1 into tItem1
   put 1 into tItem2
   put 1 into x
   repeat for number of lines in cd fld 1
  put item tItem1 of line x of cd fld 1 into tXTarget
  put item tItem2 of line x of cd fld 1 into tYTarget
  put the abs of (tXTarget - tXLoc)  , after tCoords
  put the abs of (tYTarget - tYLoc)  return after tCoords
  add 1 to x
   end repeat
   put My Current Loc:  tMyLoc after tCoords
   answer tCoords
end mouseUp

on MouseDown
   Grab me
end MouseDown

Interesting it appears the smallest abs result of the subtraction seems to be 
the closes x coord listed. But that only gets me half way there. I thought I’d 
throw it out here for suggestions…?

Thank you!
___
use-livecode mailing list
use-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: Snapping To A Grid of TopLefts?

2014-10-19 Thread JOHN PATTEN
Thanks Martin and Ali,

I figured I was making it more difficult than it needed to be :)

I’ll give those a try.

Thanks again!

John Patten
SUSD
On Oct 19, 2014, at 11:21 AM, Martin Koob mk...@rogers.com wrote:

 This will snap to a 100 X 75 grid anywhere on the card.  It does not restrict
 the bounds i.e. left from 50 to 275, but that could be added.
 
 on mouseUp
   put the top of me into tTop
   put the left of me into tLeft
   put round(tTop / 75) * 75 into tNewTop
   put round(tLeft /100) * 100 into tNewLeft
   lock screen
   set the top of me to tNewTop
   set the left of me to tNewLeft
   unlock screen
   put the topLeft of me
 end mouseUp
 
 on mouseDown
   grab me
 end mouseDown
 
 
 
 
 
 --
 View this message in context: 
 http://runtime-revolution.278305.n4.nabble.com/Snapping-To-A-Grid-of-TopLefts-tp4684742p4684744.html
 Sent from the Revolution - User mailing list archive at Nabble.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


MergMicrophone And Exporting .caf files?

2014-10-06 Thread JOHN PATTEN
Hi All,

I’ve been thinking up some nice uses for internal school apps that let younger 
students record audio into an iPad. It would be nice to be able to share what 
they record with other students and their teachers. 

I played around with Monte’s open source MergMicropphone example on an iPad 2 
and it seems to work well for certain formats. However, it saves the sound file 
in Apple’s newer .caf format.  It plays back easily enough on the iPad it was 
recorded on, but I’m wondering what my options are for sharing the audio files? 
 

Originally, I thought I would provide and easy upload of the audio file to an 
internal web server but I’m not sure how to convert the audio file into a 
format that will play in a web browser mp4 etc.? I have access to on-rev too. 
Maybe there is a utility that would run on the server and auto convert files 
uploaded to a specific folder?  Not sure how I’d go about that though…?

Any ideas are welcome...

Thanks in Advance!

John Patten
SUSD





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


Tab Panel Highlights Not Appearing Correctly?

2014-09-17 Thread JOHN PATTEN
Hi All,

I think i must be using the Tab Panel object incorrectly. The tabs do not 
highlight correctly when clicked on.

Tab Panel consists of: “Info, Create Account, Preferences, Minimize,” four 
panels.

Here’s the script I have in my Tab Panel object:

on mouseUp
   get the selectedText of me
if it is Minimize then
  put the the text of button TabObject into tTabs
  put Maximize into line 4 of tTabs
  set the text of button TabObject to tTabs
  set the height of current window to bottom of btn tabObject
  else
  if it is Maximize then
 put the the text of button TabObject into tTabs
  put Minimize into line 4 of tTabs
  set the text of button TabObject to tTabs
  set the height of current window to 450
  set the loc of current window to the screenLoc
   else
  go card it
   end if
   end if
end mouseUp

The script does what it is supposed to, but the highlight does not follow the 
mouse click.  

Any suggestions?

Thank you!
___
use-livecode mailing list
use-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 Terminal Command (Python) Using LiveCode?

2014-08-27 Thread JOHN PATTEN
Awesome!

I’m trying to get this working but I think I’m having a problem with providing 
the path to the Python App.

I keep getting the error:  python: can’t open file ‘Macintosh 
HD/Users/jpatten/gam’:[Errno 2] No Such file or directory.

Here’s what I have in my button script:

on mouseUp
put cd fld 1 into tScript
   put shell(tScript) into tPython
   answer tPython
end mouseUp

and in my field I have the following:  python “Macintosh HD”/Users/jpatten/gam 
gam.py info domain

This python command just returns info about the Google Apps domain….

What am I missing?

Thank you!


On Aug 27, 2014, at 2:18 AM, Thierry Douez th.do...@gmail.com wrote:

 2014-08-27 9:27 GMT+02:00 Rolf Kocherhans :
 
 Hello John
 
 Yes this is possible, I do this all the time !
 
 I do this very often too, with Perl or shells.
 
 Instead of using the replace, I've choosen the merge road;
 find it more flexible and readable when you have to deal with a long list
 of commands.
 
 Even build all the custom properties containing the template commands
 automatically from the API documentation of the external tool with the help
 of LC + regex.
 
 HTH,
 
 Thierry
 
 
 The way I use it:
 Create a stack with a field, put the whole python script
 (can have multiple lines) into the field.
 Replace place holders (replace %NAME% with Peter etc.) in the field,
 and then put field into a  variable and execute it with the shell command !
 
 I would like to be able to call the GAM Python scripts via LiveCode. A 
 typical GAM python terminal command would be something like:
 
 python gam.py create user j...@student.email.k12.ca.us firstname John 
 lastname Doe password 11 change password off
 
 Could I call this Python script directly from LiveCode?
 
 
 
 Thierry Douez - http://sunny-tdz.com
 Maker of sunnYperl - sunnYmidi - sunnYmage
 
 ___
 use-livecode mailing list
 use-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


Sending Terminal Command (Python) Using LiveCode?

2014-08-26 Thread JOHN PATTEN
Hi All,

I manage a lot of  accounts in our Google Apps for Education deployment. I have 
used LiveCode to automate a lot of the csv creation for this process.

I use a Terminal application (GAM) created in Python to do some of this too. 

I would like to be able to call the GAM Python scripts via LiveCode. A typical 
GAM python terminal command would be something like: 

python gam.py create user j...@student.email.k12.ca.us firstname John lastname 
Doe password 11 change password off

Could I call this Python script directly from LiveCode?  

Something like:

on mouseUp
shell(python gam.py create user j...@student.sylvan.k12.ca.us firstname John 
lastname Doe password 11 change password off
end mouseUp

This seems too easy. I’m guessing I would have to point Livecode to the proper 
directory (path) to the Python app. etc.

Is calling python scripts possible through LiveCode? …in need of an example :)

Thank you!
John Patten
SUSD 





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


Wrestling with LC Server and wacky results...?

2014-08-06 Thread JOHN PATTEN
Hi All, 

Still not getting LC server script to record the correct info in a text file. 
I’m trying recording the last item, item 4, of a players game piece based on 
the button they are over. Here’s the abbreviated “move game piece script:”
put word 2 of  tLabels into tCurrentSpot --word 2 is a number, ie Button3
   put tCurrentSpot + (cd fld DiceRoll) into tButton
  
   if tButton  15 then
  put 1 into tButton
  move cd button tTargetPlayer to the loc of cd button (Button  tButton)
  put urlEncode(tTargetPlayer) into tUsername
  put urlEncode(Button  tButton) into tButtonSpot
  put username=  tUsername ButtonSpot=  tButtonSpot into  tArgList
  
  post tArgList to URL http://jpatten.on-rev.com/tHidden/moveplayer.lc;
  put  it --into tData

else
  move cd button tTargetPlayer to the loc of cd button (Button  tButton)
  put urlEncode(tTargetPlayer) into tUsername
  put urlEncode(Button  tButton) into tButtonSpot
   put username=  tUsername ButtonSpot=  tButtonSpot into  tArgList
 post tArgList to URL http://jpatten.on-rev.com/tHidden/moveplayer.lc;
  put  it --into tData
end if

Here’s server script:
?lc
put $_POST[username] into tUsername
put $_POST[ButtonSpot] into tButtonSpot
put url(file:users.txt) into tUsersFile
repeat for each line tLine in tUsersFile
if item 1 of tLine is tUserName then
put tButtonSpot into item 4 of tLine 
--when it gets to spot 10 it is no allowing the 1s spot only the 10s spot, so 
button Button 10 shows up as Button 1, button 11, as Button 1 and so on...
put tLine into tLineNew
put empty into tLine 
put return  tLineNew after tUsersFile
put tUsersFile
end if
end repeat

--open file users.txt for write
--write tUsersFile to file users.txt
--close file users.txt
--put Moving on!
--put tUsersFile

?

The script works fine until player moves up into double digit game spaces, i.e. 
Button 10, Button 11, etc. However, when I add my changed line as a new line at 
the bottom of the variable the new line at bottom has the correct two digit 
button label. So if the player was Luna, and she had just moved to spot “Button 
13,” the resulting text file looks like this after the server script runs:

John Patten,secret,jpat...@bmail.com,Button 1
Ivy Patten,1valve,ipat...@bmail.com,Button 5
Sawyer Patten,luna,spat...@bmail.com,Button 1
Luna Patten,secret,mmo...@gmouse.com,Button 6
Sean Patten,secret,spat...@gmouse.com,Button 1
Luna Patten,secret,mmo...@gmouse.com,Button 13

I tried to figure out a way to delete the original line, in this case for Luna 
where the item 4 is the old labeled Button 6, but couldn’t come up with a 
script on the server to that.

Tried a couple of the other suggestions too, but know luck. It just seems kind 
of odd why it will write the correct line to the end of the file, but not to 
the line in the middle? Any other suggestions?

Thank you!
 John Patten
SUSD



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


Missing digits when replacing single digit item with two digit item?

2014-08-03 Thread JOHN PATTEN
Hello!

I have 15 buttons on a card. They are each named Button 1, Button 2, Button 3, 
etc. I have another button that I am using as a game piece. It moves around the 
digital game board to the loc of each of the other 15 buttons. I am attempting 
to save the players information into a single line, in a text file, on the 
server. I’m using LC Server to manage the text file. Each line on the the text 
field holds the username, password, emailaddress, and player’s game piece 
button location. So a line in the text file would appear as: 
jpatten,password,jpat...@bmail.com,Button 2

My player piece moves across the digital game board from button loc to button 
loc, across 15 spots (button locs.) The LS Server writes the current players 
location by putting the name of the button it is over. So if the player is 
currently at Button 2, rolls a 3, their player moves to the loc of Button 5 and 
server writes Button 5 into the last item of the text entry for that player. So 
that players entry into text file becomes: 
jpatten,password,jpat...@bmail.com,Button 5.

The problem is when I get to buttons (game board spots) 10-15. I can tell by 
examining the code that it is exchanging, say Button 9 for Button 12 in a move 
of 3, but when it puts Button 12 in for item 4 it only writes  “Button 1,” 
leaving out the 2 in twelve. If I go around the board, to single digits, the 
code works again. 

It is only when I replace the last item with a two digit number that it fails. 
It’s as if it won’t allow the replacement of the single digit last item, Button 
9, with a two digit item, Button 12. It lops off the 2.

Does anybody have an idea of what could be going wrong? I will put my server 
code in a reply to this email, otherwise I will be put into “long message 
limbo” if I paste it to the bottom of this message.

Thank you!

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


Re: Missing digits when replacing single digit item with two digit item?

2014-08-03 Thread JOHN PATTEN
Here’s the server script: 

?lc

put $_POST[username] into tUsername
put $_POST[ButtonSpot] into tButtonSpot
put url(file:users.txt) into tUsersFile

repeat for each line tLine in tUsersFile
if item 1 of tLine is tUserName then
put tButtonSpot into item 4 of tLine 
--when it gets to spot 10 it is no allowing the 1s spot only the 10s spot, so 
button Button 10 shows up as Button 1, button 11, as Button 1 and so on...
put tLine into tLine
--put return  tLine after tUsersFile
--sort tUsersFile
--put tLine 
put tUsersFile
end if
end repeat

--else

--put tUsersFile
--end if
--end repeat
--put tUsersFile

--open file users.txt for write
--write tUsersFile to file users.txt
--close file users.txt
--put Moving on!

?
On Aug 3, 2014, at 7:32 PM, JOHN PATTEN johnpat...@me.com wrote:

 Hello!
 
 I have 15 buttons on a card. They are each named Button 1, Button 2, Button 
 3, etc. I have another button that I am using as a game piece. It moves 
 around the digital game board to the loc of each of the other 15 buttons. I 
 am attempting to save the players information into a single line, in a text 
 file, on the server. I’m using LC Server to manage the text file. Each line 
 on the the text field holds the username, password, emailaddress, and 
 player’s game piece button location. So a line in the text file would appear 
 as: jpatten,password,jpat...@bmail.com,Button 2
 
 My player piece moves across the digital game board from button loc to button 
 loc, across 15 spots (button locs.) The LS Server writes the current players 
 location by putting the name of the button it is over. So if the player is 
 currently at Button 2, rolls a 3, their player moves to the loc of Button 5 
 and server writes Button 5 into the last item of the text entry for that 
 player. So that players entry into text file becomes: 
 jpatten,password,jpat...@bmail.com,Button 5.
 
 The problem is when I get to buttons (game board spots) 10-15. I can tell by 
 examining the code that it is exchanging, say Button 9 for Button 12 in a 
 move of 3, but when it puts Button 12 in for item 4 it only writes  “Button 
 1,” leaving out the 2 in twelve. If I go around the board, to single digits, 
 the code works again. 
 
 It is only when I replace the last item with a two digit number that it 
 fails. It’s as if it won’t allow the replacement of the single digit last 
 item, Button 9, with a two digit item, Button 12. It lops off the 2.
 
 Does anybody have an idea of what could be going wrong? I will put my server 
 code in a reply to this email, otherwise I will be put into “long message 
 limbo” if I paste it to the bottom of this message.
 
 Thank you!
 
 John Patten
 SUSD
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-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: Missing digits when replacing single digit item with two digit item?

2014-08-03 Thread JOHN PATTEN
And here is the button script to move the player’s game piece:

on mouseUp
   put cd fld username of cd 1 into tTargetPlayer
   put the loc of cd btn tTargetPlayer into tTargetPlayerLoc
   put 1 into x
   repeat 15
  put the id of cd button ( Button  x )  return after GameSpots
  add 1 to x
   end repeat
   
   put 1 into x
   repeat for number of lines in GameSpots
  if the loc of btn id (line x of GameSpots) is tTargetPlayerLoc then
 put the short name of button id (line x of GameSpots) into tLabels
  end if
  add 1 to x
   end repeat
   put char 1 to 2 of word 2 of  tLabels into tCurrentSpot
   put tCurrentSpot + (cd fld DiceRoll) into tButton
   if tButton  15 then
  put 1 into tButton
  move cd button tTargetPlayer to the loc of cd button (Button  tButton)
  
  put urlEncode(tTargetPlayer) into tUsername
  put urlEncode(Button  tButton) into tButtonSpot
  put username=  tUsername ButtonSpot=  tButtonSpot into  tArgList
  post tArgList to URL http://jpatten.on-rev.com/superdupergame/moveplayer.lc;
  put  it --into tData


   else
  move cd button tTargetPlayer to the loc of cd button (Button  tButton)
   put urlEncode(tTargetPlayer) into tUsername
  put urlEncode(Button  tButton) into tButtonSpot
  put username=  tUsername ButtonSpot=  tButtonSpot into  tArgList
  post tArgList to URL http://jpatten.on-rev.com/superdupergame/moveplayer.lc;
  put  it --into tData
end if
end mouseUp
On Aug 3, 2014, at 7:32 PM, JOHN PATTEN johnpat...@me.com wrote:

 Hello!
 
 I have 15 buttons on a card. They are each named Button 1, Button 2, Button 
 3, etc. I have another button that I am using as a game piece. It moves 
 around the digital game board to the loc of each of the other 15 buttons. I 
 am attempting to save the players information into a single line, in a text 
 file, on the server. I’m using LC Server to manage the text file. Each line 
 on the the text field holds the username, password, emailaddress, and 
 player’s game piece button location. So a line in the text file would appear 
 as: jpatten,password,jpat...@bmail.com,Button 2
 
 My player piece moves across the digital game board from button loc to button 
 loc, across 15 spots (button locs.) The LS Server writes the current players 
 location by putting the name of the button it is over. So if the player is 
 currently at Button 2, rolls a 3, their player moves to the loc of Button 5 
 and server writes Button 5 into the last item of the text entry for that 
 player. So that players entry into text file becomes: 
 jpatten,password,jpat...@bmail.com,Button 5.
 
 The problem is when I get to buttons (game board spots) 10-15. I can tell by 
 examining the code that it is exchanging, say Button 9 for Button 12 in a 
 move of 3, but when it puts Button 12 in for item 4 it only writes  “Button 
 1,” leaving out the 2 in twelve. If I go around the board, to single digits, 
 the code works again. 
 
 It is only when I replace the last item with a two digit number that it 
 fails. It’s as if it won’t allow the replacement of the single digit last 
 item, Button 9, with a two digit item, Button 12. It lops off the 2.
 
 Does anybody have an idea of what could be going wrong? I will put my server 
 code in a reply to this email, otherwise I will be put into “long message 
 limbo” if I paste it to the bottom of this message.
 
 Thank you!
 
 John Patten
 SUSD
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode

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


Livecode Server and Repeat Scripts on Server

2014-07-31 Thread JOHN PATTEN
Hi All,

I’m experimenting with LiveCode server. Trying to get my head around some of 
the challenges of scripting on the server. I’ve come up with one I’m a bit 
stuck on. 

I have a four line csv text file on server consisting of username, password, 
and email. i.e. jdoe, password, j...@bmail.com etc.

I am trying to test for duplicate user names when user creates an account in 
the stack.  I’m having trouble with the recognizing the duplicate user account 
in my script. It just runs through the complete script.

Here’s my script:

?lc
put $_POST[username] into tUsername
put $_POST[password] into tPassword
put $_POST[email] into tEmail
put url(file:users.txt) into tUserFile


repeat for each line thisLine in tUserFile

if item 1 of tLine is tUsername then 
put Sorry, username (  tUserName  ) has already been used. Try another.
exit repeat

else

put return  tUsername  ,  tPassword  ,  tEmail  ,  Button 1 
--after tUserFile
--open file  users.txt for write
--write tUserFile to file users.txt
--close file users.txt
--put tUsername  ,  Button 1
--exit repeat
end if
end repeat
?

Anybody have an idea why even with a duplicate username the script continues on?
Thank you!
John Patten
SUSD



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


Re: Livecode Server and Repeat Scripts on Server

2014-07-31 Thread JOHN PATTEN
Oops!  Yes, I had forgotten to rename that variable. That helps. 

However, even when it identifies a duplicate it still allows the script beyond 
the “else “ to execute. Plus, depending on what line the duplicate username is 
located in my csv file, it loops that many times.

So if username “John Patten” is on the third line of my csv text file, the 
resulting “put” will look like the following:

John Patten, password, jpat...@bmail.com, Button 1
John Patten, password, jpat...@bmail.com, Button 1
John Patten, password, jpat...@bmail.com, Button 1
Sorry, username ( John Patten) has already been used. Try another.

What I need to happen is the just the last line, otherwise it will create a new 
entry for an existing user.

Is there a solution to this, or does LiveCode server run straight through 
if-then constructs?

Thank you!

John Patten
SUSD


On Jul 31, 2014, at 5:55 PM, Peter W A Wood peterwaw...@gmail.com wrote:

 To: How to use LiveCode use-livecode@lists.runrev.com
 
 There seems to be a typo in your code:
 
 repeat for each line thisLine in tUserFile
 
 if item 1 of tLine is tUsername then 
 
 I think that should be item 1 of thisLine
 
 Regards
 
 Peter
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode


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


  1   2   >