Jump to content
Sign in to follow this  
FireSword

I had a problem

Recommended Posts

FireSword

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

Share this post


Link to post
Share on other sites
Jos

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Qousio

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

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  

×