Jump to content

_IELinkClickByText, "title"


Olsson
 Share

Recommended Posts

Hi there,

been trying on this for abit and I couldn't find what to do really;

I have this code:

<map name="map1">
<area href="build.php?id=39" title="Samlingsplats nivå 1" coords="270,158,303,135,316,155,318,178,304,211,288,227,263,238,250,215" shape="poly"><area href="build.php?id=19" title="Smedja nivå 3" coords="53,91,53,37,128,37,128,91,91,112" shape="poly"><area href="build.php?id=20" title="Grotta nivå 10" coords="136,66,136,12,211,12,211,66,174,87" shape="poly"><area href="build.php?id=21" title="Residens nivå 10" coords="196,56,196,2,271,2,271,56,234,77" shape="poly"><area href="build.php?id=22" title="Grotta nivå 10" coords="270,69,270,15,345,15,345,69,308,90" shape="poly"><area href="build.php?id=23" title="Byggplats" coords="327,117,365,97,401,117,365,138" shape="poly"><area href="build.php?id=24" title="Hjältens egendom nivå 1" coords="14,129,14,75,89,75,89,129,52,150" shape="poly"><area href="build.php?id=25" title="Magasin nivå 10" coords="97,137,97,83,172,83,172,137,135,158" shape="poly"><area href="build.php?id=26" title="Huvudbyggnad nivå 8" coords="182,119,182,65,257,65,257,119,220,140" shape="poly"><area href="build.php?id=27" title="Marknadsplats nivå 7" coords="337,156,337,102,412,102,412,156,375,177" shape="poly"><area href="build.php?id=28" title="Vapenkammare nivå 1" coords="2,199,2,145,77,145,77,199,40,220" shape="poly"><area href="build.php?id=29" title="Silo nivå 9" coords="129,164,129,110,204,110,204,164,167,185" shape="poly"><area href="build.php?id=30" title="Baracker nivå 10" coords="92,189,92,135,167,135,167,189,130,210" shape="poly"><area href="build.php?id=31" title="Akademi nivå 9" coords="342,216,342,162,417,162,417,216,380,237" shape="poly"><area href="build.php?id=32" title="Stall nivå 4" coords="22,238,22,184,97,184,97,238,60,259" shape="poly"><area href="build.php?id=33" title="Byggplats" coords="167,232,205,212,241,232,205,253" shape="poly"><area href="build.php?id=34" title="Grotta nivå 3" coords="290,251,290,197,365,197,365,251,328,272" shape="poly"><area href="build.php?id=35" title="Sågverk nivå 3" coords="95,273,95,219,170,219,170,273,133,294" shape="poly"><area href="build.php?id=36" title="Byggplats" coords="222,284,260,264,296,284,260,305" shape="poly"><area href="build.php?id=37" title="Vetekvarn nivå 4" coords="80,306,80,252,155,252,155,306,118,327" shape="poly"><area href="build.php?id=38" title="Byggplats" coords="199,316,237,296,273,316,237,337" shape="poly">
<area href="build.php?id=40" title="Jordvall nivå 6" coords="312,338,347,338,377,320,406,288,421,262,421,222,396,275,360,311" shape="poly">
<area href="build.php?id=40" title="Jordvall nivå 6" coords="49,338,0,274,0,240,33,286,88,338" shape="poly">
<area href="build.php?id=40" title="Jordvall nivå 6" coords="0,144,34,88,93,39,181,15,252,15,305,31,358,63,402,106,421,151,421,93,378,47,280,0,175,0,78,28,0,

92" shape="poly">
</map>

(Travian, SE-version)

and I want to make the link clicking for the title="X".

Any ideas?

Thanks,

Olsson

Link to comment
Share on other sites

this is messy, give us an URL please.

There is not title X in your sample !

Edited by goldenix
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

Client-side image map links are part of the document links collection, so you can get the collection, loop through looking for what you want and click on it:

$oLinks = _IELinkGetCollection($oIE)
For $oLink in $oLinks
    If String($oLink.title) = "X" then _IEAction($oLink, "click")
Next

Dale

p.s. you could also just figure out the href you want and use _IENavigate

p.p.s.s. You can also use _IEPropertyGet to get the screen coordinates of the MAP element and then use MouseClick() to click on the correct screen coordinate

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

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...