Jump to content

Need some help!


Recommended Posts

Hey guys!

I'm new here and I was wondering if I can get some help with a script.

-----

So basically, what I'm trying to do, is have a script that can run multiple scripts at one time; but I only know how using the Sleep functions. What I'm trying to get at, is that if I have one script running, with a sleep command, no other script can run, until the first script's sleep has subsided. Here's what I have so far..

While 1
RunMe()
Sleep(250)
EnterText()

WEnd

Whereas 'RunMe()' consists of :

Start($dir)
Sleep(250000)

What I'm trying to do, is have Func 'EnterText()' run, even while 'RunMe's Sleep function is still active. That or if there is a more efficient form of delay that would support multiple running scripts; further guidance would be appreciated.

Thanks for your time! Sorry if my description was low quality; and I've searched the forums for like an hour, and still not found anything!

Cheers.

Link to comment
Share on other sites

Hi Varsity,

Welcome to the forums!! :D

We'll be delighted to help you :)

Look at the Timer functions & AdlibRegister(); search for them in the help-file, if you're still stuck post back with your modified attempts ;)

Good luck ;)

-smartee

Link to comment
Share on other sites

Hi Varsity,

Welcome to the forums!! :D

We'll be delighted to help you :)

Look at the Timer functions & AdlibRegister(); search for them in the help-file, if you're still stuck post back with your modified attempts ;)

Good luck :D

-smartee

Thanks smartee!

And I'm not THAT great with AutoIt, currently. Are those functions easy to use at all?

And I'll look em up now. ;)

Link to comment
Share on other sites

Don't worry, we all start somewhere but learning AutoIt is a breeze as I'm sure you noticed by now, I :) the help-file, its rich with helpful examples and structurally consistent.

They are quite simple, take a shot at them for yourself ;) I'll happily help you debug and whip up a few examples if you run into difficulty ;)

Link to comment
Share on other sites

What about this example from the help-file? ;)

AdlibRegister("MyAdlib")
;...
Exit

Func MyAdlib()
    ;... execution must be non blocking, avoid ...Wait(), MsgBox(), InputBox() functions
    If WinActive("Error") Then
        ;...
    EndIf
EndFunc

Maybe I can hatch up a more specific example if you explain a bit more what you're trying to do :)

Link to comment
Share on other sites

Thanks! Sorry, again; it's rather difficult to explain :S

I'm trying to have multiple scripts running with timers, however, I don't want the timers to interfere with eachother.

For example, let's say in terms of Send(), you could have

Send(A)
Sleep(1250)
Send(B)
Sleep(2500)

Except, I'm trying to figure out how to have it send A every 1.25 seconds, while B is sending ever 2.5 seconds; and A's Sleep function does not offset B's.

That's the best example I can whip up for ya, haha. Sorry.

Link to comment
Share on other sites

@somdcomputerguy: ;) I guess I'm not the only one who hearts the help-file ;)

I''ve been using AutoIt for 5 years or so now, and the Helpfile is my best friend! I wish my girl had such good documentation! That certainly would've made the last 13 years alot easier.. :)

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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...