Sign in to follow this  
Followers 0
djstick

need help

4 posts in this topic

#1 ·  Posted (edited)

Hi guys, I'm new to Autoit and I was wondering wether it's possible someone to make a macro where u basically press a key and loop it in 2 seconds with 3 different keys, one to switch it on, one to switch off, and the one that loops, I tried to download the tutorial but i can't open it, (tried to double click it but gives me an error with acrobat reader), maybe i'm doing something really stupid and i really can't do anything not even open the tutorial to start to learn. pls help me thx in advance

Edited by djstick

Share this post


Link to post
Share on other sites



Generally, we don't just write scripts for other people. However, we do try to help others who are trying to write a script and run in to problems. What you describe sounds easy enough, but you didn't provide any details at all. What program are you trying to control? What keys are you trying to send? And what are you switching on and off?

I don't know what tutorial you are trying to use. But the help file that gets installed when you install AutoIt is not an Acrobat file.


#include <ByteMe.au3>

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Generally, we don't just write scripts for other people. However, we do try to help others who are trying to write a script and run in to problems. What you describe sounds easy enough, but you didn't provide any details at all. What program are you trying to control? What keys are you trying to send? And what are you switching on and off?

I don't know what tutorial you are trying to use. But the help file that gets installed when you install AutoIt is not an Acrobat file.

Nevermind, :x I was talking about the Tutorial in this post: " I've managed to open it now, but basically the macro i want is for a program in my video store, sometimes i need to check certain customer files for delays, etc, and there's a lot of them (over 7000) and i hate to be pressing PageDown for like 1000 times so i can scroll all customers down so, all i need it to do is when i press (for ex:) Space or any other key it starts a loop by pressing PageDown each 2 seconds or the enough time i need just to write theyr numbers down so i can send it to whatever my boss needs them to and when i press Space again the loop ends. But as i've managed to open the tutorial today i've been practicing some exercises there and i know now it's someting to do with the "Send" command but i still need to learn how to make a loop, etc etc etc lol. my knowledge is still too shalow I just need to dig a little deeper to sort this out. but any sugestions would be nice :P. thx

Edited by djstick

Share this post


Link to post
Share on other sites

#Include <Misc.au3>

While 1

If _IsPressed("11") Then ; 11 is for control key

Send ( "{P}" ) ; P is just a test for notepad to exchange for PageDown later

EndIf

If _IsPressed("12") then ; 12 is for alt key

(didn't figured out what to put in here yet, but supposedly is to pause the script without exiting)

EndIf

WEnd

this is what i've managed to build so far. As u can see the only thing that i've done is when i press "Control" key it sends the "P" key repeatedly in an infinite loop (tested in notepad), but what i want it to do is when i press "Control key" it sends "P" repeatedly in an infinite loop but with a given time interval between key sends for ex: 2 secs but when "Alt" Key is pressed it pauses the loop without exiting the macro (i've tried "Exit" and "ExitLoop" but both terminate the script), but i would prefer this to be like a switch (on/off) for my "Space" key so i can switch the auto scroll macro on and off in my work and don't have to assign a 2nd key to pause the loop(in this case "Alt" key). I'm going to dig a bit more in tutorial and post any progress. I noticed there's a Sleep function but when i try to use it after the: "Send ( "{P}" )" it no longer sends "P" key repeatedly, instead i have to keep holding "Control" key down for the macro to send the "P" key and that isn't good for me 'cuz it's harder to write if i have to be holding Space key all the time and this macro wouldn't be of real use if otherwise. a bit help would be apreciated. thx in advance :x

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