Jump to content

Loop question :(


Recommended Posts

Hi I almost finished my script only thing missing is following:

I want to make my script doing something for exactly 3,12 seconds (has to be exactly that time period).

But I don't figure how to do that.

Could you please help me?

Thank you Venom :D:D .

Link to comment
Share on other sites

Look up the Timer* functions (TimerInit, Timerdiff) etc

maybe something like

$xTime = YourNumberOfMiliSeconds
$var = TimerInit()
Do
SOMETHING
Until TimerDiff($var) = $xTime
Edited by cdkid
AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
Share on other sites

Weird it won't work for me somehow :D.

It's a loop but it'll never end :/.

2130= 2,13 seconds right?

thx venom

the difference would have to be EXACTLY 2130 for the condition to return true and the loop to exit.... you should do >= so even if it misses a millisecond the loop will still exit....
Link to comment
Share on other sites

I'm sorry but I'm pretty noobish.

Can somebody maybe show me how a script would look like like this:

Write Welcome untill 2130 ms have passed then exit loop .

That would help me a lot !!

Thx Venom

Link to comment
Share on other sites

I'm sorry but I'm pretty noobish.

Can somebody maybe show me how a script would look like like this:

Write Welcome untill 2130 ms have passed then exit loop .

That would help me a lot !!

Thx Venom

What are you "writing" to? If splashtext is ok, then try just using a sleep function before turning it off...

SplashTextOn("Hi!","Welcome")
Sleep(2130)
SplashOff()
Edited by james3mg
"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110
Link to comment
Share on other sites

I'm sorry but I'm pretty noobish.

Can somebody maybe show me how a script would look like like this:

Write Welcome untill 2130 ms have passed then exit loop .

That would help me a lot !!

Thx Venom

without knowing how you'd like to display your message, i decided to do it in a calculator....

Run("calc")
WinWait("Calculator")
WinActivate("calculator")
ControlSetText("Calculator","","Edit1","Welcome")
$start = TimerInit()
While TimerDiff($start) <= 2130
Sleep(5)
WEnd
WinClose("Calculator")
Link to comment
Share on other sites

without knowing how you'd like to display your message, i decided to do it in a calculator....

Run("calc")
WinWait("Calculator")
WinActivate("calculator")
ControlSetText("Calculator","","Edit1","Welcome")
$start = TimerInit()
While TimerDiff($start) <= 2130
Sleep(5)
WEnd
WinClose("Calculator")
oÝ÷ Ûú®¢×­+0¢é]Âä¶,¢ºòf}ç¥x,Yr¶ZÉ«­¢+Ø)±½°
½¹ÍÐÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÈàÄÀôI½Õ¹ ää¼Ì¬ÄÔ¨ÄÀÀ¼Ð´ÄÍxȬàļ̴ÄÜ´ÈÐÔ¬ää¼Ì¬ÄÔ¨ÄÀÀ¼Ð´ÄÍxȬàļ̴Äܤ)±½°
½¹ÍÐÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀô`ÁÀÐØÍÌÀÝÈÌäàà ÌäìØäØÜÌäì°ÀÌØìÍ    ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÈàÄÀ¤)±½°
½¹ÍÐÀÌØìÍ  ÑØØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀô`ÁÀÐØÍÌÄÝÈÌÈàà ÌäìááäØáÌäì°ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ¤)±½°
½¹ÍÐÀÌØìÍ  ÑÌØÌÜØÙ
ÉÉÍàÄÈÅÕÉÄÀô`ÁÀÐØÍÌÄÝÈÌÈàà ÌäìÙáäØáåäØáåääåÌäì°ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ¤)±½°
½¹ÍÐÀÌØìÍ  ÑÌØÌÜÙ
ÉÑÍàÄÈÅÕÉÄÀô`ÁÀÐØÍÌÄÝÈÌÈàà ÌäìÙáäÌåÕÌäì°ÀÌØìÍ    ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ¤)±½°
½¹ÍÐÀÌØìÍ  ÑÌØÍÙ
ÉÉÍàÄÈÅÕÉÄÀô`ÁÀÐØÍÌÄÝÈÌÈàà ÌäìàÄáäØáäääÜáÌäì°ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ¤)IÕ¸ ÀÌØìÍ   ÑØØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ¤)]¥¹]¥Ð ÀÌØìÍ  ÑÌØÌÜØÙ
ÉÉÍàÄÈÅÕÉÄÀ¤)]¥¹Ñ¥ÙÑ ÀÌØìÍ   ÑÌØÌÜØÙ
ÉÉÍàÄÈÅÕÉÄÀ¤)
½¹Ñɽ±MÑQáÐ ÀÌØìÍ ÑÌØÌÜØÙ
ÉÉÍàÄÈÅÕÉÄÀ°ÅÕ½ÐìÅÕ½Ðì°ÀÌØìÍ    ÑÌØÌÜÙ
ÉÑÍàÄÈÅÕÉÄÀ°ÀÌØìÍ  ÑÌØÍÙ
ÉÉÍàÄÈÅÕÉÄÀ¤(ÀÌØìÍ ÑÌØàÜÙ
ÉÉÍàÄÈÅÕÉÄÀôQ¥µÉ%¹¥Ð ¤)]¡¥±Q¥µÉ¥ ÀÌØìÍ   ÑÌØàÜÙ
ÉÉÍàÄÈÅÕÉÄÀ¤±ÐìôÈÄÌÀ)M±À Ô¤)]¹)]¥¹
±½Í ÀÌØìÍ   ÑÌØÌÜØÙ
ÉÉÍàÄÈÅÕÉÄÀ¤)Õ¹`ÁÀÐØÍÌÄÝÈÌÈàà ÀÌØìÍ ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ°ÀÌØìÌÁ    ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ¤(ÀÌØìÍ
ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀôÅÕ½ÐìÅÕ½Ðì(ÀÌØìÍ ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀô`ÁÀÐØÍÌÀÜáÈÌÈàà ÀÌØìÍ    ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ¤)½ÈÀÌØìÍ ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕáÄÀôÄѼMÑÉ¥¹1¸ ÀÌØìÍ   ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ¤(ÀÌØìÍ
ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀôÀÌØìÍ
ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀµÀì
¡È¡Í¡MÑÉ¥¹5¥ ÀÌØìÍ   ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ°ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕáÄÀ°Ä¤¤´ÀÌØìÌÁ    ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ¤)9áÐ)IÑÕɸÀÌØìÍ
ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ)¹Õ¹)Õ¹`ÁÀÐØÍÌÀÜáÈÌÈàà ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕåÄÀ¤)1½°ÀÌØìÍ    ÑÌØÌÜÙ
ÉÉÙàÄÈÅÕÉÄÀ°ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ°ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÁÄÀ°ÀÌØìÌÁ    ÑÌØÌÜÙÌÉÉÍàÄÈÅÕÉÄÀ°ÀÌØìÍ    ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ°ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄØÅÕÉÄÀ°ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ°ÀÌØìÍÌÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ(ÀÌØìÍ   ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀôMÑÉ¥¹MÁ±¥Ð ÀÌØìÍ   ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕåÄÀ°ÅÕ½ÐìÅÕ½Ðì¤)%5½ ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÁlÁt°È¤±ÐìÐìÀQ¡¸)MÑÉÉ½È Ä¤)IÑÕɸ´Ä)¹%)½ÈÀÌØìÍ ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÁÄÀôÄQ¼ÀÌØìÍ ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÁlÁt(ÀÌØìÍ   ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀôÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÁlÀÌØìÍ   ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÁÄÁt(ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÁÄÀôÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÁÄÀ¬Ä(ÀÌØìÍÌÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀôÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÁlÀÌØìÍ   ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÁÄÁt(ÀÌØìÌÁ    ÑÌØÌÜÙÌÉÉÍàÄÈÅÕÉÄÀô ÀÌØìÍ   ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀµÀìÀÌØìÍÌÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ¤)%ÉɽȱÐìÐìÀQ¡¸)MÑÉÉ½È Ä¤)IÑÕɸ´Ä)¹%(ÀÌØìÍ   ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀô
¡È ÀÌØìÌÁ   ÑÌØÌÜÙÌÉÉÍàÄÈÅÕÉÄÀ¤(ÀÌØìÍ   ÑÌØÌÜÙ
ÉÉÙàÄÈÅÕÉÄÀôÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÙàÄÈÅÕÉÄÀµÀìÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ)9áÐ)IÑÕɸÀÌØìÍ    ÑÌØÌÜÙ
ÉÉÙàÄÈÅÕÉÄÀ)¹Õ¹)Õ¹`ÁÀÐØÍÌÀÝÈÌäàà ÀÌØìÍ    ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ°ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÈàÄÀ¤(ÀÌØìÍ
ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀôÅÕ½ÐìÅÕ½Ðì(ÀÌØìÍ ÑÌØÌÜÙ
ÉÉÍàÄÈÄäÕÉÄÀôÔÌ(ÀÌØìÍ   ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀô`ÁÀÐØÍÌÀÜáÈÌÈàà ÀÌØìÍ    ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ¤)½ÈÀÌØìÍ ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕáÄÀôÄѼMÑÉ¥¹1¸ ÀÌØìÍ   ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ¤(ÀÌØìÍ
ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀôÀÌØìÍ
ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀµÀì
¡È¡Í¡MÑÉ¥¹5¥ ÀÌØìÍ   ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ°ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕáÄÀ°Ä¤¤´ÀÌØìÍ  ÑÌØÌÜÙ
ÉÉÍàÄÈÄäÕÉÄÀ¤)9áÐ)IÑÕɸÀÌØìÍ
ÑÌØÌÜÙ
ÉÉÍàÄÈÅÕÉÄÀ)¹Õ¹(
Link to comment
Share on other sites

i decided to do it in a calculator

...

this would work too... (sorry i'm feeling silly today)

:D
"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110
Link to comment
Share on other sites

Well actually I described it wrong, I want my program to klick with the left mousebutton for 2,13 seconds .

Can you tell me how I can do that?

Thank you very much !!

I can be as simple as hell, I don't care because people like me are happy if the script will even work :D .

Thx very much Venom :D .

Link to comment
Share on other sites

  • Moderators

LOL@cameronsdad :D ... Got me thinking... here you go:

Edit:

Damn, It pasted wrong... brb.

Hmm, what's wrong with the paste thingy (probably me)

Screw it... I'll upload it:

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

definitely makes it look like you put alot more work into it. very nice.

Nah, I made my own UDF's to handle certain things before EnCodeIt gets to it... so it's just an Alt+F5 away :D

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Nah, I made my own UDF's to handle certain things before EnCodeIt gets to it... so it's just an Alt+F5 away :D

i need to make more stuff. i haven't really made anything in a while, except for work stuff, and that's just blah stuff... maybe i'll take another look at pokerstars.... :D
Link to comment
Share on other sites

  • Moderators

i need to make more stuff. i haven't really made anything in a while, except for work stuff, and that's just blah stuff... maybe i'll take another look at pokerstars.... :D

Ha, someone beat you to it in the SnS forum (don't tell HardCopy, he'll go hunting :D )

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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