Sign in to follow this  
Followers 0
rehcarlos

[Doubt]Loop!

11 posts in this topic

I'm new in AutoIT program...

Err...I want a Loop code that stays in loop until i enter the keyboard ENTER.

Can i do it?

Sorry my bad english...

Bye!

Share this post


Link to post
Share on other sites



I'm new in AutoIT program...

Err...I want a Loop code that stays in loop until i enter the keyboard ENTER.

Can i do it?

Sure... what did you try and isn't working ?

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

Share this post


Link to post
Share on other sites

Thats the problem xD I really don't know where to start.

So...I'm asking here...there are a lot of Loop codes...

Share this post


Link to post
Share on other sites

Thats the problem xD I really don't know where to start.

So...I'm asking here...there are a lot of Loop codes...

A good place to start is:

1. Open the helpfile and look at HotKeySet().

2. Search the forum because this has been asked many times.

Enjoy,

Jos


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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Hi Jos, I'm trying here, but isn't working, he doesn't begin the Loop.

I'm doing:

Do
          My Script here
Until Send("{ENTER}")
Edited by rehcarlos

Share this post


Link to post
Share on other sites

Have you looked ar HotKeySet() as suggested?

Send("{ENTER}") will send an Enter and return a 1 thus the loop ends.


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

Share this post


Link to post
Share on other sites

Yeah... with HotKeySet he started the Loop, but doesn't stops!

Do

MyScript

Until HotKeySet("{ENTER}")

Share this post


Link to post
Share on other sites

Yeah... with HotKeySet he started the Loop, but doesn't stops!

Do

MyScript

Until HotKeySet("{ENTER}")

Maybe you should start here... http://www.autoitscript.com/forum/index.php?showtopic=21048

Once you get this down, then you'll understand a lot more, and you will write the code much faster with some type of understanding of what is going on.


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.

Share this post


Link to post
Share on other sites

Uhmn....but can't you help me only in this problem?

Looks like i'm doing allright.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Look up the parameters for HotKeySet and how it works...

At the beginning of your script you should have set set your hot key (enter) and the function to call when the key is pressed,

HotKeySet("{ENTER}","MyFunction")

;Script

Func MyFunction() ;< here your telling it what to do when this function is called

;Actions here

EndFunc ; stop

It's really hard to help you without giving you the whole code, so I left the loop part for you to do

EDIT: I do suggest you do the 1-2-3 autoit thing above ^ thats how I started... though I never finished it, lol... it stopped working for me XD

Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

Uhmn....but can't you help me only in this problem?

Looks like i'm doing allright.

Don't try to run before you can walk.

Giving you some working code doesn'ty help you when the HotKEySet() example in the helpfile isn't clear for you.

Do as been suggested and learn the language first.

Jos


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

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  
Followers 0