Jump to content

From AHK to AU3, need help by easy code :) - (Locked)


Recommended Posts

Hi guys, I have a easy code of AHK and want convert it to Autoit.

It will get Triggered when my Capslock is on and i hold and press Space.
When i hold space while Capslock is on it will use an A click and some Rightclicks.
AHK Code:

~space::
GetKeyState, capslockstate, Capslock, T
If capslockstate=D
{
send {a down}
sleep 10
send {a up}
sleep 560
click right
sleep 255
click right
sleep 245
click right
sleep 247

return
}


I want to add also Checkboxes with other Sleepvaules like for this its 560/255/245/247
for the next checkbox it should be something like 450/174/172/177
and so on.

Now my Quesiton is simple, how to set up an code like that. if anyone have 5min time for that i would looking forward to it. 
Thanks.

Link to comment
Share on other sites

  • Moderators

@Diyarbekir welcome to the forum. First and foremost, this forum is dedicated to helping people improve their own code - i.e. it is not a place where you put in a request and someone barfs up the code for you. What have you tried on your own? Secondly, what exactly are you trying to accomplish with your code? Sends and clicks are inherently unreliable; there is almost surely a better way of accomplishing what you're after.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Hello @JLogan3o13, thanks.

Yea i tried a bit of it. Atm my code looks like this.

 

HotKeySet( "{SPACE}" , "start" )
While 1
    sleep (100)
    WEnd
func start()
    sleep (100)
WinActivate ( "League of Legends (TM) Client")
sleep ( 50)
send( "{a down}")
sleep( 40)
send( "{a up}")
sleep (560)
MouseClick ( "right")
sleep (247)
MouseClick ( "right")
sleep (245)
MouseClick ( "right")
sleep (255)
WEnd
EndFunc

but it isnt working how i imagined it.

Its for an Game called league of legends.
It should just pressing reaptly A click where my mouse is atm and then 3times rightclick in the right amount of seconds/Ms.
It will attack and move away in this game. it should use this part :

 

sleep ( 50)
send( "{a down}")
sleep( 40)
send( "{a up}")
sleep (560)
MouseClick ( "right")
sleep (247)
MouseClick ( "right")
sleep (245)
MouseClick ( "right")
sleep (255)

in a loop until im not pressing spacebar anymore.

Thats all it should do atm and when i finished this i want to create an GUI with 5checkboxes. the function will be the same, the only difference would be that the numbers of sleeptime will change with every checkbox activated.

:)

Link to comment
Share on other sites

  • Developers

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...