Jump to content

[Doubt]Loop!


Recommended Posts

  • Developers

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 ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Have you looked ar HotKeySet() as suggested?

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

  • Developers

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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