Kyme Posted April 19, 2008 Share Posted April 19, 2008 (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) tnx Edited April 19, 2008 by Kyme Link to comment Share on other sites More sharing options...
Dampe Posted April 19, 2008 Share Posted April 19, 2008 Try: HotKeySet("!{F12}", "startkey") While 1 Wend Func startkey() MouseClick("left",122,92,1,1) EndFunc Link to comment Share on other sites More sharing options...
Kyme Posted April 19, 2008 Author Share Posted April 19, 2008 (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 April 19, 2008 by Kyme Link to comment Share on other sites More sharing options...
Dampe Posted April 19, 2008 Share Posted April 19, 2008 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 Link to comment Share on other sites More sharing options...
Kyme Posted April 19, 2008 Author Share Posted April 19, 2008 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 i made it 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 More sharing options...
BrettF Posted April 19, 2008 Share Posted April 19, 2008 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... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
BrettF Posted April 19, 2008 Share Posted April 19, 2008 Got it...http://www.autoitscript.com/forum/index.php?showtopic=66650 Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now