KriX Posted August 15, 2008 Posted August 15, 2008 Hey guys! I'm new to AutoIt and I've already tested some stuff. Now I want to make a script witch simulate key submission it should be able to change the focus - from program to program (e.g. Chat - Games...) And of course it should be able to send these keys in intervals (something around ~5min). Anyone got a idea how to write that? Thanks a lot KriX
Monamo Posted August 15, 2008 Posted August 15, 2008 Hey guys!I'm new to AutoIt and I've already tested some stuff.Now I want to make a script witch simulate key submission it should be able to change the focus - from program to program (e.g. Chat - Games...)And of course it should be able to send these keys in intervals (something around ~5min).Anyone got a idea how to write that?Thanks a lotKriXWelcome to the forums.The first step will be reading through some entries in the Help file.For simulating keys, take a look at:Send()ControlSend()and depending on your needs, ControlClick()For toggling focus on windows:WinActivate()Then, if you encounter any issues with your code that you need help troubleshooting, post a question (with the code you're having trouble with) and the forum members will assist as they can. - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]
KriX Posted August 15, 2008 Author Posted August 15, 2008 ok but how can I send these key submissions in intervals ?
Bert Posted August 15, 2008 Posted August 15, 2008 Use a while loop. You may be better off trying to learn how AutoIt works by taking AutoIt 1 2 3. You can find it as a sticky in the example scripts area. I think once you take the course, it will answer most of your questions, and save you loads of headaches. Again, welcome to the forum. The Vollatran project My blog: http://www.vollysinterestingshit.com/
KriX Posted August 15, 2008 Author Posted August 15, 2008 ok now ive done this >HotKeySet("{ESC}","_Exit")$Minuten = 5 * 60 * 1000AdlibEnable("_SendeDaten",$Minuten);~ _SendeDaten() While 1Sleep(250)WEndFunc _SendeDaten()Send("{a down}")Send("{a up}") send("{w down}") sleep(10) Send("{w up}")controlSend("Program Manager","","SysListView321","^a")EndFuncFunc _ExitAdlibDisable( ) ExitExitBut i get an error (Missing separator character after keyword) any1 know what Ive done wrong? and do u think it works?
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