Jump to content

Simulate Key supmission with programm Focus


KriX
 Share

Recommended Posts

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

Link to comment
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]

Link to comment
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.

Link to comment
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?
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...