Sign in to follow this  
Followers 0

How do you get the object names?

10 posts in this topic

I'm reading up on the new IE.au3 version2. The thing I'm really having a struggle with is how do you get the name of the object or field you want to access? I tried to use the active window tool, but I do not get any information about the fields I wish to interact with. MOst of the commands assume you know the name of the control you want to access, but how do you get the name?


Share this post

Link to post
Share on other sites

idk how much help i am now but ill write like i did:

went to the page, opened the source, ctrl+f and searched for a word FORM. The page was a rating page where you could rate pics. So i wanted to make auto-rater. Now, first FORM i found was:

<FORM NAME=loginform action= method=post>

i realized that was the login part, i searched for next FORM.

next up was this kind of stuff:

<TD WIDTH=360>

<TD WIDTH=72 ALIGN=center><INPUT TYPE=radio NAME=rating VALUE=0 onclick="if(pressed.value==0){pressed.value=1;this.form.submit()}"><B CLASS=hardcore>-</B><BR><B>ei hinda</B></TD>
<TD WIDTH=72 ALIGN=center><INPUT TYPE=radio NAME=rating VALUE=1 onclick="if(pressed.value==0){pressed.value=1;this.form.submit()}"><B CLASS=hardcore>1</B><BR><NOBR><B CLASS=hardcore>ei meeldi</B></NOBR></TD>
<TD WIDTH=72 ALIGN=center><INPUT TYPE=radio NAME=rating VALUE=2 onclick="if(pressed.value==0){pressed.value=1;this.form.submit()}"><B CLASS=hardcore>2</B><BR><NOBR><B CLASS=hardcore>suva</B></NOBR></TD>
<TD WIDTH=72 ALIGN=center><INPUT TYPE=radio NAME=rating VALUE=3 onclick="if(pressed.value==0){pressed.value=1;this.form.submit()}"><B CLASS=hardcore>3</B><BR><NOBR><B CLASS=hardcore>norm</B></NOBR></TD>
<TD WIDTH=72 ALIGN=center><INPUT TYPE=radio NAME=rating VALUE=4 onclick="if(pressed.value==0){pressed.value=1;this.form.submit()}"><B CLASS=hardcore>4</B><BR><NOBR><B CLASS=hardcore>lahe</B></NOBR></TD>
<TD WIDTH=72 ALIGN=center><INPUT TYPE=radio NAME=rating VALUE=5 onclick="if(pressed.value==0){pressed.value=1;this.form.submit()}"><B CLASS=hardcore>5</B><BR><NOBR><B CLASS=hardcore>megahea</B></NOBR></TD>


i saw this: <INPUT TYPE=radio NAME=rating VALUE=0 onclick="if(pressed.value==0){pressed.value=1;this.form.submit()}"><B CLASS=hardcore>-</B><BR><B>ei hinda</B></TD>

that was what i needed, to check the radio buttons. I took

i got the name and the value from there.

i hope you understand :)

Share this post

Link to post
Share on other sites

Tried that. I found this, which is in java script.



<link rel="stylesheet" type="text/css" href="/CAisd/css/analyst_styles.css">


body { background: url("/CAisd/img/sd_wallpaper.gif"); }

body.menuBar { background: #9cc2e4; }


<script LANGUAGE="Javascript" SRC="/CAisd/scripts/msgtext.js"></SCRIPT>

<script LANGUAGE="Javascript">

var IMG_ftv2folderopen = "/CAisd/img/ftv2folderopen.gif";

var IMG_ftv2mlastnode = "/CAisd/img/ftv2mlastnode.gif";

var IMG_ftv2mnode = "/CAisd/img/ftv2mnode.gif";

var IMG_treenode_open = "/CAisd/img/treenode_open.gif";

var IMG_treetop = "/CAisd/img/treetop.gif";

var IMG_ftv2plastnode = "/CAisd/img/ftv2plastnode.gif";

var IMG_ftv2pnode = "/CAisd/img/ftv2pnode.gif";

var IMG_treenode_normal = "/CAisd/img/treenode_normal.gif";

var IMG_ftv2blank = "/CAisd/img/ftv2blank.gif";

var IMG_ftv2vertline = "/CAisd/img/ftv2vertline.gif";

var IMG_ftv2lastnode = "/CAisd/img/ftv2lastnode.gif";

var IMG_ftv2node = "/CAisd/img/ftv2node.gif";

var IMG_lookup_hier = "/CAisd/img/lookup_hier.gif";

var IMG_lookup = "/CAisd/img/lookup.gif";

var IMG_lookup_cal = "/CAisd/img/lookup_cal.gif";

var IMG_pb_node = "/CAisd/img/pb_node.gif";

var IMG_pb_lastnode = "/CAisd/img/pb_lastnode.gif";

var IMG_barback = "/CAisd/img/barback.jpg";

var IMG_corner = "/CAisd/img/corner.gif";

var IMG_button_up_e = "/CAisd/img/button_up_e.gif";

var IMG_button_up_p = "/CAisd/img/button_up_p.gif";

var IMG_button_up_d = "/CAisd/img/button_up_d.gif";

var IMG_button_down_e = "/CAisd/img/button_down_e.gif";

var IMG_button_down_p = "/CAisd/img/button_down_p.gif";

var IMG_button_down_d = "/CAisd/img/button_down_d.gif";

var IMG_ud_top = "/CAisd/img/ud-top.gif";

var IMG_ud_middle = "/CAisd/img/ud-middle.gif";

var IMG_ud_bottom = "/CAisd/img/ud-bottom.gif";

var IMG_button_left_e = "/CAisd/img/button_left_e.gif";

var IMG_button_left_p = "/CAisd/img/button_left_p.gif";

var IMG_button_left_d = "/CAisd/img/button_left_d.gif";

var IMG_button_right_e = "/CAisd/img/button_right_e.gif";

var IMG_button_right_p = "/CAisd/img/button_right_p.gif";

var IMG_button_right_d = "/CAisd/img/button_right_d.gif";

var IMG_lr_left = "/CAisd/img/lr-left.gif";

var IMG_lr_middle = "/CAisd/img/lr-middle.gif";

var IMG_lr_right = "/CAisd/img/lr-right.gif";

var IMG_filtershow = "/CAisd/img/filtershow.gif";

var IMG_filterhide = "/CAisd/img/filterhide.gif";

var IMG_background = "/CAisd/img/background.gif";

var IMG_logo = "/CAisd/img/logo.gif";

var IMG_bar = "/CAisd/img/bar.gif";

var IMG_1ptrans = "/CAisd/img/1ptrans.gif";

var IMG_tour_page = "/CAisd/img/tour_page.gif";

var IMG_unselected_left = "/CAisd/img/unselected_left.gif";

var IMG_unselected_right = "/CAisd/img/unselected_right.gif";

var IMG_unselected_middle = "/CAisd/img/unselected_middle.gif";

var IMG_selected_left = "/CAisd/img/selected_left.gif";

var IMG_selected_right = "/CAisd/img/selected_right.gif";

var IMG_selected_middle = "/CAisd/img/selected_middle.gif";


<script LANGUAGE="Javascript" SRC="/CAisd/scripts/browser.js"></SCRIPT>

<script type="text/javascript">


if (_browser.supportsDOM < 2 || (_browser.isIE && _browser.version.major == 5 && _browser.version.minor < 5))




<script LANGUAGE="Javascript" SRC="/CAisd/scripts/ahdmenus.js"></SCRIPT>

<script LANGUAGE="Javascript" SRC="/CAisd/scripts/fid_gen.js"></SCRIPT>

<!-- -->

<!-- Start of ahdtop.htmpl -->

<script LANGUAGE="Javascript">

function activate_AHDtop()


if ( typeof window.opener == "object" &&

window.opener != null )

window.opener = null;

window.ahdtop = window = "AHDtop"



var ahd_window_count = 0;

var AHD_Windows = new Object();

var detailForms = new Object();

var close_edit_window = void(0);

var AHD_logout_requested = false

var popup_frames_info = new Array();

var closing_all_windows = false;

var refresh_in_progress = false;

var isLogReader = false;

var cfgCAISD = "/CAisd"

var cfgNX_ROOT= "/opt/CAisd";

var cfgCgi = "/CAisd/pdmweb.exe"

var cfgSID = "1250506006"

var cfgProductName = "Unicenter ServicePlus Service Desk"

var cfgFormTitle = "Unicenter ServicePlus Service Desk";

var cfgProductID = "ahd";

var cstID = "64719";

var cfgUserType = "analyst";

var cfgGuestUser = "0";

var propSupportR50 = "no";

var cfgARGISurl = "";

var cfgLdapEnabled = "no";

var cfgCIurl = "";

var cfgHTurl = "";

var cfgETRUSTurl = "";

var propIsITIL = ( null != "itil".match(/itil/) );

var cfgAnyContact = "0";

var cfgSearchStr = "";

var cfgAccessReqMgr = 2;

var cfgAccessChgMgr = 2;

var cfgAccessIssMgr = 2;

var cfgAccessAdmin = 1;

var cfgAccessInventory = 2;

var cfgAccessRef = 1;

var cfgAccessNotify = 1;

var cfgUserAuth = 1;

var cfgAccessSecurity = 0;

var UserAuth = "1" - 0;

var cfgCgiReportScript = '/CAisd/pdm_cgireport.exe';

// dpc 02/17/04 13062144 var cfgUserid = 'abcde';

var cfgUserid = "abcde";

var cfgDateFormat = 'MM/DD/YYYY HH:mm';

cfgCIEbrUrl = '';

cfgFaqInstalled = "0";

cfgCIEbrInstalled = "0";

var popup_frames_url = "/CAisd/html/popup_frames.html";

var cst_popup_frames_url = "/CAisd/html/cst_popup_frames.html";

var usdImg = new Object();

usdImg["product_banner"] = "/CAisd/sitemods/img/product_banner.jpg";

var usdStyles = new Object();

usdStyles["styles_ahd"] = "/CAisd/css/styles_ahd.css";

usdStyles["imgbutton"] = "/CAisd/css/imgbutton.css";

usdStyles["menubar"] = "/CAisd/css/menubar.css";

var usdScripts = new Object();

usdScripts["browser"] = "/CAisd/scripts/browser.js";

usdScripts["msgtext"] = "/CAisd/scripts/msgtext.js";

usdScripts["imgbutton"] = "/CAisd/scripts/imgbutton.js";

usdScripts["window_manager"] = "/CAisd/scripts/window_manager.js";

usdScripts["sitemods"] = "/CAisd/sitemods/scripts/sitemods.js";

var usdHTML = new Object();

usdHTML["cst_menubar"] = "/CAisd/html/cst_menubar.html";

usdHTML["menubar"] = "/CAisd/html/menubar.html";

usdHTML["top_splash"] = "/CAisd/html/top_splash.html";

usdHTML["gobtn"] = "/CAisd/sitemods/html/gobtn.html";

usdHTML["wlist"] = "/CAisd/html/window_list.html";

<!-- -->

// Start of imgbtndata.htmpl

var imgBtnData = new Object();

imgBtnData["left"] = "/CAisd/img/button_left.gif";

imgBtnData["left_active"] = "/CAisd/img/button_left_active.gif";

imgBtnData["left_down"] = "/CAisd/img/button_left_down.gif";

imgBtnData["middle"] = "/CAisd/img/button_middle.gif";

imgBtnData["middle_active"] = "/CAisd/img/button_middle_active.gif";

imgBtnData["middle_down"] = "/CAisd/img/button_middle_down.gif";

imgBtnData["middle_ns"] = "/CAisd/img/button_middle_ns.gif";

imgBtnData["right"] = "/CAisd/img/button_right.gif";

imgBtnData["right_active"] = "/CAisd/img/button_right_active.gif";

imgBtnData["right_down"] = "/CAisd/img/button_right_down.gif";

imgBtnData["enabled_color"] = "#000000";

imgBtnData["disabled_color"] = "#999999";

imgBtnData["down_color"] = "#FF9933";

// End of imgbtndata.htmpl

var cfgIsCS = ( cfgProductID == "cs" || cfgProductID == "htcs" );

var cfgAllowPopupResize = true;

var cstID = "64719";

var cstComboName = John Q.Public.';

var cfgUserid = "abcde";

var cfgCgiReportScript = '/CAisd/pdm_cgireport.exe';

var cfgSuppressHier = ' ';

var propPortalSession = "";

var propInitialPopup = "";

var notebookPageID = new Array();

var folderGraphVarsArray = new Array();

var cfgListAllWarn = "100" - 0;

var cfgListAllMaximum = "500" - 0;

var cfgListBottomWarn = "1000" - 0;

var cfgListBottomMaximum = "2500" - 0;

if ( typeof cfgListAllWarn != "number" || cfgListAllWarn < 0 )

cfgListAllWarn = 0;

if ( typeof cfgListAllMaximum != "number" || cfgListAllMaximum < 0 )

cfgListAllMaximum = 0;

if ( typeof cfgListBottomWarn != "number" || cfgListBottomWarn < 0 )

cfgListBottomWarn = 0;

if ( typeof cfgListBottomMaximum != "number" || cfgListBottomMaximum < 0 )

cfgListBottomMaximum = 0;

var cfgUserType = "analyst";

var cfgNX_SDURL= "";

var cfgNX_UAMURL= "";

var edit_profile_browser_opener = void(0);

var propIsITIL = ( null != "itil".match(/itil/) );

var propHierDlm = "";

if ( propHierDlm.length == 0 )

propHierDlm = ".";

var propHierCaseSensitive = "" - 0;

var cfgAccessReqMgr = 2;

var cfgAccessChgMgr = 2;

var cfgAccessIssMgr = 2;

var cfgAccessAdmin = 1;

var cfgAccessInventory = 2;

var cfgAccessRef = 1;

var cfgAccessNotify = 1;

var cfgAccessSecurity = 0;

var menuStyles = new Array();

var ctxmenuStyles = new Array();

var manage_popup_windows = new Object();

function initMenuStyles(win)


for ( var i = 0; i < win.document.styleSheets.length; i++ ) {

var rules = win.document.styleSheets.rules;

for ( var j = 0; j < rules.length; j++ ) {

var rtext = rules[j].style.cssText;

if ( rtext.length ) {

var rname = rules[j].selectorText;

if ( rname.match(/A\.menu/) ||

rname.match(/DIV\.menu/) ||

rname == ".clsMenuSelect" )

menuStyles[menuStyles.length] =

new Array ( rname, rtext );

else if ( rname.match(/\.ctxMenu/) )

ctxmenuStyles[ctxmenuStyles.length] =

new Array ( rname, rtext );





var workframe_queue = new Array();

var wf_delay_list = new Array();


<script language="javascript" src="/CAisd/scripts/msg_cat.js"></script>

<!-- -->

<!-- Start of ahdtop_site.htmpl -->

<script LANGUAGE="Javascript">

<!-- 03/24/05 John Smith bcdef Added variable to capture Access Type of logged in user -->

var cfgAccessType = "Analyst";

<!-- 05/05/2005 11:15:42 John Smith bcdef Added variable to search for Template in form title -->

var reg = /Template/;


<script language="javascript" src="/CAisd/scripts/msg_cat_site.js"></script>

<!-- End of ahdtop_site.htmpl -->

<!-- End of ahdtop.htmpl -->

<script LANGUAGE="Javascript" SRC="/CAisd/scripts/window_manager.js"></SCRIPT>

<script LANGUAGE="Javascript" SRC="/CAisd/scripts/popup.js"></SCRIPT>

<script LANGUAGE="Javascript" SRC="/CAisd/scripts/log_reader.js"></SCRIPT>

<script LANGUAGE="Javascript" SRC="/CAisd/scripts/profile_browser.js"></SCRIPT>

<script LANGUAGE="Javascript" SRC="/CAisd/scripts/report.js"></SCRIPT>

<TITLE>Unicenter ServicePlus Service Desk</TITLE>

<script LANGUAGE="Javascript" SRC="/CAisd/sitemods/scripts/sitemods.js"></SCRIPT>

<script LANGUAGE="Javascript" SRC="/CAisd/scripts/antiecho.js"></SCRIPT>

<script LANGUAGE="Javascript">redirect_if_echo('menu_frames.htmpl');</SCRIPT>


// All available hidden frames that could be used for

// issuing the url in the background.

var work_frames = new Array("workframe", "workframe_1", "workframe_2");

var work_frame_mgr = void(0);

var cfgWorkFrameTimeout = "30";





The oneway_frame, workframe, workframe_1, and workframe_2 are for background process.

Any modification to them can cause the application to stop working.


<FRAMESET COLS="*,1,1,1,1,1" FRAMEBORDER="0" FRAMESPACING="0" BORDER="0" onunload="closing_main_window()">

<FRAME SRC="/CAisd/sitemods/html/gobtn.html" NAME=gobtn NORESIZE SCROLLING=no marginheight=0 marginwidth=0 FRAMEBORDER=NO BORDER=0>












<FRAME SRC="/CAisd/html/menubar.html" NAME=menubar SCROLLING=no marginheight=0 marginwidth=0 FRAMEBORDER=NO BORDER=0>

<FRAME NAME=content SCROLLING=no marginheight=0 marginwidth=0 FRAMEBORDER=NO BORDER=0





<H2>Frames-Compatible Browser Required</H2>

The web interface to Unicenter ServicePlus Service Desk requires a browser that

supports frames, such as the latest version of

<A ID=lnk003 href=>Internet Explorer</A>,

<A ID=lnk004 href=>Mozilla</A>, or

<A ID=lnk005 href=>Netscape</A>.




What would be considered a control in this script? What would be helpful is someone simply highlighting the controls, and that way I can save it for further reference.

Share this post

Link to post
Share on other sites

well, i skipped the java script part.

Share this post

Link to post
Share on other sites

You could try the Web Developer Add-On/Extension within the Firefox browser. In the toolbar click 'Forms' and 'Display Form Details'.

Tooltips will appear within the displayed web page with form information.

Good luck.


Share this post

Link to post
Share on other sites

The controls are part of a application that runs in Internet explorer. :(

I was hoping I could automate them, but for right now I'm using mouse clicks and pixel searches. It is messy, and I rather clean it up with IE.au3. Also, my work won't let me use firefox. :)

Share this post

Link to post
Share on other sites

anyone else got a suggestion? if not, I guess I'm stuck.

There are actually quite a few things that will help. First, check out some scripts I wrote a while back to parse the DOM and give you information about the elements. It outputs the information to a web page. Valuator also included these scripts in AutoIt 123 and provides a nice interface for them.

Similat to the DOM Inspector in FireFox is the Microsoft DevToolBar

Another nice tool is MODIv2 (google for it)... it acts like a bookmark, but is a scriptlet that creates a "mouse-over" DOM imspector for your webpage. Some limitations, but it is nice and easy.

There are also some commercial apps that do this as well if you search for them...

Hope this helps.


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post

Link to post
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
Sign in to follow this  
Followers 0