asm Posted September 30, 2004 Share Posted September 30, 2004 I am using the HotKeySet() function to start, pause, and exit my script on certain keypresses.Although it works flawlessly for the most part, when I load up the app I wish to use it with, the script does not receive the keystrokes.A forum search has revealed that I am not the only one to have had this problem, but the suggested solutions I have seen on previous topics do not rectify this. If there is an alternative function or a setting I can tweak to rectify the issue, please let me know.Regards Link to comment Share on other sites More sharing options...
asm Posted October 2, 2004 Author Share Posted October 2, 2004 Any possible workarounds or theories that might solve the problem would be appreciated. Regards Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted October 2, 2004 Share Posted October 2, 2004 Actually, I literally just had this problem today. I am making a bot for the game Morrowind, but for some reason hotkeys do not work... I tried every possible way of doing it, but for some reason the program won't allow hotkeys. That might be your problem also, best of luck with your problem. Link to comment Share on other sites More sharing options...
Matt @ MPCS Posted October 2, 2004 Share Posted October 2, 2004 I am using the HotKeySet() function to start, pause, and exit my script on certain keypresses.Although it works flawlessly for the most part, when I load up the app I wish to use it with, the script does not receive the keystrokes.A forum search has revealed that I am not the only one to have had this problem, but the suggested solutions I have seen on previous topics do not rectify this. If there is an alternative function or a setting I can tweak to rectify the issue, please let me know.Regards<{POST_SNAPBACK}>Do you run this application using RunWait()? If so then the script doesn't recieve any keystrokes until the script continues. This is a problem that I have not yet found a solution for. You may try just running the application using the run command instead of run wait.Hope this helps!*** Matt @ MPCS Link to comment Share on other sites More sharing options...
KnowledgeSponge Posted October 2, 2004 Share Posted October 2, 2004 In this situation, when you cannot use hotkeys within a program, I would suggest trying to key your function off of images/text that occur when you want the function to run. So if you think you could apply this, take a look at PixelSearch and PixelGetColor. Link to comment Share on other sites More sharing options...
nobby Posted October 2, 2004 Share Posted October 2, 2004 You may also want to keep in mind that some programs, games in particular, re-map your keyboard. CheersNobby Link to comment Share on other sites More sharing options...
asm Posted October 2, 2004 Author Share Posted October 2, 2004 Do you run this application using RunWait()? If so then the script doesn't recieve any keystrokes until the script continues. This is a problem that I have not yet found a solution for. You may try just running the application using the run command instead of run wait.Hope this helps!*** Matt @ MPCS<{POST_SNAPBACK}>Thanks for the suggestion, but I do not use RunWait()In this situation, when you cannot use hotkeys within a program, I would suggest trying to key your function off of images/text that occur when you want the function to run. So if you think you could apply this, take a look at PixelSearch and PixelGetColor.<{POST_SNAPBACK}>I considered that, but the problem is both the text and text window are semitransparent. To make it even worse, the transparency of the text window varies like a gradient...You may also want to keep in mind that some programs, games in particular, re-map your keyboard.<{POST_SNAPBACK}>Could you elaborate, please?I have a hex editor that can open up the memory and display it for any given process, though I'm not sure how it does this....If I can find the location of what I need in there, however, is there perhaps a way/function to pull bytes/words/dwords/etc from a particular address in AutoIt?Thanks everyone. Link to comment Share on other sites More sharing options...
scriptkitty Posted October 2, 2004 Share Posted October 2, 2004 (edited) Some programs (games in perticular) do capture the keyboard and thus don't work with hotkeys well. if the program logs stuff into a text file, you can have autoit read the file and fire off a macro when it reads a certain bit of text. "Bubba gump the hippogriffin says what a great day to party" Also you might try different keys. My Printscreen button, scroll lock and pause break keys are not captured in one game of mine that all the others are, so I use variations of those. (shift+Pause, Alt+pause, Ctrl+pause, Ctrl+Alt+Pause, and of course Pause, etc.) Oh, and I also did some work with pixel colors as well, but it is just for starting up the game. That gets really tricky if full screen. Edited October 2, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
asm Posted October 3, 2004 Author Share Posted October 3, 2004 I tried the combinations you suggested, and the program still blocks them :/ Thanks anyways, though. Once again, is there anyway to read the memory from AutoIt, with a plugin or some such if not directly? The program does have an echo function, but due to complications I've mentioned before, I cannot just read pixels. But, if I could access the buffer directly... Regards Link to comment Share on other sites More sharing options...
sugi Posted October 4, 2004 Share Posted October 4, 2004 Once again, is there anyway to read the memory from AutoIt, with a plugin or some such if not directly?It's not possible and I doubt AutoIt will ever support this as this is very likely to get AutoIt listed as a virus/trojan/worm as it has already happened before. Link to comment Share on other sites More sharing options...
asm Posted October 29, 2004 Author Share Posted October 29, 2004 I was a away for a few weeks, so I apologize for the long delay in replying. Anyways, down to business... I've heard, though not confirmed, that there is a way to read keyboard input in C/C++ by dumping the entire keyboard state into an array of boolean values. Is there, perhaps, a way to do this in AutoIt, so I could see the status of every key regardless of how windows dispatches messages containing key info? Also, what about numlock, capslock, and scrolllock? Each of these toggle on and off, instead of while the key is pressed, so is there a way to read if each is on or off? Regards Link to comment Share on other sites More sharing options...
Guest Py7|-|[]/\/ Posted October 29, 2004 Share Posted October 29, 2004 Actually, I was looking at a bot for Maple Story written in AutoIt... What the coder did was he tested out all the different send key buttons and eventually figured out which one the game will allow... In the end, he had left and right arrows as z and x or something like that. I think the game designers messed that up to throw us off, but it didn't work! Link to comment Share on other sites More sharing options...
asm Posted October 29, 2004 Author Share Posted October 29, 2004 Thanks, but thus far I haven't discovered any keys which AutoIt will detect while it is running, num/caps/scroll lock included. However, if there is a way to simply determine if each is on or off, instead of intercepting the keystroke, I think that would work quite well. Anyone know if there is a way to do that, or an alternative? Link to comment Share on other sites More sharing options...
ezzetabi Posted October 29, 2004 Share Posted October 29, 2004 (edited) Did you try the DLLCall("user32","int","GetAsyncKeyState","int",$key)idea?ASAIK the user32 call should be much harder to stops than Autoit way.Check this topic for having the original Larry script that show how to quite well. Edited October 29, 2004 by ezzetabi Link to comment Share on other sites More sharing options...
asm Posted October 30, 2004 Author Share Posted October 30, 2004 That works, thank you very very much! My script is now complete Now I wonder if you could use that DLLCall() to open up the memory.... Link to comment Share on other sites More sharing options...
ezzetabi Posted October 30, 2004 Share Posted October 30, 2004 1. You are welcome. 2. mmmn... if you can program a .dll that do what you need and that uses calls that Autoit can use you should have no problems. 3. if you create that .dll of point 2. share it with the whole community. Link to comment Share on other sites More sharing options...
Its_me_again Posted November 16, 2005 Share Posted November 16, 2005 Any more information about a possible dll for memory reading? Link to comment Share on other sites More sharing options...
LxP Posted November 17, 2005 Share Posted November 17, 2005 Welcome to the forums! You're in luck -- do a forum search for 'memread'. Link to comment Share on other sites More sharing options...
Its_me_again Posted November 17, 2005 Share Posted November 17, 2005 Thanks, and hello Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now