AutoHotkey Community

It is currently May 27th, 2012, 12:28 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: First time! need help
PostPosted: June 16th, 2005, 12:21 am 
So,help me with script.
I need next..
Push "z" then in one sec Push "1" and that repeat many many many times..

plz write that script down..

and sorry for my bad english.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2005, 7:48 am 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2250
Location: switzerland
hello Zostr, ask in support/help
Code:
z::
sleep,1000  ;after pushed  z wait 1 second
loop,3        ;here repeat three times, send every second 1
{
send,1
sleep,1000
}

ExitApp



Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2005, 4:28 pm 
may be im n00b but that didn't work :(


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2005, 4:50 pm 
Offline

Joined: April 19th, 2005, 10:26 am
Posts: 2250
Location: switzerland
should send z and 1 repetiv ?
for test:
save script sendz1.ahk, start script, nothing happen
start notepad
start script with ctr+z, writes z and 1 three times
script starts always when push ctrl+z until you close

Code:
^z::
loop,3        ;here repeat three times, send every second z and 1
{
sleep,1000
send,z
sleep,1000
send,1
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2005, 5:58 pm 
@ Zostr
TBH. First time I read that subject I thought about to call your parents and ask them why they havn't told you what needs to be known before boy meets girl* :lol::wink:

*or boy meets boy or girl meets girl 8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 16th, 2005, 6:00 pm 
Big 10x to u garry all work :) GREAT


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 17th, 2005, 11:02 pm 
Offline

Joined: April 16th, 2005, 1:05 am
Posts: 28
it didn't work before because the loop was set to do it only 3 times
Code:
z::
Loop
{
   Send, z
   Sleep, 1000
   Send, 1
   Sleep, 1000
}
exit


this will run untill you manuly exit the scipt. if you wanted it to exit with another press of z then you could do this.
Code:
z::
Sleep, 100
Loop
{
   GetKeyState, keysState, <key to stop script>, P
   if keysState = U
   {
      break
   }
   else
   {
      Send, z
      Sleep, 1000
      Send, 1
      Sleep, 1000
   }
}
exit

where <key to stop script> is any key of your choice

_________________
cstone


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 17th, 2005, 11:03 pm 
Offline

Joined: April 16th, 2005, 1:05 am
Posts: 28
i made a mistake in the code above.
i put Send, {z} twice.
the second one is suppose to be Send, {1}

sorry

_________________
cstone


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 17th, 2005, 11:28 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I edited the post. Note that you can edit your own posts by pressing the Edit button to the right of the post.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], chaosad, Exabot [Bot], Google Feedfetcher, jrav, Yahoo [Bot] and 19 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