alemoscastro Posted November 17, 2005 Share Posted November 17, 2005 i need a macro like this: macro press keys f1 to f6 in 0.2 seconds, after key f8 and finish enter key but the repeat this many times. Please help me or write a example Link to comment Share on other sites More sharing options...
SpookMeister Posted November 17, 2005 Share Posted November 17, 2005 Lets start off with clarifying what you are wanting it to do. Think step by step... (I'll take a shot at translating what your saying) Press F1 Press F2 . . Press F6 When someone presses F8 ENTER ENTER ENTER ENTER ENTER ENTER Is that what you wanted it to do? [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
alemoscastro Posted November 17, 2005 Author Share Posted November 17, 2005 Lets start off with clarifying what you are wanting it to do.Think step by step... (I'll take a shot at translating what your saying)Press F1Press F2..Press F6When someone presses F8ENTERENTERENTERENTERENTERENTERIs that what you wanted it to do?can you help me with a example? Link to comment Share on other sites More sharing options...
SpookMeister Posted November 18, 2005 Share Posted November 18, 2005 Yeah, but I wont be able to reply until later tonite. In the mean time check out the help file for commands like send() and ControlSend() And posibly WinWaitActive() [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
SpookMeister Posted November 18, 2005 Share Posted November 18, 2005 (edited) Sorry I couldn't get on last nite. Here is the basic idea. You should be able to see how it works and modify it to suit your needs. ; Hot Keys to do what you want HotKeySet("{ESC}","Terminate") HotKeySet("{F7}","Series") HotKeySet("{F8}","Enters") ; Continual Loop While 1 sleep(100) WEnd ; Function to end the program Func Terminate() Exit EndFunc ; Function to send the series of Function keys you want Func Series() Send("{F1}"&"{F2}"&"{F3}"&"{F4}"&"{F5}"&"{F6}") EndFunc ; Function to send the bunch of ENTER keys you want Func Enters() Send("{ENTER}"&"{ENTER}"&"{ENTER}"&"{ENTER}"&"{ENTER}") EndFunc And as per your question about the posibility of making it an executable file, yes its easy to do. If you installed Scite then there is an option in the tools menu that you can click on to make the .exe or you can look under the autoit folder for a program called Aut2Exe.exe. Run the program and it will ask you what file you want to convert and where you want to save it to. Edited November 18, 2005 by SpookMeister [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
alemoscastro Posted November 19, 2005 Author Share Posted November 19, 2005 (edited) i try but no work i trying to use in gunbound game Edited November 19, 2005 by alemoscastro Link to comment Share on other sites More sharing options...
alemoscastro Posted November 24, 2005 Author Share Posted November 24, 2005 how include this code to active window ; Hot Keys to do what you want HotKeySet("{ESC}","Terminate") HotKeySet("{F7}","Series") HotKeySet("{F8}","Enters") ; Continual Loop While 1 sleep(100) WEnd ; Function to end the program Func Terminate() Exit EndFunc ; Function to send the series of Function keys you want Func Series() Send("{F1}"&"{F2}"&"{F3}"&"{F4}"&"{F5}"&"{F6}") EndFunc ; Function to send the bunch of ENTER keys you want Func Enters() Send("{ENTER}"&"{ENTER}"&"{ENTER}"&"{ENTER}"&"{ENTER}") EndFunc Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now