Web Form [Radio Button]

Get help with using AutoHotkey and its commands and hotkeys
Posts: 2
Joined: 15 Dec 2018, 21:23

Web Form [Radio Button]

12 Jan 2019, 12:26

Hi All,
I am trying to fill in a webform using AutoHotKey.
1. How do i change the item on drop-down list? By default, it's selected to "Smart office suite". I need to select "Smart office suite -Web"
2. How do it change the item on the radio button field. By default, it is selected to "MS Access". I need to select "SQL Server"

Here's the link to the webform: http://www.so365.in/elicense/elicense.aspx

A forum member help me with a code to fill in the webform and do few other tasks. https://www.autohotkey.com/boards/viewt ... 76&t=60020

Appreciate if someone can modify the old one and provide the new one.

User avatar
Posts: 1269
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Web Form [Radio Button]

14 Jan 2019, 10:17

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Data:= { "ctl00$MainContent$txt_company":"Val Technologies", "ctl00$MainContent$txt_Location":"Dubai", "ctl00$MainContent$txt_ActivationCode":"00111726908643","ctl00$MainContent$email":"[email protected]","ctl00$MainContent$phone":"22254123", "ctl00$MainContent$drp_Software":"Smart office suite-Web"}
url:="http://www.so365.in/elicense/elicense.aspx"  ;example form

wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := true


while wb.readyState!=4 || wb.document.readyState != "complete" || wb.busy
	sleep 10

for Field, Value in Data
	wb.document.all[Field].value := Value
	Sleep, 100


Loop % (input := wb.document.getElementsByTagName("input")).length	;-->loop through all input tags and click on any that contain the specifie value
	if (InStr(input[A_Index-1].value,"send")){

sleep 5000
;^The Above should work, but i find this is more reliable....
HWND := wb.hwnd
WinGet PID, PID, ahk_id %HWND%
Process, Close, % PID
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.

Return to “Ask For Help”

Who is online

Users browsing this forum: Albireo, Bing [Bot], densch, Google [Bot], kostons, MannyKSoSo, njs, Odlanir, shadowsong, swagfag, teadrinker and 197 guests