Jump to content
Sign in to follow this  
Unc3nZureD

AutoHotkey Problem

Recommended Posts

Unc3nZureD

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

Share this post


Link to post
Share on other sites
somdcomputerguy

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.

Share this post


Link to post
Share on other sites
Unc3nZureD

ok, i'll try it.

If u want u can write an other sourcecode if it's wrong. please any1 help me. thx

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  

×