Sign in to follow this  
Followers 0
KriX

Simulate Key supmission with programm Focus

5 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Welcome 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]

Share this post


Link to post
Share on other sites

ok but how can I send these key submissions in intervals ?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

ok now ive done this >

HotKeySet("{ESC}","_Exit")

$Minuten = 5 * 60 * 1000

AdlibEnable("_SendeDaten",$Minuten)

;~ _SendeDaten()

While 1

Sleep(250)

WEnd

Func _SendeDaten()

Send("{a down}")

Send("{a up}")

send("{w down}")

sleep(10)

Send("{w up}")

controlSend("Program Manager","","SysListView321","^a")

EndFunc

Func _Exit

AdlibDisable( )

Exit

Exit

But i get an error (Missing separator character after keyword) any1 know what Ive done wrong? and do u think it works?

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