Jump to content

Recommended Posts

I need some help here. I have the following code:

Sleep( 300 )
Sleep( 400 )

I need it to repeat itself, but instead of Send("1"), it will increase to 2, then increase to 3, 4, 5 all the way up to 1000. Is this possible? I haven't been able to find anything, and I'm kind of new to this subject.
Please give examples.
Thank you.
Link to post
Share on other sites
Global $first

$first = 1

   Sleep( 200 )
   Send("Number", $first)
   Sleep( 200 )
   Sleep( 200 )
   Sleep( 300 )
Until $first = 3

Whats wrong here?
I want it to do "   Send("Number", $first)" until the number that it sends, is 3.
But its just typing "Number" and not the actual number.

Link to post
Share on other sites

Firstly, you are not incrementing $first so it will loop forever. 
You either need to do this in a For loop or add a line to increment 

Secondly, you are not using the Send function quite correctly;
Namely if you want to send the value of $first after the string "Number", you need to concatenate it to the string by using the the ampersand (&) character.  Using a comma as you are is sending $first as the second parameter to the Send function (see helpfile).
Also keep in mind you'll probably want to add a space at the end of the word "Number".


Check out the different Loop functions in the help file and see if the For loop is the best fit for your needs.

Let us know where you get stuck.

Edited by spudw2k
Link to post
Share on other sites

Yes. Is it working the way you want?

Whoops, didn't notice you're not the OP, no profile pic. :>

Edited by careca

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples


Link to post
Share on other sites
  • Developers

Which part in that code needs explanation after you tried reading/interpreting and checking the helpfile?


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 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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...