MachinistProgrammer Posted November 27, 2012 Share Posted November 27, 2012 (edited) the look of the message box was semi-inspired by norton360 message boxes #info#========================================================= flags - 1 = ok - 2 = yes no - 3 = retry ignore abort getting the output - if $output = 0 then, clicked on the X 1 then, clicked on ok 2 then, clicked on yes 3 then, clicked on no 4 then, clicked on retry 5 then, clicked on abort 6 then, clicked on ignore setting the style - use global $mcolour1 = <colour code 1>, $mcolour2 = <colour code 2> to set the colour #============================================================== example script #include <MsgBox++.au3> Global $mcolour1 = 0xffffff, $mcolour2 = 0x0d1d1d1d ;sets the colour to black and white _MsgBoxCreate(1," an example script for MsgBox++","to set the colour use","global $mcolour1 = <colour code 1>, $mcolour2 ="," <colour code 2> to set the colour") _MsgBoxCreate(2," yes and no","the output for the last box was " & $output,"","") _MsgBoxCreate(3," retry, abort and ignore","the output for the last box was " & $output,"","") _MsgBoxCreate(1," finnished","the output for the lst box was " & $output,"","")msgbox++.au3 Edited November 27, 2012 by sycam0inc All my projects live on github Link to comment Share on other sites More sharing options...
JScript Posted November 27, 2012 Share Posted November 27, 2012 I would be much better if the window could ever be moved! Still, thanks for sharing. JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 27, 2012 Moderators Share Posted November 27, 2012 Ditto, the ability to move the MsgBox is key. Still, good work. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
mesale0077 Posted November 28, 2012 Share Posted November 28, 2012 (edited) hinice codethank youwindow movedmodified MsgBox++.au3msgbox++.au3 Edited November 28, 2012 by mesale0077 MachinistProgrammer and JScript 2 Link to comment Share on other sites More sharing options...
JScript Posted November 28, 2012 Share Posted November 28, 2012 @mesale0077 Very nice, thank you! JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
MachinistProgrammer Posted November 28, 2012 Author Share Posted November 28, 2012 hi nice code thank you window moved modified MsgBox++.au3 thanks but i fixed the glitch of it not being in the middle of the screen expandcollapse popup#include <GUIConstantsEx.au3> #include <guictrlonhover.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiConstants.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <StaticConstants.au3> #include <WinAPI.au3> #include <GUIConstantsEx.au3> ;#FUNCTIONS# ==================================================================================================================== ;_MsgBoxCreate ;_MsgBoxCuStyle ; =============================================================================================================================== Global $mcolour2 = 0x191919, $mcolour1 = 0x8C8C8C ; #FUNCTION# ==================================================================================================================== ; Name...........: _MsgBoxCreate ; Description ...: Better looking message boxes with custom styles ; Syntax.........: _MsgBoxCreate($mflag = 1,$mtitle = "title",$mline1 = "line 1",$mline2 = "line 2",$mline3 = "line 3") ; Parameters ....: $mflag - Flag for message box 1 = ok 2 = yes/no 3 = retry/ignore/Cancel ; $mtitle - Title of message box ; $mline1 - The first line of the message box ; $mline2 - The second line of the message box ; $mline3 - The third line of the message box ; Output.........: $output - if $output = 0 then, clicked on the X 1 then, clicked on ok 2 then, clicked on yes 3 then, clicked on no ; 4 then, clicked on retry 5 then, clicked on abort 6 then, clicked on ignore ; ; styles.........: global $mcolour1 = <colour code 1>, $mcolour2 = <colour code 2> to set the colour ; Author ........: Sycam inc (sean campbell) ; Remarks .......: none ; Related .......: ; =============================================================================================================================== Func _MsgBoxCreate($mflag,$mtitle,$mline1,$mline2,$mline3) $1 = @DesktopWidth/2 $width = $1-300 $2 = @DesktopHeight/2 $hight = $2-200 global $msgboxgui = GUICreate($mtitle, 600, 400,$width,$hight, BitOR($WS_POPUP, $WS_SYSMENU, $WS_EX_LAYERED)) GUISetBkColor($mcolour1) $exit = GUICtrlCreateLabel("",585,0,15,15,$GUI_GR_RECT) $Graphic1 = GUICtrlCreateGraphic(0, 0, 600, 75) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mcolour2, $mcolour2) GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, 0, 600, 75) GUICtrlSetGraphic(-1, $GUI_GR_PENSIZE, 4) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mcolour1, $GUI_GR_NOBKCOLOR) GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 600, 0) GUICtrlSetGraphic(-1, $GUI_GR_LINE, 585, 15) GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 585, 0) GUICtrlSetGraphic(-1, $GUI_GR_LINE, 600, 15) $Graphic2 = GUICtrlCreateGraphic(0, 325, 605, 80) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mColour2, $mcolour2) GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, 0, 600, 75) if $mflag = 1 Then $ok = GUICtrlCreateLabel(" ok", 200, 200, 200, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mcolour1) Else if $mflag = 2 Then $yes = GUICtrlCreateLabel(" yes", 90, 200, 200, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mColour1) $no = GUICtrlCreateLabel(" no", 310, 200, 200, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) GUICtrlSetColor(-1, $mColour1) Else If $mflag = 3 Then $retry = GUICtrlCreateLabel(" retry", 10, 200, 180, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mColour1) $abort = GUICtrlCreateLabel(" abort", 210, 200, 180, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mColour1) $ignore = GUICtrlCreateLabel(" ignore", 410, 200, 180, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mColour1) EndIf EndIf EndIf $Label2 = GUICtrlCreateLabel($mtitle, 20, 15, 560, 50) GUICtrlSetFont(-1, 28, 400, 0, "Impact") GUICtrlSetColor(-1, $mColour1) GUICtrlSetBkColor(-1,$mColour2) $Label3 = GUICtrlCreateLabel($mline1, 100, 100, 400, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, $mColour2) $Label4 = GUICtrlCreateLabel($mline2, 100, 125, 400, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, $mColour2) $Label5 = GUICtrlCreateLabel($mline3, 100, 150, 600, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, $mColour2) GUISetState(@SW_SHOW) if $mflag = 1 Then While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN Drag() Case $exit GUIDelete($msgboxgui) Global $output = 0 ExitLoop Case $ok Global $output = 1 GUIDelete($msgboxgui) ExitLoop ;Case $msgboxgui EndSwitch WEnd Else if $mflag = 2 Then While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN Drag() Case $exit GUIDelete($msgboxgui) Global $output = 0 ExitLoop Case $yes Global $output = 2 GUIDelete($msgboxgui) ExitLoop Case $no Global $output = 3 GUIDelete($msgboxgui) ExitLoop ; Case $msgboxgui EndSwitch WEnd Else if $mflag = 3 then While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN Drag() Case $exit GUIDelete($msgboxgui) Global $output = 0 ExitLoop Case $retry Global $output = 4 GUIDelete($msgboxgui) ExitLoop Case $ignore Global $output = 6 GUIDelete($msgboxgui) ExitLoop case $abort Global $output = 5 GUIDelete($msgboxgui) ExitLoop ;Case $msgboxgui EndSwitch WEnd EndIf EndIf EndIf EndFunc Func Drag() dllcall("user32.dll","int","ReleaseCapture") dllcall("user32.dll","int","SendMessage","hWnd", $msgboxgui,"int",$WM_NCLBUTTONDOWN,"int", $HTCAPTION,"int", 0) EndFunc All my projects live on github Link to comment Share on other sites More sharing options...
mesale0077 Posted November 28, 2012 Share Posted November 28, 2012 thanks but i fixed the glitch of it not being in the middle of the screen expandcollapse popup#include <GUIConstantsEx.au3> #include <guictrlonhover.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiConstants.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <StaticConstants.au3> #include <WinAPI.au3> #include <GUIConstantsEx.au3> ;#FUNCTIONS# ==================================================================================================================== ;_MsgBoxCreate ;_MsgBoxCuStyle ; =============================================================================================================================== Global $mcolour2 = 0x191919, $mcolour1 = 0x8C8C8C ; #FUNCTION# ==================================================================================================================== ; Name...........: _MsgBoxCreate ; Description ...: Better looking message boxes with custom styles ; Syntax.........: _MsgBoxCreate($mflag = 1,$mtitle = "title",$mline1 = "line 1",$mline2 = "line 2",$mline3 = "line 3") ; Parameters ....: $mflag - Flag for message box 1 = ok 2 = yes/no 3 = retry/ignore/Cancel ; $mtitle - Title of message box ; $mline1 - The first line of the message box ; $mline2 - The second line of the message box ; $mline3 - The third line of the message box ; Output.........: $output - if $output = 0 then, clicked on the X 1 then, clicked on ok 2 then, clicked on yes 3 then, clicked on no ; 4 then, clicked on retry 5 then, clicked on abort 6 then, clicked on ignore ; ; styles.........: global $mcolour1 = <colour code 1>, $mcolour2 = <colour code 2> to set the colour ; Author ........: Sycam inc (sean campbell) ; Remarks .......: none ; Related .......: ; =============================================================================================================================== Func _MsgBoxCreate($mflag,$mtitle,$mline1,$mline2,$mline3) $1 = @DesktopWidth/2 $width = $1-300 $2 = @DesktopHeight/2 $hight = $2-200 global $msgboxgui = GUICreate($mtitle, 600, 400,$width,$hight, BitOR($WS_POPUP, $WS_SYSMENU, $WS_EX_LAYERED)) GUISetBkColor($mcolour1) $exit = GUICtrlCreateLabel("",585,0,15,15,$GUI_GR_RECT) $Graphic1 = GUICtrlCreateGraphic(0, 0, 600, 75) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mcolour2, $mcolour2) GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, 0, 600, 75) GUICtrlSetGraphic(-1, $GUI_GR_PENSIZE, 4) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mcolour1, $GUI_GR_NOBKCOLOR) GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 600, 0) GUICtrlSetGraphic(-1, $GUI_GR_LINE, 585, 15) GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 585, 0) GUICtrlSetGraphic(-1, $GUI_GR_LINE, 600, 15) $Graphic2 = GUICtrlCreateGraphic(0, 325, 605, 80) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mColour2, $mcolour2) GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, 0, 600, 75) if $mflag = 1 Then $ok = GUICtrlCreateLabel(" ok", 200, 200, 200, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mcolour1) Else if $mflag = 2 Then $yes = GUICtrlCreateLabel(" yes", 90, 200, 200, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mColour1) $no = GUICtrlCreateLabel(" no", 310, 200, 200, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) GUICtrlSetColor(-1, $mColour1) Else If $mflag = 3 Then $retry = GUICtrlCreateLabel(" retry", 10, 200, 180, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mColour1) $abort = GUICtrlCreateLabel(" abort", 210, 200, 180, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mColour1) $ignore = GUICtrlCreateLabel(" ignore", 410, 200, 180, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mColour1) EndIf EndIf EndIf $Label2 = GUICtrlCreateLabel($mtitle, 20, 15, 560, 50) GUICtrlSetFont(-1, 28, 400, 0, "Impact") GUICtrlSetColor(-1, $mColour1) GUICtrlSetBkColor(-1,$mColour2) $Label3 = GUICtrlCreateLabel($mline1, 100, 100, 400, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, $mColour2) $Label4 = GUICtrlCreateLabel($mline2, 100, 125, 400, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, $mColour2) $Label5 = GUICtrlCreateLabel($mline3, 100, 150, 600, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, $mColour2) GUISetState(@SW_SHOW) if $mflag = 1 Then While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN Drag() Case $exit GUIDelete($msgboxgui) Global $output = 0 ExitLoop Case $ok Global $output = 1 GUIDelete($msgboxgui) ExitLoop ;Case $msgboxgui EndSwitch WEnd Else if $mflag = 2 Then While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN Drag() Case $exit GUIDelete($msgboxgui) Global $output = 0 ExitLoop Case $yes Global $output = 2 GUIDelete($msgboxgui) ExitLoop Case $no Global $output = 3 GUIDelete($msgboxgui) ExitLoop ; Case $msgboxgui EndSwitch WEnd Else if $mflag = 3 then While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN Drag() Case $exit GUIDelete($msgboxgui) Global $output = 0 ExitLoop Case $retry Global $output = 4 GUIDelete($msgboxgui) ExitLoop Case $ignore Global $output = 6 GUIDelete($msgboxgui) ExitLoop case $abort Global $output = 5 GUIDelete($msgboxgui) ExitLoop ;Case $msgboxgui EndSwitch WEnd EndIf EndIf EndIf EndFunc Func Drag() dllcall("user32.dll","int","ReleaseCapture") dllcall("user32.dll","int","SendMessage","hWnd", $msgboxgui,"int",$WM_NCLBUTTONDOWN,"int", $HTCAPTION,"int", 0) EndFunc nice but nice your code again thank you fixed the middle of the screen ı think change global $msgboxgui = GUICreate($mtitle, 600, 400,-1,-1, BitOR($WS_POPUP, $WS_SYSMENU, $WS_EX_LAYERED)) expandcollapse popup#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiConstants.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <StaticConstants.au3> #include <WinAPI.au3> #include <GUIConstantsEx.au3> ;#FUNCTIONS# ==================================================================================================================== ;_MsgBoxCreate ;_MsgBoxCuStyle ; =============================================================================================================================== Global $mcolour2 = 0x191919, $mcolour1 = 0x8C8C8C ; #FUNCTION# ==================================================================================================================== ; Name...........: _MsgBoxCreate ; Description ...: Better looking message boxes with custom styles ; Syntax.........: _MsgBoxCreate($mflag = 1,$mtitle = "title",$mline1 = "line 1",$mline2 = "line 2",$mline3 = "line 3") ; Parameters ....: $mflag - Flag for message box 1 = ok 2 = yes/no 3 = retry/ignore/Cancel ; $mtitle - Title of message box ; $mline1 - The first line of the message box ; $mline2 - The second line of the message box ; $mline3 - The third line of the message box ; Output.........: $output - if $output = 0 then, clicked on the X 1 then, clicked on ok 2 then, clicked on yes 3 then, clicked on no ; 4 then, clicked on retry 5 then, clicked on abort 6 then, clicked on ignore ; ; styles.........: global $mcolour1 = <colour code 1>, $mcolour2 = <colour code 2> to set the colour ; Author ........: Sycam inc (sean campbell) ; Remarks .......: none ; Related .......: ; =============================================================================================================================== Func _MsgBoxCreate($mflag,$mtitle,$mline1,$mline2,$mline3) ;$1 = @DesktopWidth/2 ;$width = $1-300 ;$2 = @DesktopHeight/2 ;$hight = $2-200 global $msgboxgui = GUICreate($mtitle, 600, 400,-1,-1, BitOR($WS_POPUP, $WS_SYSMENU, $WS_EX_LAYERED)) GUISetBkColor($mcolour1) $exit = GUICtrlCreateLabel("",585,0,15,15,$GUI_GR_RECT) $Graphic1 = GUICtrlCreateGraphic(0, 0, 600, 75) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mcolour2, $mcolour2) GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, 0, 600, 75) GUICtrlSetGraphic(-1, $GUI_GR_PENSIZE, 4) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mcolour1, $GUI_GR_NOBKCOLOR) GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 600, 0) GUICtrlSetGraphic(-1, $GUI_GR_LINE, 585, 15) GUICtrlSetGraphic(-1, $GUI_GR_MOVE, 585, 0) GUICtrlSetGraphic(-1, $GUI_GR_LINE, 600, 15) $Graphic2 = GUICtrlCreateGraphic(0, 325, 605, 80) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $mColour2, $mcolour2) GUICtrlSetGraphic(-1, $GUI_GR_RECT, 0, 0, 600, 75) if $mflag = 1 Then $ok = GUICtrlCreateLabel(" ok", 200, 200, 200, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mcolour1) Else if $mflag = 2 Then $yes = GUICtrlCreateLabel(" yes", 90, 200, 200, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mColour1) $no = GUICtrlCreateLabel(" no", 310, 200, 200, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) GUICtrlSetColor(-1, $mColour1) Else If $mflag = 3 Then $retry = GUICtrlCreateLabel(" retry", 10, 200, 180, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mColour1) $abort = GUICtrlCreateLabel(" abort", 210, 200, 180, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mColour1) $ignore = GUICtrlCreateLabel(" ignore", 410, 200, 180, 35) GUICtrlSetFont(-1, 20, 400, 0, "Myriad Web Pro") GUICtrlSetBkColor(-1, $mColour2) guictrlsetcolor(-1,$mColour1) EndIf EndIf EndIf $Label2 = GUICtrlCreateLabel($mtitle, 20, 15, 560, 50) GUICtrlSetFont(-1, 28, 400, 0, "Impact") GUICtrlSetColor(-1, $mColour1) GUICtrlSetBkColor(-1,$mColour2) $Label3 = GUICtrlCreateLabel($mline1, 100, 100, 400, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, $mColour2) $Label4 = GUICtrlCreateLabel($mline2, 100, 125, 400, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, $mColour2) $Label5 = GUICtrlCreateLabel($mline3, 100, 150, 600, 25) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, $mColour2) GUISetState(@SW_SHOW) if $mflag = 1 Then While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN Drag() Case $exit GUIDelete($msgboxgui) Global $output = 0 ExitLoop Case $ok Global $output = 1 GUIDelete($msgboxgui) ExitLoop ;Case $msgboxgui EndSwitch WEnd Else if $mflag = 2 Then While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN Drag() Case $exit GUIDelete($msgboxgui) Global $output = 0 ExitLoop Case $yes Global $output = 2 GUIDelete($msgboxgui) ExitLoop Case $no Global $output = 3 GUIDelete($msgboxgui) ExitLoop ; Case $msgboxgui EndSwitch WEnd Else if $mflag = 3 then While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN Drag() Case $exit GUIDelete($msgboxgui) Global $output = 0 ExitLoop Case $retry Global $output = 4 GUIDelete($msgboxgui) ExitLoop Case $ignore Global $output = 6 GUIDelete($msgboxgui) ExitLoop case $abort Global $output = 5 GUIDelete($msgboxgui) ExitLoop ;Case $msgboxgui EndSwitch WEnd EndIf EndIf EndIf EndFunc Func Drag() dllcall("user32.dll","int","ReleaseCapture") dllcall("user32.dll","int","SendMessage","hWnd", $msgboxgui,"int",$WM_NCLBUTTONDOWN,"int", $HTCAPTION,"int", 0) EndFuncmsgbox++.au3 Link to comment Share on other sites More sharing options...
MachinistProgrammer Posted March 4, 2013 Author Share Posted March 4, 2013 (edited) Sorry didn't know about the pm (don't use forums much) Edited March 5, 2013 by sycam0inc All my projects live on github Link to comment Share on other sites More sharing options...
FireFox Posted March 5, 2013 Share Posted March 5, 2013 (edited) LOL. Perhaps you should send him a PM, and it's not very polite to interpellate people like that. If some of them are interested by your project, they will show up and answer on the topic in question. Edited March 5, 2013 by FireFox Link to comment Share on other sites More sharing options...
guinness Posted March 5, 2013 Share Posted March 5, 2013 Please don't use the Global keyword within a function. UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 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