AutoHotkey Community

It is currently May 27th, 2012, 4:11 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: January 30th, 2006, 5:02 pm 
Offline

Joined: January 30th, 2006, 4:53 pm
Posts: 1
Il start out by stating that i know next to nothing about programming ...
but id like a small script that sends Keyboard command 1 for 1000 times with 3 sec delay between, when the 1000 times are done it would move on to keyboard command 2 in the same manner and so on untill nr 6.

i have understud that it is possible to activate and deactivate with num lock.

so if there is any kind soul willing to whip up this "simple" script i would wery much apreciate it :)

Kind Regards Kim


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 30th, 2006, 8:12 pm 
Offline

Joined: January 30th, 2006, 6:53 pm
Posts: 8
Ill help you get started...you'll have to look up the following commands in the help file to modify this to your need. but what i think you need is...
Code:
{numlock}::                      ; Hotkey; NUMLOCK executes the script

loop, 1000             ; Loop everything inside {} 1000 times
{
Send, abc               ; sends the specifyed keystrokes.  In this case 'abc'
sleep, 3000             ; pause 3s (3000 miliseconds = 3s ??idk.. bad in math)
}

loop, 1000

{
(keyboard command2)    ; whatever your second keyboard commands are
}
return


PS i am also a next to nothing programmer, but AHK is a great place to start, it has already done wonders for me...just start reading the help files, they are really easy to understand with the examples given, and try to start your script. Post back with your code or what you have so far, and im sure people in this community will help you along the way...good luck!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 31st, 2006, 6:19 am 
Offline

Joined: January 16th, 2006, 3:52 am
Posts: 32
If you have a lot of different commands to send you can nest a loop within another loop.

*tested*
Code:
printscreen::
array0=5 ;artificially creating array, other option would be making long data string and using stringsplit
array1=command list 1{enter}
array2=command list 2{enter}
array3=command list 3{enter}
array4=command list 4{enter}
array5=command list 5{enter}
loop %array0%
{
   cell:=array%a_index%
   loop 1000
   {
     send %cell%
     sleep 3000
   }
}
return


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], rbrtryn, Yahoo [Bot] and 64 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group