Jump to content

need little help with some function


Kyme
 Share

Recommended Posts

i need help with this:

i have

hotkeyset("!{F12}", "startkey")
$buton1 = GUICtrlCreateButton

While 1
$nmsg = GUIGetMsg()
  If $msg= $buton1 Then
    MouseClick("left",122,92,1,1)
    Sleep(500)
  EndIf
WEnd

Q:how to make function???when i press alt+F12 to MouseClick("left",122,92,1,1) :D

tnx

Edited by Kyme
Link to comment
Share on other sites

Try:

HotKeySet("!{F12}", "startkey")

While 1

Wend

Func startkey()
MouseClick("left",122,92,1,1)
EndFunc

ok but my If $msg= $buton1 it's too long...i can't to make some function to press $buton1????like i press it with mouse...like some hot key start ????

like here

Func startall()
    GUIGetMsg() = $buton1
EndFunc

but i try it and i got

Illegal text at the end of statement (one statement per line).:

GUIGetMsg() = $buton1

GUIGetMsg() ^ ERROR

Edited by Kyme
Link to comment
Share on other sites

While 1
$GUImsg = GuiGetMsg()
If $GUImsg = $buton1 Then startkey()
Wend

Func startkey()
MouseClick("left",122,92,1,1)
EndFunc

I think that's what you mean :D

i made it :D i make it like this

hotkeyset("!{F12}", "startall")
Func startall()
    $nmsg = GUIGetMsg()
    $nmsg = $buton1
EndFunc

i try this first one but i don't add $nmsg = GUIGetMsg() and it didn't work...

tnx for help Dampe

see soon

Link to comment
Share on other sites

The solution posted by dampe is probably better. I'll have to take a look for what you solution should be, I know what you really need is here somewhere... :D

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