Re: Ghost in the Machine
Thanks Richard and Alex. The membership system is web-based and the page I'm trying to interact with contains HTML, php and Javascript material. Therefore the POST construction approach seems to be promising. Unfortunately, the membership details features about 900 lines of LiveCode script, much like the following ...[snip]... class="start-tag">tr><td style="width:900px">Where You Live</td></tr></table><table align="center" border="0" class="tableMain"><tr><td style="width:100px" class="middle">Address</td><td style="width:800px">No/Name <input type="text" name="ecHouse" id="ecHouse" size="10" maxlength="25" value="71" onChange="modified()" class="vAddress"> Street/Building <input ...[snip]... So I think I'll spend a bit of time looking at the ghost-in-the-machine method; see if it has any legs! Thanks again Peter -- Peter Reid Loughborough, UK > On 13 Dec 2021, at 5:00pm, use-livecode-requ...@lists.runrev.com wrote: > > Today's Topics: > > 1. Re: Ghost in the Machine? (pr...@reidit.co.uk) > 3. Re: Ghost in the Machine? (Richard Gaskin) > 8. Re: Ghost in the Machine? (Alex Tweedly) > > -- > > Message: 1 > Date: Sun, 12 Dec 2021 18:29:03 + > From: pr...@reidit.co.uk > To: use-livecode@lists.runrev.com > Subject: Re: Ghost in the Machine? > Message-ID: > Content-Type: text/plain; charset=utf-8 > > Thanks Alex, Dan & Tom for responding to this, but I suspect that I didn't > explain things well enough, let me elaborate? > > 1. Periodically we have small batches of new members joining a club. We have > their details in a CSV file which we'd normally think of doing some kind of > batch upload. > > 2. However, the existing club membership system doesn't have a batch load > facility only an on-screen form (such as the following) to be typed in: > > +-+ > | Surname:[.] Firstname(s):[...] Initials:[..] > | > | > | > | Address:[.] Town:[.] Phone: [.] > | > | [.] Postcode:[.] Mobile:[.] > | > | > | > | Email:[] GiftAid:[x] Payment:(o)Bank ( )Chq > | > +-+ > > 3. We want a way to upload a group of new members by 'driving' the input > fields, i.e. our app would click into each field, checkbox, radiobox and > 'type' in the details. > > 4. We don't have access to the membership system's coding, it's one off the > shelf. We just want do what we might have attempted some years ago, during > the terminal/command line days! In those old days, we'd redirect the stdin, > stdout, stderror. > > So my query is really as follows: > a) is this kind of 'channel' redirection possible, can we send mouse clicks, > type keys to enter text into fields etc? > b) has anyone done something like this? > c) does anyone have any methods and/or code they can let me have for this? > > My overview of what's required is as follows (assuming no show-stoppers): > - I make an overlay map, transparent everywhere except where there are input > fields ? this could be an actual map with "X"s over entry fields, spaces > elsewhere, but might simply be a list of objects expressed as coordinate > rectangles > - we take the name of a field, 'Surname' say, and lookup its location on the > screen > - we position our virtual mouse to click into the location where the > equivalent field can be found > - we enter its value as virtual keystrokes and click the 'tab' key to move to > the next input object > > Any idea whether this is possible and any code examples?! > > Thanks. > > Peter > -- > > Message: 3 > Date: Sun, 12 Dec 2021 11:38:20 -0800 > From: Richard Gaskin > To: use-livecode@lists.runrev.com > Subject: Re: Ghost in the Machine? > Message-ID: > Content-Type: text/plain; charset=utf-8; format=flowed > > Peter Reid wrote: > >> We want a way to upload a gr
Re: Ghost in the Machine?
Peter, I think the piece of info we are all missing (or guessing wrongly about) is: the existing club membership system - is it a web-based system, or an app that runs on your desktop. We're all kind of assuming it's a web page, but I now suspect maybe it isn't. If it is a web page - then the answers so far are all relevant, and should be straightforward to try out. [My suggestion re. the browser widget still feels like the "right official" way to do it - but personally I'd look at the html and see if I could POST the correct info - i.e. what Richard said :-) ] If it's a custom app, then it's a very different question - and I currently have no idea. If so, please say a little bit more about the custom app, or put up a screenshot / video somewhere. Alex. On 12/12/2021 18:29, Peter Reid via use-livecode wrote: Thanks Alex, Dan & Tom for responding to this, but I suspect that I didn't explain things well enough, let me elaborate… 1. Periodically we have small batches of new members joining a club. We have their details in a CSV file which we'd normally think of doing some kind of batch upload. 2. However, the existing club membership system doesn't have a batch load facility only an on-screen form (such as the following) to be typed in: +-+ | Surname:[.] Firstname(s):[...] Initials:[..] | | | | Address:[.] Town:[.] Phone: [.] | | [.] Postcode:[.] Mobile:[.] | | | | Email:[] GiftAid:[x] Payment:(o)Bank ( )Chq | +-+ 3. We want a way to upload a group of new members by 'driving' the input fields, i.e. our app would click into each field, checkbox, radiobox and 'type' in the details. 4. We don't have access to the membership system's coding, it's one off the shelf. We just want do what we might have attempted some years ago, during the terminal/command line days! In those old days, we'd redirect the stdin, stdout, stderror. So my query is really as follows: a) is this kind of 'channel' redirection possible, can we send mouse clicks, type keys to enter text into fields etc? b) has anyone done something like this? c) does anyone have any methods and/or code they can let me have for this? My overview of what's required is as follows (assuming no show-stoppers): - I make an overlay map, transparent everywhere except where there are input fields – this could be an actual map with "X"s over entry fields, spaces elsewhere, but might simply be a list of objects expressed as coordinate rectangles - we take the name of a field, 'Surname' say, and lookup its location on the screen - we position our virtual mouse to click into the location where the equivalent field can be found - we enter its value as virtual keystrokes and click the 'tab' key to move to the next input object Any idea whether this is possible and any code examples?! Thanks. 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
Re: Ghost in the Machine?
Peter Reid wrote: > We want a way to upload a group of new members by 'driving' the input > fields, i.e. our app would click into each field, checkbox, radiobox > and 'type' in the details. If the goal is to submit new member info you can do that with a single POST command. Examine the source HTML. Look for the action URL. Look at the input names. Package up the input data as name-value pairs form-encoded, send it to the URL via POST, and you're done. -- 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
Re: Ghost in the Machine?
Thanks Alex, Dan & Tom for responding to this, but I suspect that I didn't explain things well enough, let me elaborate… 1. Periodically we have small batches of new members joining a club. We have their details in a CSV file which we'd normally think of doing some kind of batch upload. 2. However, the existing club membership system doesn't have a batch load facility only an on-screen form (such as the following) to be typed in: +-+ | Surname:[.] Firstname(s):[...] Initials:[..] | | | | Address:[.] Town:[.] Phone: [.] | | [.] Postcode:[.] Mobile:[.] | | | | Email:[] GiftAid:[x] Payment:(o)Bank ( )Chq | +-+ 3. We want a way to upload a group of new members by 'driving' the input fields, i.e. our app would click into each field, checkbox, radiobox and 'type' in the details. 4. We don't have access to the membership system's coding, it's one off the shelf. We just want do what we might have attempted some years ago, during the terminal/command line days! In those old days, we'd redirect the stdin, stdout, stderror. So my query is really as follows: a) is this kind of 'channel' redirection possible, can we send mouse clicks, type keys to enter text into fields etc? b) has anyone done something like this? c) does anyone have any methods and/or code they can let me have for this? My overview of what's required is as follows (assuming no show-stoppers): - I make an overlay map, transparent everywhere except where there are input fields – this could be an actual map with "X"s over entry fields, spaces elsewhere, but might simply be a list of objects expressed as coordinate rectangles - we take the name of a field, 'Surname' say, and lookup its location on the screen - we position our virtual mouse to click into the location where the equivalent field can be found - we enter its value as virtual keystrokes and click the 'tab' key to move to the next input object Any idea whether this is possible and any code examples?! Thanks. Peter ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Ghost in the Machine?
If it's a simple html form then you could POST the form data to the server directly from within livecode. There is a short guide for doing so here https://livecode.byu.edu/internet/aboutForms.php and here https://livecode.byu.edu/internet/postMethodSteps.php put urlEncode(fld "fullname") into tName put the hilitedButtonName of group "genderGrp" into tGndr put urlEncode(the label of btn "colorChoice") into tColor put fullname=" & tName & "&gender=" & tGndr & "&color=" & tColor into tArgList post tArgList to URL "http://my.web.site/sampleform.html"; put it into tFormResults You may need to log in to the website from within livecode (using the above form method) to authenticate and retrieve a cookie or session token to include in the headers of your form request On Wed, Dec 8, 2021 at 2:06 PM Peter Reid via use-livecode < use-livecode@lists.runrev.com> wrote: > I'm trying to provide an upload facility for an existing on-line club > membership app. This app has a bulk loading facility for initial set up and > is designed for whole database configuration. In addition the app provides > a manual on-line form with 20+ fields making up a member's record. > > Ideally my user would use a facility to upload 1 or more files with rows > of details , each row containing a collection of all the inputs for my user > to use. Sadly, there's no bulk loading facility, so the user has to type in > most of the details from the membership form. > > So here comes the 'Ghost' bit, is it possible to make an LC app that > mimics keyboard and mouse inputs as if the user was there interacting with > the on-line form? If I can do this my user would have a file of inputs > which they could send to the membership database, sit back and watch the > ghostly app 'type' and 'mouse click' their way through completing the > on-line form. > > Any suggestions please? > > Peter > -- > Peter Reid > Loughborough, UK > > > ___ > use-livecode mailing list > use-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: Ghost in the Machine?
Hi Peter, just checking if I have understood this right. I think you have a website / webpage which allows the user to view / update a single entry (i.e. "manual on-line form with 20+ fields"). If that is the case, I'd consider writing an app to take in the file of rows of details, and insert that using a browser widget. See https://forums.livecode.com/viewtopic.php?t=33074 or other similar discussions. (Not done it myself, but looks reasonably straightforward). Alex. On 08/12/2021 14:05, Peter Reid via use-livecode wrote: I'm trying to provide an upload facility for an existing on-line club membership app. This app has a bulk loading facility for initial set up and is designed for whole database configuration. In addition the app provides a manual on-line form with 20+ fields making up a member's record. Ideally my user would use a facility to upload 1 or more files with rows of details , each row containing a collection of all the inputs for my user to use. Sadly, there's no bulk loading facility, so the user has to type in most of the details from the membership form. So here comes the 'Ghost' bit, is it possible to make an LC app that mimics keyboard and mouse inputs as if the user was there interacting with the on-line form? If I can do this my user would have a file of inputs which they could send to the membership database, sit back and watch the ghostly app 'type' and 'mouse click' their way through completing the on-line form. Any suggestions please? Peter -- Peter Reid Loughborough, UK ___ use-livecode mailing list use-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: Ghost in the Machine?
I don't know about moving the mouse around but u can have a fake png of a cursor move around...and then send mouseUps to buttons. and also u can put text into a field 1 character at a time to simulate typing. This is entirely doable in LC. On Wed, Dec 8, 2021 at 9:06 AM Peter Reid via use-livecode < use-livecode@lists.runrev.com> wrote: > I'm trying to provide an upload facility for an existing on-line club > membership app. This app has a bulk loading facility for initial set up and > is designed for whole database configuration. In addition the app provides > a manual on-line form with 20+ fields making up a member's record. > > Ideally my user would use a facility to upload 1 or more files with rows > of details , each row containing a collection of all the inputs for my user > to use. Sadly, there's no bulk loading facility, so the user has to type in > most of the details from the membership form. > > So here comes the 'Ghost' bit, is it possible to make an LC app that > mimics keyboard and mouse inputs as if the user was there interacting with > the on-line form? If I can do this my user would have a file of inputs > which they could send to the membership database, sit back and watch the > ghostly app 'type' and 'mouse click' their way through completing the > on-line form. > > Any suggestions please? > > Peter > -- > Peter Reid > Loughborough, UK > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- Tom Glod Founder & Developer MakeShyft R.D.A (www.makeshyft.com) Mobile:647.562.9411 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Ghost in the Machine?
I'm trying to provide an upload facility for an existing on-line club membership app. This app has a bulk loading facility for initial set up and is designed for whole database configuration. In addition the app provides a manual on-line form with 20+ fields making up a member's record. Ideally my user would use a facility to upload 1 or more files with rows of details , each row containing a collection of all the inputs for my user to use. Sadly, there's no bulk loading facility, so the user has to type in most of the details from the membership form. So here comes the 'Ghost' bit, is it possible to make an LC app that mimics keyboard and mouse inputs as if the user was there interacting with the on-line form? If I can do this my user would have a file of inputs which they could send to the membership database, sit back and watch the ghostly app 'type' and 'mouse click' their way through completing the on-line form. Any suggestions please? Peter -- Peter Reid Loughborough, UK ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode