Jump to content

How to pass data to AutoIt


IndyUK
 Share

Recommended Posts

Hi,

Is it possible to pass AutoIt data from fields in a web form? A bit like passing paramters to a function. I have a requirement where I collect personal data on a web form and then I want to submit this to AutoIt for it to use in the application which it's going to run. It would need to pass back a value to the web form a value to indicate whether the transaction was successful/unsuccessful.

Would appreciate any pointers on this

Thanks

Link to comment
Share on other sites

Try this in the help file you will also see some examples

_IEFormElementGetValue
_IEFormElementSetValue
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

Hi goldenix

I don't believe those will work as they're used to set elements on a web page. What I'm after is a method where I can pass the AutoIt script parameter(s) which it can use, a bit like a command line.

My requirement is that I want to use AutoIt to open our secured credit card payment page and process the payment. In order for this to happen the page will require certain details e.g name, card no., expiry date etc...

I've considered putting this data to a file and then getting AutoIt to poll and read the file. However, our internal Audit dept have dismissed this idea as it potentially carries a risk (i.e someone can read it :P ). What would be a good technique is to pass an xml string to AutoIt and then get AutoIt to parse the xml and extract the required data, process the transaction and then clear everything down. This means no data is written to disk and Audit will be happy.

Hope this give a more in-depth explanation.

Thanks

Link to comment
Share on other sites

_IEFormElementGetValue will GET the value on the page.

_IEFormElementGetValue

--------------------------------------------------------------------------------

Returns the value of a given Form Element.

#include <IE.au3>

_IEFormElementGetValue ( ByRef $o_object )

Parameters

$o_object Object variable of an InternetExplorer.Application, Form Element object

Return Value

Success: Returns the string value of the given Form Element

Failure: Returns 0 and sets @ERROR

@Error: 0 ($_IEStatus_Success) = No Error

3 ($_IEStatus_InvalidDataType) = Invalid Data Type

4 ($_IEStatus_InvalidObjectType) = Invalid Object Type

@Extended: Contains invalid parameter number

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...