Jump to content

AutoHotkey Problem


Recommended Posts

hi, i want to do a program which show things if i press a Button. Example : F1 - msgbox("01")

F2 - msgbox("02")

F3 - msgbox("03")

i've got this source code:

; Press Esc to terminate script, Pause/Break to "pause"

msgbox(0, "title", "message")

Global $Paused

HotKeySet("{PAUSE}", "TogglePause")

HotKeySet("{ESC}", "Terminate")

HotKeySet("{F1}", "ShowMe")

;;;; Body of program would go here ;;;;

While 1

Sleep(100)

WEnd

;;;;;;;;

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

ToolTip('Script is "Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func Terminate()

Exit 0

EndFunc

Func ShowMe()

msgbox("asd")

EndFunc

But it's only 1 thing. How can i put more?

antoher question:

How can i put an Inputbox which:

Send("{inputbox letter}")

thx

Link to comment
Share on other sites

But it's only 1 thing. How can i put more?

I'm not sure how to answer this one, but for the second question:

$sVar = InputBox("title", "prompt")
Send($sVar)

Also, the syntax for MsgBox is incorrect in the ShowMe function.

Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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