 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
Posted: Sat Jun 07, 2008 2:56 pm Post subject: Which is your Favourite Software ? |
|
|
| Code: | Gui, Add, Button, x75 y120 w75 h20 -Theme, AutoHotkey
Gui, Add, Button, x+5 w75 h20 -Theme vAI , AutoIt3
Gui, Show,w306 h150, Which is your Favourite Software ?
OnMessage( 0x200, "M" )
Return
M() {
MouseGetPos,,,, CID
If ( CID = "Button2" ) {
Random,x,5,230
Random,y,5,130
GuiControl, Movedraw, AI, x%x% y%y%
}} |
 _________________
 |
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 736 Location: Florida
|
Posted: Sun Jun 08, 2008 1:26 am Post subject: |
|
|
That's a good one - I often wanted to do something like that, but that would change the text of the button (swap choices when you mouseover the 'wrong' choice) - I haven't looked at OnMessage() too much before - It looks very useful! _________________ [Join IRC!]
http://www.codeforcure.org/ |
|
| Back to top |
|
 |
poetbox
Joined: 07 Jan 2007 Posts: 60
|
Posted: Sun Jun 08, 2008 1:34 am Post subject: |
|
|
| any way to click it?Iv tried many times and failed at last. |
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 736 Location: Florida
|
|
| Back to top |
|
 |
Z Gecko Guest
|
Posted: Sun Jun 08, 2008 5:46 am Post subject: |
|
|
just to make shure, you don´t use your keybord to push that bad-button | Code: | Gui +LastFoundExist
MyGuiHWND := WinExist("A")
Gui, Add, Button, x75 y120 w75 h20 -Theme HwndMyButton1HWND, AutoHotkey
Gui, Add, Button, x+5 w75 h20 -Theme vAI HwndMyButton2HWND, AutoIt3
Gui, Show,w306 h150, Which is your Favourite Software ?
OnMessage( 0x200, "M" )
OnMessage( 0x102, "F" )
OnMessage( 0x101, "F" )
Return
M() {
MouseGetPos,,,, CID
If ( CID = "Button2" ) {
Random,x,5,230
Random,y,5,130
GuiControl, Movedraw, AI, x%x% y%y%
}}
F()
{
global
GuiThreadInfoSize = 48
VarSetCapacity(GuiThreadInfo, GuiThreadInfoSize)
NumPut(GuiThreadInfoSize, GuiThreadInfo, 0)
if not DllCall("GetGUIThreadInfo", uint, 0, str, GuiThreadInfo)
{
Errorlevel = 1
return
}
CurrentFocus := NumGet(GuiThreadInfo, 12)
if !ErrorLevel
{
if (CurrentFocus = MyButton2HWND)
ControlFocus , , ahk_id %MyButton1HWND%
}
return
}
|
|
|
| Back to top |
|
 |
Deller
Joined: 21 Nov 2007 Posts: 214 Location: 0x01101110
|
Posted: Mon Jun 09, 2008 4:21 pm Post subject: |
|
|
| Ian wrote: | | Zippo, I know how you did that, but I'll be quiet about it. Had me fooled for a while though. |
same here lol |
|
| Back to top |
|
 |
Renchen Guest
|
Posted: Mon Jun 09, 2008 6:45 pm Post subject: |
|
|
Zippo's program have error here:
NumPut(0, yinyang, 0, "UChar")
he tried to call noexisted function...anyone can help please? |
|
| Back to top |
|
 |
Rhys
Joined: 17 Apr 2007 Posts: 736 Location: Florida
|
|
| Back to top |
|
 |
Renchen Guest
|
Posted: Tue Jun 10, 2008 5:28 pm Post subject: |
|
|
okay thanks it is okay now, but it isnt work my card stayed there |
|
| Back to top |
|
 |
krueger00
Joined: 14 Sep 2008 Posts: 8
|
Posted: Sun Sep 14, 2008 9:24 pm Post subject: |
|
|
---------------------------
New AutoHotkey Script.ahk
---------------------------
Error at line 48.
Line Text: Handle := DllCall("CreateFile","str",file,"Uint",0x40000000
Error: This line does not contain a recognized action.
The program will exit.
---------------------------
OK
---------------------------
PLEZ HELP |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|