01b5s4 Posted March 27, 2006 Share Posted March 27, 2006 (edited) Hello all, I'm very new to autoit (this morning new) and I have a couple of questions. I'm trying to create a half transparent GUI that sits over another program and sends keys to it. The problem is that I need the GUI to (re-size and place the new buttons) when the menu button is clicked. But how do I "close" or re-size the GUI back to it's original size when I click the menu button again? Is there some code for setting the state of a button up/down or something to that effect? My GUI is attached... Thanks for your help Edited March 28, 2006 by 01b5s4 Link to comment Share on other sites More sharing options...
01b5s4 Posted March 28, 2006 Author Share Posted March 28, 2006 (edited) Ok, I worked all day to get this far but I still need some assistance. The menu button will now open/close and resize the GUI, but the script seems to have a loop bug because once I run the script, It will keep sending the (!q) part repeatedly. Can anyone take a look at it for me please? It's attached as a zip file below, and here's the code: expandcollapse popup#include <GUIConstants.au3> #include <file.au3> Dim $coords,$menuback,$zoomin _FileReadToArray("coords.ini",$coords) GUICreate("EXIT_FS", 69, 80,$coords[1],$coords[2],"0x80000080",$WS_EX_TOPMOST) WinSetTrans("EXIT_FS", "", 255) $menubutton = GUICtrlCreateButton("", "","", 69, 80,$BS_BITMAP+0x0E00A) GUICtrlSetImage( -1,"menu.bmp" ) GUICtrlSetState(-1,$GUI_FOCUS) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $menubutton WinMove("EXIT_FS", "", $coords[1], $coords[2], 138, 80) $zoomin = GUICtrlCreateButton("", "69","", 69, 80,$BS_BITMAP+0x0E00A) GUICtrlSetImage( -1,"item.bmp" ) GUICtrlSetState(-1,$GUI_FOCUS) GUICtrlDelete($menubutton) $menuback = GUICtrlCreateButton("", "","", 69, 80,$BS_BITMAP+0x0E00A) GUICtrlSetImage( -1,"back.bmp" ) GUICtrlSetState(-1,$GUI_FOCUS) Case $msg = $zoomin WinActivate ("Myapp") Send("!q") Case $msg = $menuback WinMove("EXIT_FS", "", $coords[1], $coords[2], 69, 80) GUICtrlDelete($menuback) $menubutton = GUICtrlCreateButton("", "","", 69, 80,$BS_BITMAP+0x0E00A) GUICtrlSetImage( -1,"menu.bmp" ) GUICtrlSetState(-1,$GUI_FOCUS) Case $msg = $GUI_EVENT_CLOSE ;While GuiGetMsg() <> $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Edited March 28, 2006 by 01b5s4 Link to comment Share on other sites More sharing options...
GaryFrost Posted March 28, 2006 Share Posted March 28, 2006 try Dim $coords, $menuback = -999, $zoomin = -999, $open = 0 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
01b5s4 Posted March 28, 2006 Author Share Posted March 28, 2006 gafrost, Thank you sooooo much bro. I owe you one Everything works great now try Dim $coords, $menuback = -999, $zoomin = -999, $open = 0 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