Sign in to follow this  
Followers 0
Splitz

Easy Question

8 posts in this topic

#include <Misc.au3>

HotKeySet("6", "Hey")

Func Hey()

If _IsPressed("36") Then

Send("4")

Send("6")

EndIf

EndFunc

when ever i press 6, it ONLY sends 4, i want the script to send 4 and then 6 when ever i press 6.

so when i press 6 the test printed in a window would be: 46

Share this post


Link to post
Share on other sites



#include <Misc.au3>

HotKeySet("6", "Hey")

Func Hey()

If _IsPressed("36") Then

Send("4")

Send("6")

EndIf

EndFunc

when ever i press 6, it ONLY sends 4, i want the script to send 4 and then 6 when ever i press 6.

so when i press 6 the test printed in a window would be: 46

Send("46")???

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Share this post


Link to post
Share on other sites

Just tryed that, it only sends 4

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

im sorry, can't quite understand what your asking,

you want the script to send the number "4" AND "6" whenever you press 6, correct?

Then you need to disable the hotkey so it doesn't call itself again, because if you make it send 46 when you press 6, it will keep pressing 6, thus calling itself again

so, to disable your hotkey, Hotkeyset("6","")

HotKeySet("6", "Hey")

While 1

Sleep(1000

Wend

Func Hey()

Hotkeyset("6","")

Send("4")

Send("6")

HotKeySet("6", "Hey")

EndFunc

Edited by VindicatorOmega

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

its still not working, its just spamming 4 non stop now

Share this post


Link to post
Share on other sites

Shouldn't the HotKeySet("6", "") be: HotKeySet("6")?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Shouldn't the HotKeySet("6", "") be: HotKeySet("6")?

yes, yes it should, I overlooked that

and there should be an ending parentheses after Sleep(1000

sleep(1000)

Edited by VindicatorOmega

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

ok thanks alot guys, i got it working now

Share this post


Link to post
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
Sign in to follow this  
Followers 0