timsta97 Posted August 24, 2009 Share Posted August 24, 2009 (edited) How can I make a button invisible but still clickable? I had tried to use GUISetState( $hButton, 32 ), but that hides the button and dosn't make it usable. Any thoughts? Edited August 24, 2009 by timsta97 Link to comment Share on other sites More sharing options...
Yashied Posted August 24, 2009 Share Posted August 24, 2009 How can I make a button invisible but still clickable? I had tried to use GUISetState( $hButton, 32 ), but that hides the button and dosn't make it usable. Any thoughts?Move the button outside the window client area. For example, to the point with coordinates (-100; -100). My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 24, 2009 Share Posted August 24, 2009 Use an empty label. #include <GUIConstantsEx.au3> GUICreate("Test", 640, 320) $InvisibleButton = GUICtrlCreateLabel("", 320, 0, 320, 480) GUISetState() While 1 Switch GUIGetMsg() Case $InvisibleButton MsgBox(0, "You pressed on:", $InvisibleButton) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
timsta97 Posted August 24, 2009 Author Share Posted August 24, 2009 Use an empty label. #include <GUIConstantsEx.au3> GUICreate("Test", 640, 320) $InvisibleButton = GUICtrlCreateLabel("", 320, 0, 320, 480) GUISetState() While 1 Switch GUIGetMsg() Case $InvisibleButton MsgBox(0, "You pressed on:", $InvisibleButton) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd If I use a label with no text, won't it show a grey box if I put a picture in the background? Link to comment Share on other sites More sharing options...
picea892 Posted August 24, 2009 Share Posted August 24, 2009 This should work for you. Just hide the lines http://www.autoitscript.com/forum/index.php?showtopic=89034&st=0&p=639786&#entry639786 Link to comment Share on other sites More sharing options...
timsta97 Posted August 24, 2009 Author Share Posted August 24, 2009 I don't know, is there possibly an easier way? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 24, 2009 Moderators Share Posted August 24, 2009 timsta97, By chance I have just posted a very simple example of how to use Malkey's "invisible button" here. It is easy to do - just take a look and ask if anything is unclear. >_< M23  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area  Link to comment Share on other sites More sharing options...
timsta97 Posted August 25, 2009 Author Share Posted August 25, 2009 To me it seems like your talking to me like a child, Melba23. I only asked because I needed a faster way to do it. The UDFs that were offered were great, but time consuming to use. Thanks for all your help, but I don't need to do that task that badly. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 26, 2009 Moderators Share Posted August 26, 2009 timsta97,When picea892 showed you malkey's UDF, you asked:is there possibly an easier wayI had a ready made script showing how easy Malkey's idea could be to implemented in a script - I thought you might be interested, so I offered it as an example. If you believe that doing so was talking to me like a childthen I assure you it was not - it was a genuine offer of help. I do enough talking to children (and those who act like them >_<) to do more than I must!M23  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area  Link to comment Share on other sites More sharing options...
billthecreator Posted August 26, 2009 Share Posted August 26, 2009 (edited) if your putting a picture behind it. just have GUIGetMsg($picture) no button, or label, or if not add this under the label: GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT). Edited August 26, 2009 by billthecreator [font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap Link to comment Share on other sites More sharing options...
GEOSoft Posted August 26, 2009 Share Posted August 26, 2009 if your putting a picture behind it. just have GUIGetMsg($picture) no button, or label, or if notadd this under the label: GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT).I have a hunch he's trying to do image mapping by setting a background image. Then if you click on an area in the image, it will perform a function. Personaly I think that he would be better off to embed an html page and use standard image mapping to get what he wants. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
patmo141 Posted April 15, 2012 Share Posted April 15, 2012 if your putting a picture behind it. just have GUIGetMsg($picture) no button, or label, or if notadd this under the label: GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT).yeah....that was easy. Thanks for this example. 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