Iznogoud Posted October 4, 2009 Share Posted October 4, 2009 Hi, I am strugling to do the following. I have a program wich creates an page where you can interect with your lights in your house. This application creates a page where you can click buttons to turn on or off several objects. The only thing this application can't do is start an windows application. What i would like to accomplish is to create a hidden / stealth / invisible button wich i can overlay a picture on the monitor. Wich is in this case a touchscreen. So if they click on the name, my program kicks in and execute internet explorer with a default start page. My question is, is their any way to create a hidden clickable box / image or something, so the user can't see it as a autoit button, but if they click autoit extends the use and opens internet explorer? Link to comment Share on other sites More sharing options...
Yashied Posted October 4, 2009 Share Posted October 4, 2009 Impossible. (I think) 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...
FuryCell Posted October 5, 2009 Share Posted October 5, 2009 (edited) AnyGUI. http://www.autoitscript.com/forum/index.php?showtopic=9517&hl=anygui&st=0 Edited October 5, 2009 by P5ych0Gigabyte HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
Iznogoud Posted October 5, 2009 Author Share Posted October 5, 2009 Maybe an other way. Is it possible to create a button with a picture wich hasn't any borders. So only the picture is visable?It needs to look exactly like this one:I could delete the button in the program and if AutoIT can make a button wich no borders and just the image. I could put them on that position. Link to comment Share on other sites More sharing options...
Mison Posted October 5, 2009 Share Posted October 5, 2009 Hi, Have you tried WinSetTrans? It sets the transparency of a window... Windows 2000/XP or later only Hi ;) Link to comment Share on other sites More sharing options...
jvanegmond Posted October 5, 2009 Share Posted October 5, 2009 You can make a label with a transparent background. It registers click events. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Iznogoud Posted October 5, 2009 Author Share Posted October 5, 2009 Hi, Have you tried WinSetTrans? It sets the transparency of a window... Windows 2000/XP or later only If i set it to 100, will the area still be clickable? You can make a label with a transparent background. It registers click events. If i want to make a label i still need an GUI don't i? I have the following simple code: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> GUICreate("My GUI", 170, 44, 3, 722,BitOR($WS_POPUP,$WS_DLGFRAME)) ;GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreatePic("G:\Gira\Favorieten.jpg", 0, 0, 170, 44) GUISetBkColor(0x000000) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() But i still got some stupid border around my picture. Link to comment Share on other sites More sharing options...
jvanegmond Posted October 5, 2009 Share Posted October 5, 2009 (edited) $WS_DLGFRAME 0x00400000 Creates a window that has a border of a style typically used with dialog boxes. And you're frustrated about the fact that your window has a border?#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> GUICreate("My GUI", 170, 44, 3, 722, $WS_POPUP) ;GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreatePic("G:\Gira\Favorieten.jpg", 0, 0, 170, 44) GUISetBkColor(0x000000) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() Edited October 5, 2009 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
Iznogoud Posted October 5, 2009 Author Share Posted October 5, 2009 $WS_DLGFRAME 0x00400000 Creates a window that has a border of a style typically used with dialog boxes. And you're frustrated about the fact that your window has a border? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> GUICreate("My GUI", 170, 44, 3, 722, $WS_POPUP) ;GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreatePic("G:\Gira\Favorieten.jpg", 0, 0, 170, 44) GUISetBkColor(0x000000) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() Sorry, feeling a bit stupid here. How easy can it be. Thank you so much for taking the time to help me. You just made a very happy person. Link to comment Share on other sites More sharing options...
jvanegmond Posted October 5, 2009 Share Posted October 5, 2009 Sure thing. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Iznogoud Posted October 5, 2009 Author Share Posted October 5, 2009 Sure thing.Damn, i have a nice pic and just the right way i need. But i can't get it connected to a button, so when pressed it will open Internet Explorer.Any idea how i could solve this the best way? Link to comment Share on other sites More sharing options...
jvanegmond Posted October 6, 2009 Share Posted October 6, 2009 Yes, overlay it with a transparent label. The label registers the click event. I said this a while ago. : ) github.com/jvanegmond Link to comment Share on other sites More sharing options...
Iznogoud Posted October 6, 2009 Author Share Posted October 6, 2009 Yes, overlay it with a transparent label. The label registers the click event. I said this a while ago. : )Ok but i looked in the help file because it has been a while for me i have used AutoIt, but how can you make a label clickable?You need a button for that as far as i know. Link to comment Share on other sites More sharing options...
jvanegmond Posted October 6, 2009 Share Posted October 6, 2009 A label is clickable by default because of the forced style $SS_NOTIFY. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Iznogoud Posted October 6, 2009 Author Share Posted October 6, 2009 A label is clickable by default because of the forced style $SS_NOTIFY. Why does this not work? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> GUICreate("My GUI", 170, 44, 3, 722, $WS_POPUP) ;GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreatePic("G:\Gira\Favorieten.jpg", 0, 0, 170, 44) $Label = GUICtrlCreateLabel("Line 1 Cell 1", 10, 30) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete() Exit Case $msg = $Label GUIDelete() Exit ExitLoop EndSelect Wend Sorry if i messed everything up. I am focussed to long about this stupid thing. Link to comment Share on other sites More sharing options...
jvanegmond Posted October 6, 2009 Share Posted October 6, 2009 From the help file GUICtrlCreatePic:If a picture is set as a background picture, as the other controls will overlap, it's important to disable the pic control and create it after the others controls: GuiCtrlSetState(-1,$GUI_DISABLE). github.com/jvanegmond Link to comment Share on other sites More sharing options...
Iznogoud Posted October 6, 2009 Author Share Posted October 6, 2009 From the help file GUICtrlCreatePic: If a picture is set as a background picture, as the other controls will overlap, it's important to disable the pic control and create it after the others controls: GuiCtrlSetState(-1,$GUI_DISABLE). I also tried that, but still the label sits there and nothing happened. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> #include <GuiButton.au3> GUICreate("My GUI", 170, 44, 3, 722, $WS_POPUP) GUICtrlCreatePic("G:\Gira\Favorieten.jpg", 0, 0, 170, 44) GUICtrlSetState(-1, $GUI_DISABLE) $Label = GUICtrlCreateLabel("Line 1 Cell 1", 10, 30) ; $label = GUICtrlCreateButton("Button1", 0, 0, 170, 44, $BS_BITMAP) ; _GUICtrlButton_SetImage($label, "G:\Gira\Favorieten.ico") ; _GUICtrlButton_SetFocus($label, False) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete() Exit ; Case $msg = $Label ; GUIDelete() ; Exit ExitLoop EndSelect Wend As you can see i already have tried to create a button with an image. Just made an .ico file from the image, but then the button will have a dotted line as in focus. Found a topic where you can create a workaround. But i am just a noob at this and still learning. I get confused by looking at the code only if its pages long. Still no luck to create it so i can start a program Link to comment Share on other sites More sharing options...
jvanegmond Posted October 6, 2009 Share Posted October 6, 2009 Overlay the image with a transparent label.This means that:1. The label size and position must be set to the area you want to click.2. The label background must be transparent.If a picture is set as a background picture, as the other controls will overlap, it's important to disable the pic control and create it after the others controls: GuiCtrlSetState(-1,$GUI_DISABLE). This means that:3. You must disable the picture control#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> GUICreate("My GUI", 170, 44, 3, 722, $WS_POPUP) GUICtrlCreatePic("reeeeeeh.gif", 0, 0, 170, 44) GUICtrlSetState(-1, $GUI_DISABLE) ; Requirement 3 $Label = GUICtrlCreateLabel("", 0, 0, 170, 44) ; Requirement 1 GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ; Requirement 2 GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete() Exit Case $msg = $Label GUIDelete() Exit ExitLoop EndSelect Wend github.com/jvanegmond Link to comment Share on other sites More sharing options...
Iznogoud Posted October 6, 2009 Author Share Posted October 6, 2009 Overlay the image with a transparent label. This means that: 1. The label size and position must be set to the area you want to click. 2. The label background must be transparent. If a picture is set as a background picture, as the other controls will overlap, it's important to disable the pic control and create it after the others controls: GuiCtrlSetState(-1,$GUI_DISABLE). This means that: 3. You must disable the picture control #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> GUICreate("My GUI", 170, 44, 3, 722, $WS_POPUP) GUICtrlCreatePic("reeeeeeh.gif", 0, 0, 170, 44) GUICtrlSetState(-1, $GUI_DISABLE) ; Requirement 3 $Label = GUICtrlCreateLabel("", 0, 0, 170, 44) ; Requirement 1 GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ; Requirement 2 GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete() Exit Case $msg = $Label GUIDelete() Exit ExitLoop EndSelect Wend Thanks for your explanation, still not understanding it quite right, but i will compare it with the help files and hopefully i will see the light and understand this right. Again many thanks for your patience and time. Link to comment Share on other sites More sharing options...
Iznogoud Posted October 6, 2009 Author Share Posted October 6, 2009 Ok i have made some progress, but still need some help. This is my code: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> GUICreate("Favorieten", 170, 44, 3, 722, $WS_POPUP) GUICtrlCreatePic("G:\Gira\Favorieten.jpg", 0, 0, 170, 44) GUICtrlSetState(-1, $GUI_DISABLE) ; Requirement 3 $Label = GUICtrlCreateLabel("", 0, 0, 170, 44) ; Requirement 1 GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ; Requirement 2 GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit ;Do nothing Case $msg = $Label Run("C:\Program Files\Internet Explorer\iexplore.exe") Run("C:\Windows\system32\osk.exe") WinSetState("Favorieten", "", @SW_MINIMIZE) EndSelect If ProcessExists("iexplore.exe") Then ;do Nothing Else If ProcessExists("osk.exe") Then ProcessClose("osk.exe") EndIf WinActivate("Favorieten") EndIf Wend On the bottom i am using IF and END statement, i also tried the WEnd statement. But what i want is that this button is always on top. Because i have WinActivate sitting in the While loop this will happen, but i need the following. The program where this button should be on top is a full screen application. This application needs to be in full screen and can be managed by a touch screen. When my button goes active it pops up and as you know the taskbar will become visiable. Is there someway to put this button on top of an full screen application, when pressed it minimize, when iexplore is closed it activates the full screen application, but it shouldn't put the taskbar in front. Any ideas? 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