Jump to content

Simple noob question.


Dendeii
 Share

Recommended Posts

Hundred thousand searches later i just couldn't find something to help me out here. I am making an autoing bot for a small 2d game. Anyways how do i make it Send("{0}") Sleeping it for 8000 but NOT sleeping the rest of the script. Please help. Thank you in advance!

Link to comment
Share on other sites

Anyways how do i make it Send("{0}") Sleeping it for 8000 but NOT sleeping the rest of the script.

When u use sleep.. the entire script pauses..

I am not sure i understand what u mean.. pls clarify

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
Link to comment
Share on other sites

Do you mean you want it to send "{0}" for 8 seconds?

Sleep, as Manjish said, will pause the script from executing anything until the Sleep() has expired.

However, there are ways of making it do something, such as send "{0}" for a specific amount of time. But I, as much as everyone else here, have/has no idea what your trying to do =/.

Link to comment
Share on other sites

$tTimer = TimerInit()
Send ("{0 DOWN}")
While 1
    If TimerDiff ($tTimer) >=8000 Then
        Send ("{0 UP}")
    EndIf
    
    ;//Add other stuff in here
EndIfoÝ÷ Ûú®¢×+0¢é]vaj×è¯*.Â+ajjjëh×6$tTimer = TimerInit()
While 1
    If TimerDiff ($tTimer) >=8000 Then
        Send ("{0}")
                $tTimer = TimerInit()
    EndIf
    
    ;//Add other stuff in here
EndIf

or yes, AdLibEnable() would work...probably more accurately.

Edited by ReaImDown
[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
Link to comment
Share on other sites

Perfect just what i needed but, i need it do over and over every 8 seconds.

read my post

edit

bah nvm...if thats EXACTLY what u need...here I doubt it is though

$tTimer = TimerInit()
Send ("{0 DOWN}")
While 1
    If TimerDiff ($tTimer) >=8000 Then
        Send ("{0 UP}")
        $tTimer = TimerInit()
        Send ("{0 DOWN}")
    EndIf
   
  ;//Add other stuff in here
EndIf

if not, use this

$tTimer = TimerInit()
While 1
    If TimerDiff ($tTimer) >=8000 Then
        Send ("{0}")
        $tTimer = TimerInit()
    EndIf
   
  ;//Add other stuff in here
EndIf

EDIT!

Even Better...

AdLibEnable(Send0, 8000)
While 1
   
   ;//Add other stuff in here
EndIf
func Send0()
        Send ("{0}")
endfunc
Edited by ReaImDown
[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
Link to comment
Share on other sites

read my post

edit

bah nvm...if thats EXACTLY what u need...here I doubt it is though

$tTimer = TimerInit()
Send ("{0 DOWN}")
While 1
    If TimerDiff ($tTimer) >=8000 Then
        Send ("{0 UP}")
        $tTimer = TimerInit()
        Send ("{0 DOWN}")
    EndIf
   
 ;//Add other stuff in here
EndIf

if not, use this

$tTimer = TimerInit()
While 1
    If TimerDiff ($tTimer) >=8000 Then
        Send ("{0}")
        $tTimer = TimerInit()
    EndIf
   
 ;//Add other stuff in here
EndIf

EDIT!

Even Better...

AdLibEnable(Send0, 8000)
While 1
   
  ;//Add other stuff in here
EndIf
func Send0()
        Send ("{0}")
endfunc
Woo the first one worth beautifully, Thank you very much. Quick question why do you put the DOWN in Send("{0 DOWN}").
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...