Sign in to follow this  
Followers 0
adz89

IE controls

11 posts in this topic

Right my first post! I've been using AutoIT for about two months now, and am already getting quite advanced with it, but when it come to IE controls I'm bluddy useless!

The Problems:

1. Im trying to click on the login button on this site Street Mobster, but I dont know what to use! Would I use IMGClick, or a form submit command?

2. I want to click on a specific link which changes position daily within the game, the link text is: CITY HOTEL, but I can't get AutoIT to click on it!

The Source:

This is the source of the page where I want to click on the link, CITY HOTEL:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Ranking ~ Bars - streetmobster.com</title>
    <meta name="description" content="STREETMOBSTER mass online game. Life of a gangster."/>
    <meta name='keywords' content='mobster,street,multiplayer,mmorpg,gangster,mob,rpg,gangster,gangsta'/>
    <meta name='copyright' content='(C)2006-2008 nimrod-games.com'/>
    <meta name="authors" content="Boian Katzarsky, Stoian Doichev"/>
    
    
        <script type='text/javascript'>
            StaticServer = 'http://streetmobster.com'; 
            Server = 'http://streetmobster.com/';
            REQ_PAIR = 'z=vc1z';
            UID = 1396;
            GID = 1;
        </script>
        <script type='text/javascript' src='http://streetmobster.com/js/default.js?x'></script>
        <link rel='icon' href='http://streetmobster.com/tpl/favicon.ico' type='image/x-icon' />
        <link rel='shortcut icon' href='http://streetmobster.com/tpl/favicon.ico' type='image/x-icon' />
    
    
    <link rel='stylesheet' type='text/css' href='http://streetmobster.com/tpl/base.css?rnd' media='all'/>
    <link rel='stylesheet' type='text/css' href='http://streetmobster.com/tpl/usericon.css' media='all'/>
    <link rel='stylesheet' type='text/css' href='http://streetmobster.com/tpl/flags.css' media='all'/>
    <script type='text/javascript' src='http://streetmobster.com/js/tooltip.js'></script></head>
<body>  <center>
    <div id='wrapper'>
        <div id='gndnew'>
        <a href='#'> </a><a href='#'> </a>      
        </div>
        <div id='ifwrapper'>
                <a href='?&z=vc1z'><img id='logo' src='http://streetmobster.com/tpl/img/logo2.gif' alt='streetmobster.com - the real gangsta shit' title='streetmobster.com - the real gangsta shit'/></a>      <div id='header'>
            <div id='game-ver'>UNDERGROUND v2.0</div>
            <div class='adds'><div><a href='?q=map/3132&z=vc1z' class='nad' title='u:Gangster:10/-19:ca:22k:10:29:spirit666:u-on'><img src='http://streetmobster.com/res/avt/10/-19.gif' class='avt' alt=''/><span class='u-on nw'>spirit666</span><br/>i sell credit 26k each in blackmarket!!</a><a href='?q=casino//6962&z=vc1z' class='nad' title='u:SubMod:10/-14:th:995k:94:5:MadDog:mod-on'><img src='http://streetmobster.com/res/avt/10/-14.gif' class='avt' alt=''/><span class='mod-on nw'>MadDog</span><br/>$$$ THE BEST CASINO IN TOWN $$$ Win Easy Money here
Just Click on this advertisement.</a></div></div>       <div id='main-menu'>
        
                <a href='?q=city&z=vc1z' class='city' id='cityitem'>The City</a>
                | <a href='?q=news//ad&z=vc1z' class='newsp'>Newspaper</a>
                | <a href='?q=jail&z=vc1z' class='u-jl'>Jail</a>
                | <a href='?q=top10/online&z=vc1z' class='top10'>Ranking</a> <a href='?q=top10////18&z=vc1z' class='pozition' title='Chart Position'>#260</a>
                | <a href='?q=tournament&z=vc1z' class='victory'>Tournaments</a>
                | <a href='?q=top10/bar&z=vc1z' class='drink'>Bars</a>
                | <a href='?q=extras&z=vc1z' class='extras'>Extras</a>          
                | <a href='?q=help//howdoiplay&z=vc1z' class='xhelp' title='How do I play?'> </a>
                | <a href='?q=faq&z=vc1z' class='attack'>FAQ</a>
                | <a href='http://forum.streetmobster.com/' target='_blank' class='chat'>Forum</a>

                <a href='?q=auth/logout&z=vc1z' id='logout' class='logout' title='Exit the game'>Exit</a>
                        </div>
        </div>

        <div id='left'><div id='ddcitymenu'>
                    <div>
                    <a href='?q=casino&z=vc1z' class='cards'>Casino</a>
                    <a href='?q=bank&z=vc1z' class='cash'>Bank</a>
                    <a href='?q=police&z=vc1z' class='cop-on'>PD</a>
                    <a href='?q=wanted&z=vc1z' class='hunter'>Bounty Hunters</a>
                    <a href='?q=market&z=vc1z' class='goods'>Black Market</a>
                    <a href='?q=trade&z=vc1z' class='trade'>Trade</a>
                    <a href='?q=smuggler&z=vc1z' class='goods'>Smuggler</a>
                    <a href='?q=hospital&z=vc1z' class='u-er'>Hospital</a>
                    <a href='?q=fitness&z=vc1z' class='strength'>Fitness</a>
                    <a href='?q=learn&z=vc1z' class='intelect'>School</a>
                    <a href='?q=quest&z=vc1z' class='quest'>Quests</a>
                     <a href='?q=bar//82&z=vc1z' class='city'>City Hotel</a>
                    <a href='?q=casino_licence&z=vc1z' class='city'>Casino's License</a>
                    
                    
                    </div>
                </div><div id='nick' title='Profile'><a href='?q=profile&z=vc1z' class='u-jl'>adz89</a></div><div id='avatar'><a href='?q=profile&z=vc1z'><img src='http://streetmobster.com/res/avt/10/0.gif' alt=''/></a></div>
            <div id='usrtools'>
                <a href='?q=map&z=vc1z' class='street' title='My Street'>My Street</a>
                <a href='?q=racket&z=vc1z' class='racket_buildings ' title='Racket: 0 / 0'>Racket</a>
                <a href='?q=profile//goods&z=vc1z' class='goods'>My stuff</a>
                <a href='?q=crime_log&z=vc1z' class='history'>History</a>
            </div>
            <div id='props'>
                <div class='life' title='Life'><a href='?q=hospital&z=vc1z'><div class='gw'><div class='gg'  title='Life: 100 / 100'><div class='gok' style='width:100%;'>&nbsp;</div></div><em>100</em></div></a></div>
                <div class='stamina' title='Stamina'><a href='?q=top10/bar&z=vc1z'><div class='gw'><div class='gg' id='stitle' title='Stamina: 100 / 100'><div class='gok' style='width:100%;' id='sgauge'>&nbsp;</div></div><em id='svalue'>100</em></div></a></div>
                <div class='risk' title='Risk'><a href='?q=hospital&z=vc1z'><div class='gw'><div class='gg' title='Risk: 0 / 200  Record: 2'><div class='gok' style='width:0%;'>&nbsp;</div></div><em>0</em></div></a></div>
                <div class='toxic' title='Toxication'><a href='?q=hospital&z=vc1z'><div class='gw'><div class='gg' title='Toxication: 0 / 200'><div class='gok' style='width:0%;'>&nbsp;</div></div><em>0</em></div></a></div>
                <div class='quest' title='Quest: You have not taken a quest.'><a href='?q=quest&z=vc1z'><div class='gw'><div class='gg'><div class='gok' style='width:0%;'>&nbsp;</div></div><em class='narrow'>0<small>%</small></em></div></a></div>
                <div class='sep'>&nbsp;</div>
                <div class='experience' title='Level [Experience]'>
                <a href='?q=skills&z=vc1z' title='Level 8 (8 used + 0 free points)'>8 <span title='Experience'>[67k]</span></a>
                <div style='margin-top:1px;' class='gw' title='Experience: 67 073 / 70 000 (Level 9)'><div class='gg'><div class='gok' style='width:87%;'></div></div><em class='narrow'>87<small>%</small></em></div>
            </div>
                <div class='respect' title='Respect'>8 955</div>
                <div class='attack' title='Attack (In battle attack is affected by random factors) '><a href='?q=arms&z=vc1z'>9 750</a></div>
                <div class='intelect' title='Intellect'><a href='?q=learn&z=vc1z'>12 704</a></div>
                <div class='strength' title='Strength'><a href='?q=fitness&z=vc1z'>12 129</a></div>
                <div class='sexapeal' title='Sexapeal'><a href='?q=learn&z=vc1z'>5 383</a></div>
                <div class='cash' title='Cash'><a href='?q=bank&z=vc1z'>17 991</a></div>
                <div class='credits' title='Credits'>0 <small>[<a href='?q=credits&z=vc1z'>buy credits</a>]</small></div>
                <div class='grenade' title='Granades'><a href='?q=arms&z=vc1z'>0 <span title='Today have left'>(5)</span></a> <small>[<a href='?q=smuggler/grenades&z=vc1z'>load</a>]</small></div>
                <div class='sep'>&nbsp;</div>

                <div id='arms'>
                    <div class='gun'><a href='?q=arms&z=vc1z' title='204'>Pocket knife x1</a><div class='gw'><div class='gg'><div class='gok' style='width:74.7%;' title='747 shots'></div></div><em>747</em></div></div>
                    <div class='armour'><a href='?q=arms&z=vc1z' title='301'>Puppy x1</a><div class='gw'><div class='gg'><div class='gok' style='width:81.9%;' title='819 shots'></div></div><em>819</em></div></div>
                    <div class='car'><a href='?q=arms&z=vc1z' title='104'>Skate x1</a><div class='gw'><div class='gg'><div class='gok' style='width:81.9%;' title='819 shots'></div></div><em>819</em></div></div>
                </div>

                <div class='mystatus ustat-warn multilinestat' title='Shows your status: OK/Prisoner/In battle/In ER/...'><a href='?q=jail&z=vc1z' title='You cannot attack any players and you don't have access to some parts of the game.'>In jail<br/>till <span class='gtrt' title='06/30/2008 15:52 ЕSТ'>44 day 15:30</span></a></div>
            </div></div><div id='tip'>When you click on someone's name, usually you're taken on his street.</div>
        
            <div id='game-time'>
                <div class='lang_switcher'><a href='?q=top10/bar&_lng=en&z=vc1z' class='lngen ficon' title='English'> </a><a href='?q=top10/bar&_lng=es&z=vc1z' class='lnges ficon' title='Español'> </a></div>
                <div class='gtime'><span class='gtrt' title='06/30/2008 13:51 ЕSТ'>44 day 07:27</span></div>
                <div class='gday' style='cursor:default;'><a href='?q=help//day_type/&z=vc1z' class='' title='You decrease 2x faster risk as time goes by.'>day of sneakout</a></div>
                <div class='gconn'><a href='?q=top10/online&z=vc1z' class='' title='Online: 73
Demo: 7 
Anonymous: 2226 
All: 2299 
Hits: 521 (475++)'>73 online</a></div>
            </div><div id='right'><div id='mygang'><div style='position:absolute; top:0; right:0;' class=' sicon' title=''> </div><a href='?q=gang&z=vc1z' class='gang-no'>Create gang</a></div><br/><div id='myfriends'><a href='?q=friend&z=vc1z' class='friends'>Add friends</a><div></div></div><div id='mymail'><a href='?q=msg&amp;mbox=1&z=vc1z' class='mailbox'>Inbox(0)</a><div id='myinbox'></div></div><div id='strangerz'><a href='?q=help//timelimit&z=vc1z'><div class='gw gwtime' title='Time played: 00:43/12:00 6%'><div class='gg' id='sptitle'><div class='gok' style='width:6%;' id='stgauge'>&nbsp;</div></div><em>00:43</em></div></a> </div></div><div class='quick_msg'><a href='?q=qmsg&z=vc1z' class='qmsg_all' title='Съобщения: 0'>0</a></div><div id='footer'>
          <div class='mid-footer'>
            <div class='footer-links'>
                <div>
                    <span style='float:left;'><span class='in'><a href='?q=help//crew&z=vc1z' class='xicon gang-no'>crew</a>|<a href='?q=help//terms&z=vc1z' class='xicon exclam2'>terms</a>|<a href='?q=report&z=vc1z' class='xicon fold_at'>complaints</a>|<a href='?q=page/admins&z=vc1z' class='xicon mod-of'>admins</a>|<a href='http://forum.streetmobster.com/' target='_blank' class='xicon chat'>forum</a></span></span>
                    <span style='float:right;'><a href='http://nimrod-games.com/index-en.php' target='_blank' title='produced by nimrod games (nimrod-games.com)'>nimrod-games.com</a>|<a href='http://wisdom.bg' target='_blank' title='supported by wisdom.bg'>wisdom.bg</a></span>
                    <br/>
                </div>          </div>
        </div>
        <div class='footer-banner'><div class='banner'><script  src="http://tag.contextweb.com/TagPublish/getjs.aspx?action=VIEWAD&cwrun=200&cwadformat=728X90&cwpid=507337&cwwidth=728&cwheight=90&cwpnet=1&cwtagid=29949"></script></div></div>
        </div>

        <div id='content_body'><div class='building black-market'>
            <div class='local-tasks'>
                <a href='?q=top10/search&z=vc1z' class='find sicon' title='Search gangser'> </a>
                | <a href='?q=top10/user&z=vc1z' class='u-on'>Gangsters</a>
                | <a href='?q=top10/gang&z=vc1z' class='gang'>Gangs</a>
                | <a href='?q=top10/bar&z=vc1z' class='map'>Bars</a>
                | <a href='?q=top10/cop&z=vc1z' class='u-cop'>Detectives</a>
                | <a href='?q=top10/country&z=vc1z' class='countries'>Countries</a>
                | <a href='?q=top10/lang&z=vc1z' class='countries'>Langs</a>
                | <a href='?q=help//top10&z=vc1z' class='xhelp' title='Help'> </a>
            </div>
            <div class='body'><h1>Ranking ~ Bars</h1>
                    <p class='sub-header-menu'>
                            <a href='?q=top10/bar/all&z=vc1z' class='respect'>All</a>
                            | <a href='?q=top10/bar/hotel&z=vc1z' class='bt-hotel'>Hotel</a>
                            | <a href='?q=top10/bar/club&z=vc1z' class='bt-club'>Club</a>
                            | <a href='?q=top10/bar/cafe&z=vc1z' class='bt-cafe'>Cafe</a>
                            | <a href='?q=top10/bar/casino&z=vc1z' class='bt-casino'>Casino</a>
                    </p><table class='default'><tr><th>#</th><th>Type</th><th>Bar</th><th>Owner</th><th class='r'><span class='top10'>Rating</span></th><th> </th><th> </th></tr><tr>
                                <td class='r'>1.</td>
                                <td><span class='bt-hotel'>Hotel</span></td>
                                <td><a href='?q=bar//82&z=vc1z'>CITY HOTEL</a></td>
                                <td><a href='?q=map/1&z=vc1z' class='root-of'  title='u:ROOT:10/0:us:76M:0:0' >streetmobster</a></td>
                                <td class='r'>1980</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>2.</td>
                                <td><span class='bt-casino'>Casino</span></td>
                                <td><a href='?q=casino//6962&z=vc1z'>$$$ BEST ODD IN THE CI...</a></td>
                                <td><a href='?q=map/275&z=vc1z' class='mod-on'  title='u:SubMod:10/-14:th:995k:94:5' >MadDog</a></td>
                                <td class='r'>1431</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>3.</td>
                                <td><span class='bt-club'>Club</span></td>
                                <td><a href='?q=bar//16024&z=vc1z'>DRINKS CHEAP as posibl...</a></td>
                                <td><a href='?q=map/1090&z=vc1z' class='u-on'  title='u:Gangster:10/0:lv:109k:8:42' >Gangsteryga</a></td>
                                <td class='r'>1352</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>4.</td>
                                <td><span class='bt-cafe'>Cafe</span></td>
                                <td><a href='?q=bar//3236&z=vc1z'>Papa lit</a></td>
                                <td><a href='?q=map/312&z=vc1z' class='u-of'  title='u:Gangster:10/0:th:153k:75:41' >lit74</a></td>
                                <td class='r'>121</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>5.</td>
                                <td><span class='bt-club'>Club</span></td>
                                <td><a href='?q=bar//28251&z=vc1z'>TnA Haven</a></td>
                                <td><a href='?q=map/578&z=vc1z' class='vip-of'  title='u:VIP Gangster:10/578:us:142k:87:34' >BuDMan</a></td>
                                <td class='r'>119</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>6.</td>
                                <td><span class='bt-cafe'>Cafe</span></td>
                                <td><a href='?q=bar//5108&z=vc1z'>beer omg cheapest</a></td>
                                <td><a href='?q=map/461&z=vc1z' class='u-of'  title='u:Gangster:10/0:gb:40k:16:36' >jordyracer</a></td>
                                <td class='r'>115</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>7.</td>
                                <td><span class='bt-cafe'>Cafe</span></td>
                                <td><a href='?q=bar//7077&z=vc1z'><i>No name</i></a></td>
                                <td><a href='?q=map/372&z=vc1z' class='u-of'  title='u:Gangster:10/0:dk:57k:21:45' >YoungMoneymaker</a></td>
                                <td class='r'>105</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>8.</td>
                                <td><span class='bt-cafe'>Cafe</span></td>
                                <td><a href='?q=bar//29194&z=vc1z'>CHEAPEST CAFE IN TOWN&...</a></td>
                                <td><a href='?q=map/968&z=vc1z' class='u-of'  title='u:Gangster:10/0:ph:37k:56:32' >BONES</a></td>
                                <td class='r'>104</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>9.</td>
                                <td><span class='bt-club'>Club</span></td>
                                <td><a href='?q=bar//3350&z=vc1z'>Sexy Time</a></td>
                                <td><a href='?q=map/64&z=vc1z' class='u-of'  title='u:Gangster:10/0:us:57k:28:34' >Striker</a></td>
                                <td class='r'>101</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>10.</td>
                                <td><span class='bt-cafe'>Cafe</span></td>
                                <td><a href='?q=bar//28946&z=vc1z'>Cafe Detox .4tox - $10</a></td>
                                <td><a href='?q=map/1766&z=vc1z' class='u-of'  title='u:Gangster:10/0:us:205k:40:37' >Viggo</a></td>
                                <td class='r'>72</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>11.</td>
                                <td><span class='bt-club'>Club</span></td>
                                <td><a href='?q=bar//17292&z=vc1z'>Tits+Beer+Weed=Heaven</a></td>
                                <td><a href='?q=map/936&z=vc1z' class='u-on'  title='u:Gangster:10/-1:us:77k:38:38' >Jman</a></td>
                                <td class='r'>71</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>12.</td>
                                <td><span class='bt-cafe'>Cafe</span></td>
                                <td><a href='?q=bar//1451&z=vc1z'>0.3 Tox Come Here</a></td>
                                <td><a href='?q=map/142&z=vc1z' class='u-of'  title='u:Gangster:10/0:us:273k:89:25' >GanGstEr_</a></td>
                                <td class='r'>62</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>13.</td>
                                <td><span class='bt-club'>Club</span></td>
                                <td><a href='?q=bar//4918&z=vc1z'>CHEAP DRUG and LADY</a></td>
                                <td><a href='?q=map/275&z=vc1z' class='mod-on'  title='u:SubMod:10/-14:th:995k:94:5' >MadDog</a></td>
                                <td class='r'>60</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>14.</td>
                                <td><span class='bt-cafe'>Cafe</span></td>
                                <td><a href='?q=bar//27518&z=vc1z'>R G C  -  C A F E</a></td>
                                <td><a href='?q=map/448&z=vc1z' class='u-on'  title='u:Gangster:10/0:ro:52k:3:21' >antonio_s26</a></td>
                                <td class='r'>56</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr><tr>
                                <td class='r'>15.</td>
                                <td><span class='bt-hotel'>Hotel</span></td>
                                <td><a href='?q=bar//7408&z=vc1z'>Marisa's Precious...</a></td>
                                <td><a href='?q=map/248&z=vc1z' class='u-of'  title='u:Gangster:10/248:us:2189k:115:0' >Saigar</a></td>
                                <td class='r'>27</td>
                                <td><span class='lngen sicon'> </span></td>
                                <td> </td>
                                </tr></table><div class='page_bar'>
                <span class='pages'><span class='prev'><img src='http://streetmobster.com/tpl/icon/prev_.gif' alt=''/></span>  <a href='?q=top10/bar///1&z=vc1z' class='sel'>1</a> <a href='?q=top10/bar///2&z=vc1z'>2</a> <a href='?q=top10/bar///3&z=vc1z'>3</a> <a href='?q=top10/bar///4&z=vc1z'>4</a> <a href='?q=top10/bar///5&z=vc1z'>5</a> <a href='?q=top10/bar///6&z=vc1z'>6</a> <a href='?q=top10/bar///7&z=vc1z'>7</a> <a href='?q=top10/bar///8&z=vc1z'>8</a> <a href='?q=top10/bar///9&z=vc1z'>9</a>  <a href='?q=top10/bar///2&z=vc1z' class='next'><img src='http://streetmobster.com/tpl/icon/next.gif' alt=''/></a></span>
                    <form style='display:inline' onsubmit='java script:return onGoToPage();' action='#'><input type="hidden" name="z" value="vc1z" />
                        <input type='hidden' value='?q=top10/bar///%p' id='linktpl'/><input type='text' id='pnum' class='txt ad-txt page' style='padding:1px !important;' title='Page number'/><input type='image' name='submit' src='tpl/icon/find.gif' style='padding:1px !important;' align='top'/>
                    </form>
                <span class='summary'><b>127</b> bars / <b>9</b> pages</span>
            </div></div>
        </div></div>    </div>
    </div>
    </center>

    <script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4769024-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

Any help is greatly recieved

Thanks in Advanced


Self confessed noob...

Share this post


Link to post
Share on other sites



Please start by installing DebugBar (see my sig).

Dale


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

I've installed the debug bar, but what am I looking for?

I've tried using Mouseclick on the page, but because the link keeps changing position, its impossible to use it!


Self confessed noob...

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

This should work for the login button, error checking needs to be added

#include <IE.au3>
$oIE = _IECreate("http://www.streetmobster.com/")
$oButtons = _IETagNameGetCollection($oIE, "input")
For $oButton in $oButtons
    If String($oButton.value) = "login" Then
        _IEAction($oButton, "click")
        ExitLoop
    EndIf
Next
Edited by picaxe

Share this post


Link to post
Share on other sites

Ive just run the script, it opens a new blank window, then opens another window to the website.

But it still doesnt click on the login button...

Can someone explain to me how to use the string function please? I've checked the helpfile, but cant make total sense of it...

Told you im a noob! Lol!

Thanks for helping so far!


Self confessed noob...

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I just tried it again, it works for me. Since the script doesn't enter a username or password, I get a "Missing username" response when the login button is clicked.

Maybe try this

$oIE = _IECreate("http://www.streetmobster.com/")
ConsoleWrite("_IECreate @error=" & @error & @LF)
$oButtons = _IETagNameGetCollection($oIE, "input")
ConsoleWrite("_IETagNameGetCollection @error=" & @error & @LF)
For $oButton in $oButtons
    ConsoleWrite("$oButton=" & $oButton.value & @LF)
    If String($oButton.value) = "login" Then
        _IEAction($oButton, "click")
        ExitLoop
    EndIf
Next

and see what @error code and what $oButton values you get. See the help file for error details

Edited by picaxe

Share this post


Link to post
Share on other sites

Ive just run the script, it opens a new blank window, then opens another window to the website.

But it still doesnt click on the login button...

Can someone explain to me how to use the string function please? I've checked the helpfile, but cant make total sense of it...

Told you im a noob! Lol!

Thanks for helping so far!

I'll guess you are running Vista. Please see the remarks for _IECreate in the helpfile and add #RequireAdmin in your script.

Dale


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

I'll guess you are running Vista. Please see the remarks for _IECreate in the helpfile and add #RequireAdmin in your script.

Dale

Yea I am running Vista, thanks for that, i'll give it another go and tell you all how it went!


Self confessed noob...

Share this post


Link to post
Share on other sites

I've just tried the script with the #requireadmin code in, and now it works perfectly! Just one thing though, where would i put the send functions in so that I can have the script input my password and username for me?

The string functions really confuse me! Lol!


Self confessed noob...

Share this post


Link to post
Share on other sites

I try to avoid using send. Try this

#include <IE.au3>
$oIE = _IECreate("http://www.streetmobster.com/")

$oForm = _IEFormGetCollection($oIE, 0)
$oQuery = _IEFormElementGetCollection($oForm, 1)
_IEFormElementSetValue($oQuery, "username")
$oQuery = _IEFormElementGetCollection($oForm, 3)
_IEFormElementSetValue($oQuery, "password")

$oButtons = _IETagNameGetCollection($oIE, "input")
For $oButton in $oButtons
    If String($oButton.value) = "login" Then
        _IEAction($oButton, "click")
        ExitLoop
    EndIf
Next

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Ok then, all the things in my script are working now, (but the fingers are still crossed)!

But you've probably guessed that is only part of the script, after I've logged in, I want the script to click on an image link which opens a list, then make a selection from the list. Then I want the script to click on an arrow image link, then do the first thing again, then click on a different arrow, and do it all again! Yeah its confusing, lol!

Here's what I've got so far:

#include <IE.au3>
#RequireAdmin
$i = 0
$j = 0
$input =
$oIE = _IECreate("http://www.streetmobster.com/")
$oButtons = _IETagNameGetCollection($oIE, "input")
$oLaptops = _IETagNameGetCollection($oIE, "spot manager")
$oUparrow = _IETagNameGetCollection($oIE, "
$oRightarrow = _IETagNameGetCollection($oIE, "
$oForm = _IEFormGetCollection($oIE, 0)
$oQuery = _IEFormElementGetCollection($oForm, 1)
_IEFormElementSetValue($oQuery, "username")
$oQuery = _IEFormElementGetCollection($oForm, 3)
_IEFormElementSetValue($oQuery, "password")
For $oButton in $oButtons
    If String($oButton.value) = "login" Then
        _IEAction($oButton, "click")
        ExitLoop
    EndIf
Next
While $i <= $input
    While $j < 3
        For $oLaptop in $oLaptops
            If String($oLaptop.value) = "spot manager" Then
                _IEAction($oLaptop, "click")

Its a little unfinished, but as soon as I find out where I'm going with the functions It'll be finished!

But the problem is I'm not sure what to put in some areas, i.e. the blank ones!! lol!

BTW: The DEBUGBAR is telling me this;

The First Picture to be clicked = <DIV class="spot manager" m="36"></DIV>

The Menu after clicking the picture = <A href="?q=map/16~19/manager.rob&amp;z=9gtE">Steal the Laptop</A>

First Arrow = <A class=east href="?q=map/17~19&amp;z=9gtE">&nbsp;</A>

Second Arrow = <A class=north href="?q=map/16~20&amp;z=9gtE">&nbsp;</A>

Thank you in advance!

p.s. if you don't understand what I'm trying to do, I just need to know how to click on the links! Lol!

Edited by adz89

Self confessed noob...

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