Jump to content

Sendkey prob


 Share

Recommended Posts

Hi there i made a bot for game like this its simple.couple mouse click and keysend.

HotKeySet ("{F5}", "clicker")

HotKeySet ("{F8}", "terminate")

sleep (100000)

Func clicker()

While 1

sleep(1000)

send("{2}")

sleep(1000)

MouseClick("right",980 ,45, 1,1 )

sleep(1000)

MouseClick("right",980 ,75, 1,1 )

*********

Problem is i cant send any key.its not about game protection that because there are diffrent bots created by autoit.

this game working on window.when i click out of game window send key start but when click on game window key send wont work.

any clue pealse?

sory for my english.

Link to comment
Share on other sites

Hi, have you tried _IsPressed ?

#Include <Misc.au3>

While 1
Sleep(250)
if _IsPressed("7A") Then; user have pressed f11 key
send("{2}")
    sleep(1000)
    MouseClick("right",980 ,45, 1,1)
    sleep(1000)
    MouseClick("right",980 ,75, 1, 1)
Endif

If _IsPressed("7B") then; user pressed f12 key
Exit
Endif
Wend
Link to comment
Share on other sites

It sounds to me like game protection. Maybe the different bots have found a way around this.

thanks for reply as i said There is another bots working on game created by autoit.

Hi, have you tried _IsPressed ?

#Include <Misc.au3>

While 1
Sleep(250)
if _IsPressed("7A") Then; user have pressed f11 key
send("{2}")
    sleep(1000)
    MouseClick("right",980 ,45, 1,1)
    sleep(1000)
    MouseClick("right",980 ,75, 1, 1)
Endif

If _IsPressed("7B") then; user pressed f12 key
Exit
Endif
Wend
actually i dont know whats mean _IsPressed command im searching right know.

Thanks for answer

Link to comment
Share on other sites

Hi, have you tried _IsPressed ?

#Include <Misc.au3>

While 1
Sleep(250)
if _IsPressed("7A") Then; user have pressed f11 key
send("{2}")
    sleep(1000)
    MouseClick("right",980 ,45, 1,1)
    sleep(1000)
    MouseClick("right",980 ,75, 1, 1)
Endif

If _IsPressed("7B") then; user pressed f12 key
Exit
Endif
Wend
same nothing happend.

must be a way.

Link to comment
Share on other sites

same nothing happend.

must be a way.

Hi there,

Try to activate the game window including WinActivate in your script:

WinActivate ("game")

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

Still wont work :/

And with SendKeepActive?

By the way... care to reveal the game's name?

Cheers

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

And with SendKeepActive?

By the way... care to reveal the game's name?

Cheers

i just start learning autoit so i didnt use sendkeepactive lemme check what is it. Game name MUOnline.I checked other topics about muonline but didnt usefull for me :/

i have one bot working well created by AutoIt v3 Script : 3, 2, 4, 9 but i need something new just i need able to send key.

I appreciative for replys.

Sory for my bad English.

Link to comment
Share on other sites

WinActivate ("MU")

SendKeepActive("MU")

HotKeySet ("{F5}", "clicker")

HotKeySet ("{F8}", "terminate")

sleep (100000)

Func clicker()

While 1

sleep(1000)

send("{2}")

sleep(1000)

MouseClick("right",980 ,45, 1,1 )

*************

i tryed like this not working.

Link to comment
Share on other sites

i just start learning autoit so i didnt use sendkeepactive lemme check what is it. Game name MUOnline.I checked other topics about muonline but didnt usefull for me :/

i have one bot working well created by AutoIt v3 Script : 3, 2, 4, 9 but i need something new just i need able to send key.

I appreciative for replys.

Sory for my bad English.

As far as i checked, this is a World of Warcraft alike...

Can you toggle the game into window mode rather than full mode and try the script?

Cheers.

Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Link to comment
Share on other sites

As far as i checked, this is a World of Warcraft alike...

Can you toggle the game into window mode rather than full mode and try the script?

Cheers.

Same my friend full screen not working

Mouse movement and mouse click working well but i didnt send any key char i tryd send ascii too but nothing new its wont work.

absolutely there is a way send key but i cant able to handle it.

Than you for your time.

Link to comment
Share on other sites

Try this code, it kinda looks like your scripts not staying up.

HotKeySet("{F5}", "clicker")
HotKeySet("{F8}", "terminate")

While 1
    Sleep(1000)
WEnd

Func clicker()
    While 1
        Sleep(1000)
        Send("{2}")
        Sleep(1000)
        MouseClick("right", 980, 45, 1, 1)
        Sleep(1000)
        MouseClick("right", 980, 75, 1, 1)
    WEnd
EndFunc  ;==>clicker

Func terminate()
    Exit
EndFunc ()

Your problem was hotkeyset ( and hotkeyset( get the idea?

Edited by IKilledBambi
Link to comment
Share on other sites

Try this code, it kinda looks like your scripts not staying up.

HotKeySet("{F5}", "clicker")
HotKeySet("{F8}", "terminate")

While 1
    Sleep(1000)
WEnd

Func clicker()
    While 1
        Sleep(1000)
        Send("{2}")
        Sleep(1000)
        MouseClick("right", 980, 45, 1, 1)
        Sleep(1000)
        MouseClick("right", 980, 75, 1, 1)
    WEnd
EndFunc;==>clicker

Func terminate()
    Exit
EndFunc ()

Your problem was hotkeyset ( and hotkeyset( get the idea?

Sory i didnt see whats diffrent. Edited by metjumper
Link to comment
Share on other sites

Could you tell me the name of the game ^^,?

And you sould take a look at 'ControlSend'

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

You put a space before ( so you did hotkeyset ( instead you should have done hotkeyset( Get the idea now? set ( set( a better example

hotkeyset (
hotkeyset(

see the difference now? the bottom 1 is the correct the top is not.

But bro already hotkeyset working when i click start bot working alos when i want i can terminate it. my problem is sendkey...

anyway i tryed like u advise me same things.keysend notworking.

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