Jump to content

karamazov

Members
  • Posts

    12
  • Joined

  • Last visited

karamazov's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. What do you mean "without opening the browser"? Do you want to get info from a website without having a browser open? That might be difficult...
  2. Sorry for the double post...Bump...anyone have any other ideas? This problem has stumped me
  3. Hmm.. no luck with that one either.
  4. Well no I'm just using notepad as an example... . I have verified that pressing control twice actually does something. One guess I have is that you might have to use a different method to send multiple keystrokes of the "ctrl" key using controlsend of user32.dll. Or I could be completely wrong...
  5. Here is the mousclickplus function. I think its what your looking for: 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 Func _MakeLong($LoWord,$HiWord) Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF)) EndFuncoÝ÷ Ø@ÈLw«zƧ{¦¦W¨~0¶¬z+ZºÚ"µÍBBÓ[ÝÙPÛXÚÔÊ ][ÝÓÝY ][ÝË ][ÝÜYÚ ][ÝË ][ÝÌL ][ÝË ][ÝÌÌJB That would send a right mouse click to note pad one time at 100,300.
  6. Well I tried the beta version...Control send does work with blank ID, but it still does not send the ctrl key :\. For example: ControlSend("Notepad", "", "", "{LCTRL}") ControlSend("Notepad", "", "", "{LCTRL 2}") ControlSend("Notepad", "", "", "{CONTROL}") None of those do anything. I am assuming now that there is something different that you must do in order for the control key to work. Thanks for the help thusfar.
  7. Trust me I would be using control send if I could. The window is a game so no controls to be found. And I am trying to send the keys to a minimized window in sort of background mode style as to not interrupt whatever the user is currently doing. They virtual key value is correct so I'm not sure whats wrong with my function. Maybe if you could expand on the "... it's a bit more...", that would be helpful.
  8. Hey everyone. I have been playing around with the windows API in order to try and get auto it to send clicks/keystrokes to a hidden window. I have managed to send mouse clicks to the hidden window, and also I have managed to send alpha numeric characters to the window. However, I am having some trouble with sending some different keys. I am trying to send the control key twice, followed by a letter. Here is my code: Func sendCommand() $key = "0x" & _StringToHex("o") _minSend("Notepad", "0x0100", "0x11") _minSend("Notepad", "0x0100", "0x11") _minSend("Notepad", "0x0102", $key) endfunc Func _minSend($window, $state, $keys) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle($window), _ "int", $state, _ "int", $key, _ "long", 1) EndFunc When I run that the control keys are not sent, but strangely the "g" key is. Maybe there is some special thing that I have to do to get a control key to send, that I don't know about? I have managed to send the enter button, so there is apparently no problem in sending keys that are not alphanumeric to the window. I have tried lots of stuff, like sending control down, up, down, up and control down, down, up, up and none of those worked. Help please karamazov
  9. Sorry for the double post. I managed to get MouseClickPlus Working somewhat. If the focus is not on the window then my script works. However, if the wow window is minimized and i try to run it, it doesn't work. Anyone have any ideas? Thanks
  10. Anyone have any other suggestions please?
  11. Yep I'm pretty sure I'm using it correctly. I read through the topic and noticed that other people were having problems with it too. Any more suggestions?
  12. Hello, I've been fooling around with autoit for a while. Right now I'm trying to make an auto clicker like program for world of warcraft. I am having trouble getting it to click on the minimized window. I can't find a control ID so controlclick doesn't work. I have tried some custom functions (_MouseClickPlus) and those did not work either. I was wondering if anyone has had any success trying to do what I am doing, or if anyone has any suggestions as to what I can do to get this working . Regards, Karamazov
×
×
  • Create New...