Jump to content

help me with macros


Recommended Posts

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

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?

can you help me with a example?

Link to comment
Share on other sites

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

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...