Jump to content

I had a problem


Recommended Posts

So I got me a lot here and read through it myself sometimes tried (with AutoIt3) that is the result:

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.0.0
 Author:         FireSword

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

Func start (1)
While 1
send ("{space}") 
sleep(50) 
send ("{2}") 
sleep(64000) 
send ("{ö}") 
sleep(50) 
WEnd
EndFunc

But it does not work so right

I wanted to achieve this:

every 50-millisecond "space" is gedückt

-every 64 seconds "2" is pressed

and at the same time every 50 milliseconds "ö" is pressed

Can one explain to me what I've done wrong and how I can improve it so that it works?

mfg Fire Sword

Im Anhang findet ihr mein Programm

FireBot___0.1___Beta.au3

Link to comment
Share on other sites

  • Developers

You are not starting the Start() Function.

The loop will have to be different because the Sleep(60000) will pause your loop for 1 minute.

There are enough examples to find out how it could be done.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Try this...

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.0.0
Author:      FireSword

Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------
start()
Func start()
Local $Counter = 0
While 1
send ("{space}")  
sleep(1)
send ("{ö}")
sleep(50)
$Counter = $Counter+1
If $Counter=1280 Then
send ("{2}")
$Counter = 0
Endif
WEnd
EndFunc
Edited by Qousio
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...