Sign in to follow this  
Followers 0
houldy

Help with script

13 posts in this topic

Hello,

I'm new here and I'm using this program first time.

I need a script which still press Q on my keyboard, with pauza of 1 minute.

And also got funny question.

If I have 2 users on my computers, on 1 user i will run autoit and start script, will it still be working?

Share this post


Link to post
Share on other sites



HotkeySet() to call a function after a certain keypress , gl.

dont know the answer to the funny question for sure but its probably a yes

Share this post


Link to post
Share on other sites

Can u write here what should I add?

HotkeySet(q), and what next to wait 1 minute?

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Let me guess:

you want this for a game.

you haven't open the helpfile.

you haven't search the forum for the answer.

you want somebody to code it all for you.

Am I close? :)

Edited by 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)

HotKeySet("q", "Wait") 

while 1
sleep(100)
Wend

func Wait()
sleep(60*1000)
Endfunc

this will let the script sleep 1 minute if you press q and it will keep being active since it will stay in an endless while loop.

gl.

but like jos says.. try to look in the helpfile and look if you understand the script i just gave you since you wont get a free script all the time.

autoit is pretty simple ( i learned coding the basics like this in a couple of hours)

Edited by cageman

Share this post


Link to post
Share on other sites

Just tried it in notepad and it doesn't work. I quess my script stop, but im not sure. When I tried it to use in game it wasn't working too, and also blocked this hotkey.

What I'm doing wrong?

Should I first open notepad and next start script, and to keep it working should I press Q?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I am pretty sure you wanted the script to press the Q for you in stead of it working as a Hotkey...

What about you first try to understand how to script in AItoIt3 and what the posted script does?

Edited by 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

I rode help and tried made this script by myself, but it always doesn't works...

I'm getting confused.

Share this post


Link to post
Share on other sites

post whatever you have so far. And do you want the script to write 'Q' or to react on when you press 'Q' ?


[right]~What can I say, I'm a Simplistic person[/right]

Share this post


Link to post
Share on other sites

While 1

Send("Q")

sleep(60000)

WEnd

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

i think your funny question can work with "Control"... "ControlSend"...

search for it.

Edited by Xav

Share this post


Link to post
Share on other sites

Thanks Tom ur script works.

Also thanks to all who tried to help me.

Share this post


Link to post
Share on other sites

no problem :)

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