Sign in to follow this  
Followers 0
Kyme

need little help with some function

7 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



Try:

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

While 1

Wend

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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
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


Share this post


Link to post
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

Share this post


Link to post
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

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  
Followers 0