找回密码
 加入
搜索
查看: 6969|回复: 12

[IE类操作] 求用au3点击网页中的链接

  [复制链接]
发表于 2011-4-22 12:58:48 | 显示全部楼层 |阅读模式
本帖最后由 lluxury 于 2011-4-22 13:03 编辑

网页显示如下:

短刀/10/∞  
[使用] [丢弃] [修炼]   
我的想法是检测到"短刀",就点下面的[使用]链接
短刀/10/∞ 是文字的,[使用] [丢弃] [修炼]都是超链接

付源码
<div id="item">
<table width="100%" height="328" border="0" align="center" cellpadding="2" cellspacing="1" class="mytable">
        <tr>
                <td width="100%" colspan="2" class="tdtitle"><b>物品(1/6) [银两 1268]</b>
                </td>
        </tr>
        <tr>
                <td width="100%" height="263" valign="top" colspan="2" class="tdbody">

                        <table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">
                                <tr>
                                        <td width="100%"><a title="刀系武器">短刀/10/∞</a>
                                        </td>
                                </tr>
                                <tr>
                                        <td width="100%">
                                        <a href='main.asp?mode=action&method=itemuse&pos=1'>[使用]</a>&nbsp;<a href='main.asp?mode=action&method=itemdel&pos=1'>[丢弃]</a>&nbsp;
                                        </td>
                                </tr>
                        </table>

                &nbsp;
                </td>
        </tr>
        <tr>
                <td width="72" class="tdtitle"><b>队伍</b></td>
                <td width="128" class="tdbody">&nbsp;</td>
        </tr>
        <tr>
                <td class="tdtitle"><b>队友</b></td>
                <td class="tdbody">&nbsp;</td>
        </tr>
</table>
</div>
 楼主| 发表于 2011-4-23 22:23:42 | 显示全部楼层
我有个想法,文字用正则读出,点击超连接用后台鼠标,不知道可行不
发表于 2011-4-23 22:33:20 | 显示全部楼层
你为什么不直接提取URL呢
发表于 2011-4-24 09:05:56 | 显示全部楼层
应该是固定格式吧.
1.mode=action(动作)
2.method=itemuse,使用 method=itemdel,删除(丢弃)
3.pos=1(真?)
 楼主| 发表于 2011-4-24 10:02:21 | 显示全部楼层
你为什么不直接提取URL呢
love5173 发表于 2011-4-23 22:33



    因为哪链接表示的是个位置啊,我要确定位置上的东西可用才点,比如上面是个毒药,一点就死掉了

本来打算,读出上面的标签然后用 index方式点链接,但发现这个链接数量是可变的,有时候出来2个,有时候出来3个,一样不能定位
 楼主| 发表于 2011-4-24 10:05:49 | 显示全部楼层
回复 4# 3mile


    pos是表示位置的,一共有6个pos,可以当成6个口袋,我要先判断里面是什么才能点口袋
发表于 2011-4-24 16:40:16 | 显示全部楼层
这是要做网页游戏的外挂吗?
 楼主| 发表于 2011-4-24 17:16:40 | 显示全部楼层
不是,是内挂^^
 楼主| 发表于 2011-4-25 07:37:35 | 显示全部楼层
很头疼啊,就查这个了,不好实现
发表于 2011-4-25 13:53:37 | 显示全部楼层
可以的 可以按照文本 点击
发表于 2011-4-25 14:20:32 | 显示全部楼层
_IEPropertyGet($oLink, "innerText")

$oLink.click
 楼主| 发表于 2011-4-26 04:32:21 | 显示全部楼层
_IEPropertyGet($oLink, "innerText")

$oLink.click
haodd 发表于 2011-4-25 14:20


可否详细点说明,因为超联接6个都是写的一样,必须要上一行的文字来确定是否点击
 楼主| 发表于 2011-4-26 11:56:25 | 显示全部楼层
我在想,能不能选择提交某个td里面的html链接
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-22 17:30 , Processed in 0.089817 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表