Jump to content

Recommended Posts

Posted (edited)

Why doesn't this script work?

CODE

#include <GUIConstantsEx.au3>

Gui()

func gui()

Opt("GUIOnEventMode", 1)

GUICreate("hello", 500, 500, 500, 500)

guictrlcreatetab(0,0,500,25)

$lolbutton=guictrlcreatebutton("lolbutton", 50, 50, 50, 50)

guisetonevent($GUI_EVENT_CLOSE, "close")

guisetonevent($lolbutton, "lol")

GUISetState(@SW_SHOW)

endfunc

while 1

sleep(10)

wend

func close()

exit

endfunc

func lol()

mouseclick("left", 500, 500, 5)

endfunc

I was trying out a feature for something..and last time i made something similar it worked fine..however now it is not working?

it executes the close function, however, it does not execute the lol function.

Edited by Ham123
Posted

From my understanding GUISetOnEvent is for the GUI itself and GUICtrlSetOnEvent is for buttons etc. Change this and see if it works :D

LOL yup that worked xD thanks to you and Authenticity :D

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
×
×
  • Create New...