Code:
#NoEnv
setTitleMatchMode, 2
#Include COM.ahk
Gui +LastFound ; Make the GUI window the last found window for use by the line below.
Gui, font, s10 Bold, Verdana
Gui, Add, Text,cBlue Center, Post Tits bot
Gui, font, s8 norm, Verdana
gui, add, edit, vfName w180, First Name
gui, add, edit, vlName w180, Last Name
gui, add, edit, vAddress1 w180, Address1
gui, add, edit, vAddress2 w180, Address2
gui, add, edit, vCity w180, City
Gui, Add, Dropdownlist, vState w180, AL|AK|AZ|AR|CA|CO|CT|DE|DC|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY
gui, add, edit, vZIP w180, ZIP Code
gui, add, edit, vemail w180, Email
gui, add, edit, vemailconf w180, Confirm Email
Gui, Add, Dropdownlist, vBirth w180, 1900|1901|1902|1903|1904|1905|1906|1907|1908|1909|1910|1911|1912|1913|1914|1915|1916|1917|1918|1919|1920|1921|1922|1923|1924|1925|1926|1927|1928|1929|1930|1931|1932|1933|1934|1935|1936|1937|1938|1939|1940|1941|1942|1943|1944|1945|1946|1947|1948|1949|1950|1951|1952|1953|1954|1955|1956|1957|1958|1959|1960|1961|1962|1963|1964|1965|1966|1967|1968|1969|1970|1971|1972|1973|1974|1975|1976|1977|1978|1979|1980|1981|1982|1983|1984|1985|1986|1987|1988|1989|1990|1991|1992|1993|1994|1995|1996|1997|1998|1999|2000
gui, add, edit, vamount w180, Number of Entries
Gui, Show, w750 h550 Center, Post Tits made by Mr Kitty
gui, add, button, default, Submit ; The label ButtonOK (if it exists) will be run when the button is pressed.
COM_AtLaxWinInit()
pwb:=COM_AtlAxGetControl(COM_AtlAxCreateContainer(WinExist(), 230, 0, 520, 550, "shell.explorer") )
COM_Invoke(pwb, "Navigate", "http://www3.3m.com/qfrm/ShowSurvey?surveyid=JOJNPRG4")
COM_Invoke(pwb, "Silent=", True)
return
GuiClose:
ExitApp
ButtonSubmit:
{
Gui, Submit, nohide
AptNumber = 1
loop %amount%
{
JS1 := "javascript:document.getElementById('first_name'). value='" fName "';void(0)"
JS2 := "javascript:document.getElementById('last_name'). value='" lName "';void(0)"
JS3 := "javascript:document.getElementById('address_1'). value='" Address1 "';void(0)"
JS4 := "javascript:document.getElementById('address_2'). value='" Address2 "';void(0)"
JS5 := "javascript:document.getElementById(city'). value='" City "';void(0)"
JS6 := "javascript:document.getElementById('state'). value='" State "';void(0)"
JS7 := "javascript:document.getElementById(''). value='" "';void(0)"
JS8 := "javascript:document.getElementById(''). value='" "';void(0)"
JS9 := "javascript:document.getElementById(''). value='" "';void(0)"
JS10 := "javascript:document.forms[0].submit()"
COM_Invoke(pwb, "Navigate", JS1)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS2)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS3)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS4)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS5)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS6)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS7)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS8)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS9)
Sleep, 100
COM_Invoke(pwb, "Navigate", JS10)
Sleep, 2500
COM_Invoke(pwb, "Navigate", "http://www3.3m.com/qfrm/ShowSurvey?surveyid=JOJNPRG4")
Sleep, 2500
}
}