Sign in to follow this  
Followers 0
Skizmata

HotKeySet() Issue

6 posts in this topic

$Toggle = True
HotKeySet("e","example")

Func example()
    If $Toggle Then Beep(500,10)
    $Toggle = Not $Toggle
EndFunc

While 1
    Sleep(50)
WEnd

How would I change the example above to send the letter e when the beep does not fire.

This is a simple example to show a problem I'm having in a project I'm working on to help me remap keys in a game. I would like the mapped keys to only be changed when in the game however I'm having a hard time. If the question/problem isn't clear let me know so I can restate it my English is lacking sometimes.

*Note* I understand I could make it send("e") when it doesn't beep however this causes a looping problem.

Thanks,

-Skizmata


AutoIt changed my life.

Share this post


Link to post
Share on other sites



not sure how to detect if it didn't beep, but to send e just do this

func example()
   hotkeyset("e")
   send("e")
   hotkeyset("e", "example")
endfunc

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I'm sorry as I said my English is sometimes hard to understand. It could be more simply put this way.

Show me an example of code that sets a hotkey of e and sends the letter e without causing a hellish loop.

I need to be able to send the actual keys some of the time and send something else the rest of the time.

Thanks,

Edited by Skizmata

AutoIt changed my life.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Check this thread for example

#367271

Edited by Siao

"be smart, drink your wine"

Share this post


Link to post
Share on other sites

Thanks guys! Question answered very well. I apologize for not being able to find it in other threads. To get the right answer you need to know how to ask the right question I suppose.


AutoIt changed my life.

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