Jump to content
Sign in to follow this  
Varsity

Need some help!

Recommended Posts

Varsity

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.

Share this post


Link to post
Share on other sites
smartee

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

Share this post


Link to post
Share on other sites
Varsity

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

Share this post


Link to post
Share on other sites
smartee

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 ;)

Share this post


Link to post
Share on other sites
somdcomputerguy

In the Helpfile there is example code for all the native AutoIt functions.


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

Share this post


Link to post
Share on other sites
smartee

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

Share this post


Link to post
Share on other sites
Varsity

I'm still not finding anything :\ ..

Does anyone have an example script I can base my code off of? <3

Share this post


Link to post
Share on other sites
smartee

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 :)

Share this post


Link to post
Share on other sites
Varsity

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.

Share this post


Link to post
Share on other sites
Varsity

Great, I'll try it out in a few! Thanks for your help!

Share this post


Link to post
Share on other sites
somdcomputerguy

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

Share this post


Link to post
Share on other sites
Varsity

Excellent! It works flawlessly!

Thanks a lot smartee for all of your support!

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  

×