Jump to content

_SendMessage and ScreenCapture.au3


NS5
 Share

Recommended Posts

Hi I'm having problems whenever I include ScreenCapture.au3 on my code, AutoIT is saying there is an error on _SendMessage "SendMessage() already defined." what is the problem on it? Anyone wanna help me out to figure this out? Thanks looking forward on everyones help.

Link to comment
Share on other sites

I'm using OCR so I needed the ScreenCapture.au3 include, but it has problem after I added this #include file.

Func _SendMessage($X, $Y, $MSG)

If $MSG <> $LASTMESSAGE Then

$MSG = StringReplace($MSG, "@clickNCall", $V)

ClipPut($MSG)

MouseClick("left", $X, $Y, 1, 1)

Send("^v{enter}")

$LASTMESSAGE = $MSG

EndIf

EndFunc

Link to comment
Share on other sites

I'm using OCR so I needed the ScreenCapture.au3 include, but it has problem after I added this #include file.

Func _SendMessage($X, $Y, $MSG)

If $MSG <> $LASTMESSAGE Then

$MSG = StringReplace($MSG, "@clickNCall", $V)

ClipPut($MSG)

MouseClick("left", $X, $Y, 1, 1)

Send("^v{enter}")

$LASTMESSAGE = $MSG

EndIf

EndFunc

The function _SendMessage() is already a defined function in AutoIt. Removing the preceding underscore in your function will give your function a different non-conflicting name.

See if that makes a difference.

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