Jump to content

Why isn't this working?


Recommended Posts

#include <GUIConstants.au3>

HotKeySet("{F9}","F9")
HotKeySet("{F10}","F10")
HotKeySet("{F11}","F11")
HotKeySet("{F12}","F12")

#Region ### START Koda GUI section ### Form=C:\Bob\Autoit\My Autoit Stuff\Macro\MacroForm.kxf
$Form1 = GUICreate("Bobs Macro Program", 254, 139, 306, 184)
$F9 = GUICtrlCreateInput("F9", 32, 25, 209, 21)
$F10 = GUICtrlCreateInput("F10", 32, 50, 209, 21)
$F11 = GUICtrlCreateInput("F11", 32, 75, 209, 21)
$F12 = GUICtrlCreateInput("F12", 32, 100, 209, 21)
$Label1 = GUICtrlCreateLabel("F9", 10, 28, 16, 17)
$Label2 = GUICtrlCreateLabel("F10", 5, 53, 22, 17)
$Label3 = GUICtrlCreateLabel("F11", 7, 77, 22, 15)
$Label4 = GUICtrlCreateLabel("F12", 6, 104, 22, 17)
$Label5 = GUICtrlCreateLabel("This Program By BobiusMaximus", 24, 0, 157, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Func F9()
    Send(GuiReadCtrl($F9))
EndFunc

Func F10()
    Send(GuiReadCtrl($F10))
EndFunc

Func F11()
    Send(GuiReadCtrl($F11))
EndFunc

Func F12()
    Send(GuiReadCtrl($F12))
EndFunc

This is meant to type stuff when you push F9-F12, but I keep getting an error and have no clue why.

Help appreciated ;)

-Bob

Edited by BobTheLeetHaxx0r
Photoshop User and Noob AutoIt user.
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...