AceLoc Posted September 7, 2006 Share Posted September 7, 2006 (edited) how do i let a MouseMove in a 'minimized' screen and click on it after. i tryed: expandcollapse popup#include <IE.au3> Opt("MouseCoordMode", 0) Opt("TrayIconHide", 1) _IENavigate($oIE, "http://ladderslasher.d2jsp.org") _IELoadWait($oIE) MouseX(); starts func _IELoadWait($oIE) Func _MouseClickPlus($Window, $Button = "left", $X = "", $Y = "", $Clicks = 1) Local $MK_LBUTTON = 0x0001 Local $WM_LBUTTONDOWN = 0x0201 Local $WM_LBUTTONUP = 0x0202 Local $MK_RBUTTON = 0x0002 Local $WM_RBUTTONDOWN = 0x0204 Local $WM_RBUTTONUP = 0x0205 Local $WM_MOUSEMOVE = 0x0200 Local $i = 0 Select Case $Button = "left" $Button = $MK_LBUTTON $ButtonDown = $WM_LBUTTONDOWN $ButtonUp = $WM_LBUTTONUP Case $Button = "right" $Button = $MK_RBUTTON $ButtonDown = $WM_RBUTTONDOWN $ButtonUp = $WM_RBUTTONUP EndSelect If $X = "" OR $Y = "" Then $MouseCoord = MouseGetPos() $X = $MouseCoord[0] $Y = $MouseCoord[1] EndIf For $i = 1 to $Clicks DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $WM_MOUSEMOVE, _ "int", 0, _ "long", _MakeLong($X, $Y)) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $ButtonDown, _ "int", $Button, _ "long", _MakeLong($X, $Y)) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $ButtonUp, _ "int", $Button, _ "long", _MakeLong($X, $Y)) Next EndFunc ;==>MouseClickPlus Func _MakeLong($LoWord,$HiWord) Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF)) EndFunc ;==>MakeLong Func MouseX() _MouseClickPlus("Internet Explorer_Server1", "left", 283, 225, 1) ;Sleep(1000) EndFunc ;==>MouseX this is not my complete script, but you'll understand. ! why does ths not work? Thanks! Edited September 7, 2006 by aceloc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
AceLoc Posted September 7, 2006 Author Share Posted September 7, 2006 (edited) i've did a research and also found this about the link;dont start talking about _IELinkClickByTextbecause that dont work ! Edited September 7, 2006 by aceloc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
AceLoc Posted September 7, 2006 Author Share Posted September 7, 2006 bumpzor [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
lod3n Posted September 7, 2006 Share Posted September 7, 2006 You can't click in a window at 283, 225 if that window is not occupying space at 283, 225. Those are screen coordinates, not application coordinates. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
Blue_Drache Posted September 7, 2006 Share Posted September 7, 2006 You can't click in a window at 283, 225 if that window is not occupying space at 283, 225. Those are screen coordinates, not application coordinates.No, he's in relative coord mode...(( Opt("MouseCoordMode",0) ))but since the window is minimized, there are effectively no coordinates. What you COULD do is ... instead of minimizing the window, spawn the IE session, size it to say ... a coordinate size of 800x600 and then move the upper left corner to -800x -600yCan't see it ... but you can clikzorz it.Have fun with your diablo bot, or whatever it is you're using to sniff out on d2. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
AceLoc Posted September 7, 2006 Author Share Posted September 7, 2006 No, he's in relative coord mode...(( Opt("MouseCoordMode",0) ))but since the window is minimized, there are effectively no coordinates. What you COULD do is ... instead of minimizing the window, spawn the IE session, size it to say ... a coordinate size of 800x600 and then move the upper left corner to -800x -600yCan't see it ... but you can clikzorz it.Have fun with your diablo bot, or whatever it is you're using to sniff out on d2.actually its a bot for a webbased RPG and i also used this script for minimized D2 (to click on something) and that worked.so why is this impossible to work on IE then? :/ [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
Blue_Drache Posted September 7, 2006 Share Posted September 7, 2006 (edited) actually its a bot for a webbased RPG and i also used this script for minimized D2 (to click on something) and that worked.so why is this impossible to work on IE then? :/Because of the way IE is written. It's notorious for being a complete pain in the patookas to automate reliably. IE does not display buttons as a normal window does...it does not expose its internals like other windows do, so we can't get ahold of it like we would any "Normal" window. You can always try Send("{tab" & $number & "}{enter}") Edited September 7, 2006 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
AceLoc Posted September 7, 2006 Author Share Posted September 7, 2006 Because of the way IE is written. It's notorious for being a complete pain in the patookas to automate reliably. IE does not display buttons as a normal window does...it does not expose its internals like other windows do, so we can't get ahold of it like we would any "Normal" window. You can always try Send("{tab" & $number & "}{enter}")and well even if i just maximize the screen then it still dont work :/ [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
Blue_Drache Posted September 7, 2006 Share Posted September 7, 2006 and well even if i just maximize the screen then it still dont work :/You'll have to use the COM interface then. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
AceLoc Posted September 7, 2006 Author Share Posted September 7, 2006 You'll have to use the COM interface then.links, examples would be great Thanks! [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
lod3n Posted September 7, 2006 Share Posted September 7, 2006 Instead of _IELinkClickByText how about this: $oInputs = _IETagNameGetCollection ($oIE, "span") For $oInput In $oInputs if stringinstr($oInput.innerText,"whatever you're trying to click on") then _IEAction ($oInput, "click" ) endif Next [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
AceLoc Posted September 7, 2006 Author Share Posted September 7, 2006 Instead of _IELinkClickByText how about this: $oInputs = _IETagNameGetCollection ($oIE, "span") For $oInput In $oInputs if stringinstr($oInput.innerText,"whatever you're trying to click on") then _IEAction ($oInput, "click" ) endif Nextdont work :/ [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
AceLoc Posted September 8, 2006 Author Share Posted September 8, 2006 (edited) i need to bump this really, because i can NOT continue my work without this :/THanks!edit: it also dont work maximized. Edited September 8, 2006 by aceloc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
lod3n Posted September 8, 2006 Share Posted September 8, 2006 Can you post the HTML from the page? [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
AceLoc Posted September 8, 2006 Author Share Posted September 8, 2006 Can you post the HTML from the page?this is the html expandcollapse popup<html> <head> <title>d2jsp - Ladder Slasher - by Paul Taulborg (njaguar)</title> <style type="text/css" media="all"> @import url(game.css); </style> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="-1"> <script language="javascript" src="common.js"></script> <script language="javascript" src="char.js"></script> <script language="javascript" src="town.js"></script> <script language="javascript" src="combat.js"></script> <script language="javascript" src="market.js"></script> <script language="javascript" src="sock.js"></script> <script language="javascript"> function pageLoad() { checkSocketLoaded(); } </script> </head> <body onload="pageLoad()"> <form name="a"> <div class="leftSide"> <div class="titleBar"> Character Stats </div> <div id="playerStats"> </div> <div id="itemStats"> </div> <br><br> <div class="titleBar"> Message Logs </div> <div id="logs"> </div> </div> <div class="rightSide"> <div class="titleBar"> d2jsp - Ladder Slasher - by Paul Taulborg (njaguar) © 2006 </div> <div id="mainPage"> </div> </div> <div id='popup'></div> </form> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1" height="1" id="sock" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="swliveconnect" value="true"> <param name="movie" value="sock.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <embed src="sock.swf" swliveconnect="true" quality="high" bgcolor="#ffffff" width="1" height="1" name="sock" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> </body> </html> and this is a screenshot: Thanks! [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
lod3n Posted September 8, 2006 Share Posted September 8, 2006 Okay, and what specifically on that screen are you trying to click on? "Create New Character"? [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
AceLoc Posted September 8, 2006 Author Share Posted September 8, 2006 on the charactername "STFU" [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
lod3n Posted September 8, 2006 Share Posted September 8, 2006 Well, the bad news is that it doesn't look like you can do much with it, as it's flash. I don't know of a good way of interacting with elements inside a flash object.it also dont work maximizedWell, that's very interesting. You know, I looked at your code, and 283, 225 seems to go to a blank spot in the document. Based on the screen shot you posted, you might have better luck with 283, 95. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
AceLoc Posted September 8, 2006 Author Share Posted September 8, 2006 Well, the bad news is that it doesn't look like you can do much with it, as it's flash. I don't know of a good way of interacting with elements inside a flash object.i knew that, thats why i said dont start about "_IELinkClickByText"thanks anyways i will see if this works! [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
AceLoc Posted September 8, 2006 Author Share Posted September 8, 2006 it dont work but i this is the location of the link Press CTRL-ALT-F to pause the display. >>>>>>>>>>>> Window Details <<<<<<<<<<<<< Title: d2jsp - Ladder Slasher - by Paul Taulborg (njaguar) - Microsoft Internet Explorer Class: IEFrame Size: X: -4 Y: -4 W: 1032 H: 746 >>>>>>>>>>> Mouse Details <<<<<<<<<<< Screen: X: 293 Y: 201 Cursor ID: 0 >>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<< RGB: Hex: 0xE4EAF2 Dec: 15002354 >>>>>>>>>>> Control Under Mouse <<<<<<<<<<< Size: X: 0 Y: 82 W: 1024 H: 617 Control ID: ClassNameNN: Internet Explorer_Server1 Text: >>>>>>>>>>> Status Bar Text <<<<<<<<<<< (1): http://ladderslasher.d2jsp.org/# (2): (3): (4): (5): (6): Internet >>>>>>>>>>> Visible Window Text <<<<<<<<<<< Koppelingen http://ladderslasher.d2jsp.org/ http://ladderslasher.d2jsp.org/ http://ladderslasher.d2jsp.org/# >>>>>>>>>>> Hidden Window Text <<<<<<<<<<< [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now