SuperXero Posted March 29, 2010 Share Posted March 29, 2010 Hi there. I used to use an AutoIt script in Windows Vista, but now that I've upgraded to Windows 7, I can't seem to get the script nor the .exe of the script to execute. Everytime I run either, nothing happens. No icon in the taskbar (and yes, I've checked to see if they're there, but Windows says it will show the icons when they are active and that they are currently not active). And so, here's my script. If someone can tell me why this isn't executing in Windows 7, that would be very useful (yes, I have tried running as an administrator, and changing the compatibility of the .exe to Windows Vista/XP). Script: HotKeySet("{F3}", "CRN") HotKeySet("{F4}", "Exitt") Func CRN() WinActive() Send("13613{TAB}11479{TAB}10662{TAB}") EndFunc Func Exitt() Exit 0 EndFunc Link to comment Share on other sites More sharing options...
JohnOne Posted March 29, 2010 Share Posted March 29, 2010 What do you expect it to do ? As far as I can see that script will run and be finished in less than 50ms or something. unless you are pretty swift with your hotkey. you need some sort of loop to keep it alive to send your whatever to wherever (you dont specify). AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
SuperXero Posted March 29, 2010 Author Share Posted March 29, 2010 Ohhh thank you. I'm glad it's a problem with my code. How would I go about fixing this? Basically, what I would like is that so whenever I push the F3 key, those numbers and tabs are put in. I didn't realize the script would close on it's own though. What should I change? Thanks in advance, SuperXero Link to comment Share on other sites More sharing options...
JohnOne Posted March 29, 2010 Share Posted March 29, 2010 (edited) Add this to the bottom of your script While 1 Sleep(10) WEnd I suspect you are not using the same script you were on vista as what you posted wont work on vista, xp or 7. And you will need to refresh your memory in the helpfile regarding both of the functions you are using WinActive() - I also suspect you are really after WinActivate() Send() Edited March 29, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
SuperXero Posted March 29, 2010 Author Share Posted March 29, 2010 Actually, I was trying to use a loop using WinWaitActivate. For instance, using WinWaitActivate("kehjaoiwefajw") would wait until the specified window appeared, and since it would never, I had infinite time to use those hotkeys. However, your solution is much more refined and efficient, and that's exactly what I was going for. Thank you very much! SuperXero 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