Vaeb Posted December 14, 2007 Author Posted December 14, 2007 I fixed the Script: #include <GuiConstants.au3> Global $hWnd Global $Width = 440, $Height = $Width Global $Good = 1 $hWnd = GuiCreate('MyButton', $Width, $Height) For $i = 1 to 6 For $j = 1 to 6 $Button = GUICreate("AButton", 70, 70, 10 + 70*($i-1), 10 + 70*($j-1), $WS_POPUP, BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD), $hWnd) GUICtrlCreatePic(@Systemdir & "\oobe\images\merlin.gif", 0, 0, 0, 0) GUISetState(@SW_SHOW, $Button) next $Invisible = GUICreate("invisible gui",100,100,100,100, $WS_POPUP, BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD), $hWnd) GUISetState(@SW_SHOW, $Invisible) next $Invisible2 = GUICreate("invisible gui2",100,100,100,100, $WS_POPUP, BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD), $hWnd) GUISetState(@SW_SHOW, $Invisible2) GUISetState(@SW_SHOW, $hWnd) While 1 $Msg = GUIGetMsg(1) If WinActive('AButton','') then MsgBox(0,'','Hi!') WinActivate('invisible gui','') endif Select case $Msg[0] = $GUI_EVENT_CLOSE exit endselect WEnd I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911
ValeryVal Posted December 16, 2007 Posted December 16, 2007 Have you read this book - The Invisible Boy?If so you can understand me about Invisible Bug in my script. The point of world view
ValeryVal Posted December 16, 2007 Posted December 16, 2007 Sorry! I mean this book Danny_Dunn Invisible_Boy The point of world view
Vaeb Posted December 19, 2007 Author Posted December 19, 2007 There was a bug. I tested your script on 3 diffrent PC's... I guess you think all Computers I use are damaged or something. lol I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911
ValeryVal Posted December 19, 2007 Posted December 19, 2007 Well. You can start from the begining. Try this script: #include <GuiConstants.au3> Global $hWnd Global $Width = 400, $Height = $Width Global $Good = 1 $hWnd = GuiCreate('MyButton', $Width, $Height) $Button = GUICreate("AButton", 70, 70, 10, 10, $WS_POPUP, BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD), $hWnd) GUICtrlCreatePic(@Systemdir & "\oobe\images\merlin.gif", 0, 0, 0, 0) GUISetState(@SW_SHOW, $Button) GUISetState(@SW_SHOW, $hWnd) While 1 $Msg = GUIGetMsg(1) If WinActive('AButton','') then MsgBox(0,'','Hi!') WinActivate('MyButton','') endif Select case $Msg[0] = $GUI_EVENT_CLOSE exit endselect WEnd Click Merlin. He will open Message Box with "Hi!". Now you can press {Alt+Tab}. Or open other window. Merlin will silent. Isn't it valid for you? The point of world view
Vaeb Posted December 19, 2007 Author Posted December 19, 2007 Now you can press {Alt+Tab}. Or open other windowWhen i push {Alt+Tab}, Merlin is silent.But when i minimize any window, Merlin says "hi"! I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911
Valuater Posted December 19, 2007 Posted December 19, 2007 Valery's script works fine for me Try this... #include <GuiConstants.au3> Global $hWnd Global $Width = 400, $Height = $Width Global $Good = 1 $hWnd = GUICreate('MyButton', $Width, $Height) $Button = GUICreate("AButton", 70, 70, 10, 10, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $hWnd) $pic = GUICtrlCreatePic(@SystemDir & "\oobe\images\merlin.gif", 0, 0, 0, 0) GUISetState(@SW_SHOW, $Button) GUISetState(@SW_SHOW, $hWnd) While 1 $Msg = GUIGetMsg(1) If $Msg[0] = $pic Then MsgBox(0, '', 'Hi!',2) WinActivate('MyButton', '') EndIf Select Case $Msg[0] = $GUI_EVENT_CLOSE Exit EndSelect WEnd 8)
Vaeb Posted December 19, 2007 Author Posted December 19, 2007 Wow this works fine!!! thank you so much! greets I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911
Valuater Posted December 19, 2007 Posted December 19, 2007 Welcome!! Valery did the work... Anyways, glad you got what you wanted after 2 pages on this thread.. 8)
Vaeb Posted December 20, 2007 Author Posted December 20, 2007 (edited) How should the script look like when I use 2 buttons? This is my try to get two buttons: #include <GuiConstants.au3> Global $hWnd Global $Width = 400, $Height = $Width Global $Good = 1 $hWnd = GUICreate('MyButton', $Width, $Height) $og2 = GUICreate("Obergeschoss 2", 124, 32, 280, 830, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $hWnd) $obg2 = GUICtrlCreatePic(@ScriptDir & "\System\Unused Buttons\GlossyRoundButton.bmp", 0, 0, 0, 0) $og1 = GUICreate("Obergeschoss 1", 124, 32, 130, 830, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_MDICHILD), $hWnd) $obg1 = GUICtrlCreatePic(@ScriptDir & "\System\Unused Buttons\GlossyRoundButton.bmp", 0, 0, 0, 0) GUISetState(@SW_SHOW, $og1) GUISetState(@SW_SHOW, $og2) GUISetState(@SW_SHOW, $hWnd) While 1 $Msg = GUIGetMsg(1) Switch $Msg Case $Msg[0] = $obg1 MsgBox(0,"I want","2 buttons!",2) WinActivate('MyButton', '') Case $Msg[0] = $obg2 MsgBox(0,"I do","too!",2) WinActivate('MyButton', '') Case $Msg[0] = $GUI_EVENT_CLOSE Exit EndSwitch WEnd The script opens msgbox1 before i click on button 1... why? Thanks Valery and Valuater Greets Vaeb Edited December 20, 2007 by Vaeb I <3 it:http://www.autoitscript.com/forum/index.php?showtopic=69912http://www.autoitscript.com/forum/index.php?showtopic=69914http://www.autoitscript.com/forum/index.php?showtopic=69911
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