Jump to content

Why does this error?


Koil
 Share

Recommended Posts

I want to send SPACE bar to my diablo window every 1.2 seconds but it errors!

AutoItSetOption("WinTitleMatchMode", 4)
$handle = WinGetHandle("Classname=DIAWIN", "Diablo II")

While 1

If @error Then
    MsgBox(4096, "Error", "Could not find the correct window")
Else
   ; Send some text directly to this window's edit control
    ControlSend("$Handle", "", "", "{Space}" )
    Sleep(1200)
EndIf

Wend

Fix it for a cookie..

Link to comment
Share on other sites

Whats the exact ERROR?

AlmarM

EDIT:

ControlSend("$Handle", "", "", "{Space}" )

ControlSend($Handle, "", "", "{SPACE}")

Does this help?

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

the window needs to be active for it to go thru or something?.. i want this to send to a window in the background while im surfing the net or something, possible?

Edited by Koil
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...