Just FYI,

For Livecode, Claude is THE BEST, by alot.
It is often successful when the others fail.

Cheers,
Tom

On Thu, Mar 6, 2025 at 12:19 PM Sean Cole via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Craig,
>
> For example, I needed to integrate the Docusign SOAP API into a current
> project. Rather than hunt through the pages and pages of API guides, which
> are usually very C+, C# or PHP centric, I type the following into the
> ChatGPT prompt:
>
> Create a LiveCode script for version 9.0.2 that will create a document in
> Docusign using the SOAP 1.2 API
>
> Along with some prerequisites and initial information it gave me this
> script:
>
> on mouseUp
>    -- Define DocuSign SOAP Endpoint
>    put "https://demo.docusign.net/api/3.0/soap.asmx
> <
> https://geotrack.email/ext/l?idx=KtW4U2OV61wz99QT0Xey&ret=https%3A%2F%2Figafnl.com%2Fclick%3Fredirect%3Dhttps%253A%252F%252Fdemo.docusign.net%252Fapi%252F3.0%252Fsoap.asmx%26dID%3D1741281488193%26hashId%3D833f6d0a790a0f350fafc9657559596d1af63e4a4a4768afffa5f700dc69ff31f2bc3e%26linkName%3Dhttps%3A%2F%2Fdemo.docusign.net%2Fapi%2F3.0%2Fsoap.asmx
> >"
> into tURL
>
>    -- DocuSign Credentials
>    put "your-em...@example.com" into tUsername
>    put "your-password" into tPassword
>    put "your-integrator-key" into tIntegratorKey
>    put "your-account-id" into tAccountID
>
>    -- Create Authentication Header (Base64 encoded)
>    put "<DocuSignCredentials><Username>" & tUsername &
> "</Username><Password>" & tPassword & "</Password><IntegratorKey>" &
> tIntegratorKey & "</IntegratorKey></DocuSignCredentials>" into tAuthHeader
>    put base64Encode(tAuthHeader) into tEncodedAuth
>
>    -- SOAP Envelope for Sending Document
>    put "<?xml version='1.0' encoding='utf-8'?>" & \
>        "<soap12:Envelope xmlns:xsi='
> http://www.w3.org/2001/XMLSchema-instance
> <
> https://geotrack.email/ext/l?idx=KtW4U2OV61wz99QT0Xey&ret=https%3A%2F%2Figafnl.com%2Fclick%3Fredirect%3Dhttp%253A%252F%252Fwww.w3.org%252F2001%252FXMLSchema-instance%26dID%3D1741281488193%26hashId%3D833f6d0a790a0f350fafc9657559596d1af63e4a4a4768afffa5f700dc69ff31f2bc3e%26linkName%3Dhttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance
> >'
> " & \
>        "xmlns:xsd='http://www.w3.org/2001/XMLSchema
> <
> https://geotrack.email/ext/l?idx=KtW4U2OV61wz99QT0Xey&ret=https%3A%2F%2Figafnl.com%2Fclick%3Fredirect%3Dhttp%253A%252F%252Fwww.w3.org%252F2001%252FXMLSchema%26dID%3D1741281488193%26hashId%3D833f6d0a790a0f350fafc9657559596d1af63e4a4a4768afffa5f700dc69ff31f2bc3e%26linkName%3Dhttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema
> >'
> " & \
>        "xmlns:soap12='http://www.w3.org/2003/05/soap-envelope
> <
> https://geotrack.email/ext/l?idx=KtW4U2OV61wz99QT0Xey&ret=https%3A%2F%2Figafnl.com%2Fclick%3Fredirect%3Dhttp%253A%252F%252Fwww.w3.org%252F2003%252F05%252Fsoap-envelope%26dID%3D1741281488193%26hashId%3D833f6d0a790a0f350fafc9657559596d1af63e4a4a4768afffa5f700dc69ff31f2bc3e%26linkName%3Dhttp%3A%2F%2Fwww.w3.org%2F2003%2F05%2Fsoap-envelope
> >'>"
> & \
>        "<soap12:Header>" & \
>        "<DocuSignCredentials xmlns='http://www.docusign.net/API/3.0
> <
> https://geotrack.email/ext/l?idx=KtW4U2OV61wz99QT0Xey&ret=https%3A%2F%2Figafnl.com%2Fclick%3Fredirect%3Dhttp%253A%252F%252Fwww.docusign.net%252FAPI%252F3.0%26dID%3D1741281488193%26hashId%3D833f6d0a790a0f350fafc9657559596d1af63e4a4a4768afffa5f700dc69ff31f2bc3e%26linkName%3Dhttp%3A%2F%2Fwww.docusign.net%2FAPI%2F3.0
> >'>"
> & \
>        "<Username>" & tUsername & "</Username>" & \
>        "<Password>" & tPassword & "</Password>" & \
>        "<IntegratorKey>" & tIntegratorKey & "</IntegratorKey>" & \
>        "</DocuSignCredentials>" & \
>        "</soap12:Header>" & \
>        "<soap12:Body>" & \
>        "<CreateEnvelope xmlns='http://www.docusign.net/API/3.0
> <
> https://geotrack.email/ext/l?idx=KtW4U2OV61wz99QT0Xey&ret=https%3A%2F%2Figafnl.com%2Fclick%3Fredirect%3Dhttp%253A%252F%252Fwww.docusign.net%252FAPI%252F3.0%26dID%3D1741281488193%26hashId%3D833f6d0a790a0f350fafc9657559596d1af63e4a4a4768afffa5f700dc69ff31f2bc3e%26linkName%3Dhttp%3A%2F%2Fwww.docusign.net%2FAPI%2F3.0
> >'>"
> & \
>        "<AccountId>" & tAccountID & "</AccountId>" & \
>        "<Envelope>" & \
>        "<Subject>Test LiveCode DocuSign Envelope</Subject>" & \
>        "<EmailBlurb>Please sign this document</EmailBlurb>" & \
>        "<Documents>" & \
>        "<Document>" & \
>        "<ID>1</ID>" & \
>        "<Name>TestDocument.pdf</Name>" & \
>        "<PDFBytes>" & base64Encode(URL "binfile:test.pdf") & "</PDFBytes>"
> & \
>        "</Document>" & \
>        "</Documents>" & \
>        "<Recipients>" & \
>        "<Recipient>" & \
>        "<ID>1</ID>" & \
>        "<UserName>Signer Name</UserName>" & \
>        "<Email>sig...@example.com</Email>" & \
>        "<Type>Signer</Type>" & \
>        "<RoutingOrder>1</RoutingOrder>" & \
>        "</Recipient>" & \
>        "</Recipients>" & \
>        "<Tabs>" & \
>        "<Tab>" & \
>        "<DocumentID>1</DocumentID>" & \
>        "<PageNumber>1</PageNumber>" & \
>        "<XPosition>100</XPosition>" & \
>        "<YPosition>150</YPosition>" & \
>        "<Type>SignHere</Type>" & \
>        "</Tab>" & \
>        "</Tabs>" & \
>        "<Status>Sent</Status>" & \
>        "</Envelope>" & \
>        "</CreateEnvelope>" & \
>        "</soap12:Body>" & \
>        "</soap12:Envelope>" into tSOAPRequest
>
>    -- Set HTTP Headers
>    put "POST" into tMethod
>    put "Content-Type: application/soap+xml; charset=utf-8" into tHeaders
>    put "SOAPAction: http://www.docusign.net/API/3.0/CreateEnvelope
> <
> https://geotrack.email/ext/l?idx=KtW4U2OV61wz99QT0Xey&ret=https%3A%2F%2Figafnl.com%2Fclick%3Fredirect%3Dhttp%253A%252F%252Fwww.docusign.net%252FAPI%252F3.0%252FCreateEnvelope%26dID%3D1741281488193%26hashId%3D833f6d0a790a0f350fafc9657559596d1af63e4a4a4768afffa5f700dc69ff31f2bc3e%26linkName%3Dhttp%3A%2F%2Fwww.docusign.net%2FAPI%2F3.0%2FCreateEnvelope
> >"
> & cr into tHeaders
>
>    -- Send the SOAP Request
>    put tsNetPostSync(tURL, tMethod, tSOAPRequest, tHeaders) into tResponse
>
>    -- Check for Errors
>    if the result is not empty then
>       answer "Error: " & the result
>    else
>       put tResponse into tEnvelopeResponse
>       -- Extract Envelope ID from Response
>       put lineOffset("<EnvelopeID>", tEnvelopeResponse) into tStart
>       put lineOffset("</EnvelopeID>", tEnvelopeResponse) into tEnd
>       if tStart > 0 and tEnd > 0 then
>          put char (tStart + 11) to (tEnd - 1) of tEnvelopeResponse into
> tEnvelopeID
>          answer "Document sent! Envelope ID: " & tEnvelopeID
>       else
>          answer "Failed to retrieve Envelope ID."
>       end if
>    end if
> end mouseUp
>
> It's most of the way there and certainly answers my specific question. Of
> course, you can ask follow-up questions to create authentication scripts,
> add Tabs to the premade forms, and set other variables where needed. After
> the code provided, the explanation also explains how it works and even
> notes that 9.0.2 may not have the necessary tsNet version for network
> security (but we have already had this fixed for some years now).
>
> Impressive, though, isn't it!
>
> Sean Cole
> *Pi Digital*
>
>
> Craig Newman via use-livecode <use-livecode@lists.runrev.com> wrote:
>
> > Sean.
> >
> > You are actually using ChatGPT as your main coding engine? I have made
> > apps small and large, but cannot imagine how I could ever start that way.
> >
> > I am not talking about asking for a routine using, say, recursion to find
> > the factors of an integer. This to create a stand-alone function I could
> > embed in a script. I get that.
> >
> > But is that what you are talking about, or are you able to create much
> > more complete scripts early on just by describing certain requirements?
> In
> > other words, where do you start using that tool? With a new, blank card?
> >
> > Craig
> >
> > > On Mar 6, 2025, at 9:24 AM, Pi Digital via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> > >
> > > Whoever trained ChatGPT into coding for LC I want to say a big Thank
> > You. It is now my primary way to code. Even more fun when you use the
> > Reason functionality.
> > >
> > > I am primarily coding in LC9.0.2 as I am disillusioned by 10 and the
> > future of LC. But with a little security hack for 9.0.2 it works just
> fine
> > with the latest web security protocols. And ChatGPT can be asked to code
> > for 902 specifically. I have been very, very impressed with the outputs
> > with incredible explanations and step by step guides for a whole range of
> > tasks. LC was already the single fastest coding platform but now 10x
> faster
> > than that using ChatGPT4.
> > >
> > > Thanks again.
> > >
> > > Sean Cole
> > > Pi Digital
> > > _______________________________________________
> > > use-livecode mailing list
> > > use-livecode@lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > <
> https://geotrack.email/ext/l?idx=KtW4U2OV61wz99QT0Xey&ret=https%3A%2F%2Figafnl.com%2Fclick%3Fredirect%3Dhttp%253A%252F%252Flists.runrev.com%252Fmailman%252Flistinfo%252Fuse-livecode%26dID%3D1741281488193%26hashId%3D833f6d0a790a0f350fafc9657559596d1af63e4a4a4768afffa5f700dc69ff31f2bc3e%26linkName%3Dhttp%3A%2F%2Flists.runrev.com%2Fmailman%2Flistinfo%2Fuse-livecode
> >
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> > <
> https://geotrack.email/ext/l?idx=KtW4U2OV61wz99QT0Xey&ret=https%3A%2F%2Figafnl.com%2Fclick%3Fredirect%3Dhttp%253A%252F%252Flists.runrev.com%252Fmailman%252Flistinfo%252Fuse-livecode%26dID%3D1741281488193%26hashId%3D833f6d0a790a0f350fafc9657559596d1af63e4a4a4768afffa5f700dc69ff31f2bc3e%26linkName%3Dhttp%3A%2F%2Flists.runrev.com%2Fmailman%2Flistinfo%2Fuse-livecode
> >
> >
> [image: GeoTrack]
> <
> https://geotrack.email/?utm_source=gmail&utm_medium=signature&utm_campaign=viralSignature
> >
> Sender
> notified with GeoTrack
> <
> https://geotrack.email/?utm_source=gmail&utm_medium=signature&utm_campaign=viralSignature
> >
> [image: 18]
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to