Jump to content

How to use _FFSetValue to fill an html form


tommytx
 Share

Go to solution Solved by Danp2,

Recommended Posts

Am I doing something wrong here.. does not seem to work... none of them had and id so can't use that.

My html
<input name="first_name" value="" required="">
<input name="last_name" value="" required="">
<input name="email" value="" required="" type="email">

<textarea rows="7" cols="10" name="message" id="message" class="autosave"

end html

_FFSetValue("Tommy","first_name")
_FFSetValue("Chandler","last_name")
_FFSetValue("joe@boe.com","email")

_FFSetValue("Now is the time for all good men.", "message")
Link to comment
Share on other sites

This is a function I use in one of my scripts. Perhaps you will find it useful:

Func UpdateWebForm($cField, $cValue)
    ; Remove non-alphanumeric characters such as quotation marks
    $cValue = StringRegExpReplace($cValue, "[^\w\d\s]", "")

    _FFXPath("//form//input[@name='" & $cField & "']")
    _FFCmd("FFau3.xpath.value='" & $cValue & "'")
EndFunc
Link to comment
Share on other sites

Danp2   thank you so much I have no idea what I just did but i found this

_FFSetValue("1", "amount", "name",0)

_FFSetValue("1", "amount", "name",1)

_FFSetValue("1", "amount", "name",2)

_FFSetValue("1", "amount", "name",3)

at this site http://www.autoit.de/index.php?page=Thread&threadID=24003
 

so having no idea what I am doing... I took your solution

_FFSetValue("Tommy","first_name","name")
and added the 0 at the end... and walla it works fine..
_FFSetValue("Tommy","first_name","name", 0)
so thanks again.. you set me on the right road...
 
can you explain what happened there.. maybe it will help me in the future.
 
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...