Jump to content
timmy2

In MsgBox, how do SystemModal and TopMost differ?

Recommended Posts

I'm probably just being dense but when I run both of these scripts (compiled) I don't detect any difference in the user experience. (am running Windows 8.1 64b)

SystemModal

#include <GUIConstantsEx.au3>
 #include <MsgBoxConstants.au3>

 $hGUI = GUICreate("Test", 500, 500)
 GUISetState()

 MsgBox($MB_SYSTEMMODAL, "SystemModal", "Press me to continue")

 While 1
     Switch GUIGetMsg()
         Case $GUI_EVENT_CLOSE
             Exit
     EndSwitch
 WEnd

 

TopMost

#include <GUIConstantsEx.au3>
#include <MsgBoxConstants.au3>

 $hGUI = GUICreate("Test", 500, 500)
 GUISetState()

 MsgBox($MB_TOPMOST, "TopMost", "Press me to continue")

 While 1
     Switch GUIGetMsg()
         Case $GUI_EVENT_CLOSE
             Exit
     EndSwitch
 WEnd

 

 

Share this post


Link to post
Share on other sites

There is not an icon on the top left of the window using the $MB_TOPMOST. 

$MB_SYSTEMMODAL 4096    System modal (dialog has an icon)

$MB_TOPMOST 262144  MsgBox() has top-most attribute set

 


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites

There is not an icon on the top left of the window using the $MB_TOPMOST. 

$MB_SYSTEMMODAL 4096    System modal (dialog has an icon)

$MB_TOPMOST 262144  MsgBox() has top-most attribute set

 

Thank you, MikahS, you are correct sir!  I had not noticed the icon. 

I thought SystemModal had more to do with "blocking", but it doesn't seem to block any more than TopMost. Maybe the icon is the only diff.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By lee321987
      Sometimes when I call several MsgBox's they start popping up under other windows, which the requires ALT + TAB or click the taskbar icon.
      I just wanted to share this workaround:
      Just add a simple GUI in your program:
      #include <GUIConstantsEx.au3> $Form1 = GUICreate("Form1", 1, 1, 0, 0) GUISetState(@SW_SHOW) The GUI window size here is 1x1 so it will be nearly invisible, and at the top-left of your screen.
      It seems as long as that GUI is there all MsgBox's appear on top!
      I only tend to create several MsgBox's in a row when I'm actually writing and testing scripts, so the GUI being there is no big deal (I just remove/comment the GUI creation right before I build the .EXE).
      Have a great day!!!
       
       
    • By editcheck
      Hi, after years of use autoit i am tired to type all time:
      msgbox('','','Hi')
      So, wanna mod the function for set default values... or some more changes.
      where is the function?
      or there are another modes for debug messages that i do not knowed ? XD [just wanna like alert('text')]
      And is there any place for all integrates functions ?
      Thank. Sry my english =E
    • By Ackerz
      Hi guys,
      So I am trying to automate a task and this task has an input box with an already set character "9". 
      I have just decided that I don't really need the input as an option but it's good to leave however for this instance I would like it to run past this point automatically. I've tried numerous ways to try and automate the use of the "OK" button using ControlClick and various other options. I just can't seem to see where this point in the script is. Scoured the forums for anything similar but didn't have any luck finding anything. Sorry to be a pain and I hope someone can help, if I haven't explained in enough detail please don't hesitate to ask for more.
      Many thanks,
      Ackerz
       
      Local $len Local $n Local $buff Local $aMyDate $Len = InputBox("Test",$msgPrompt,"9") $len = StringStripWS($len,$STR_STRIPALL) ;Check that user has entered a vaild password length if not StringIsDigit($len) or $len = 0 Then MsgBox(48,"Error","Invaild Integer was entered" & @CRLF & "Program will now exit.") Exit EndIf ;This creates the random password. for $i = 1 to $Len ;Pick a random char between 1 and the pwsMask Length $n = int(random(1,StringLen($pwsMask))) ;Concat each char that has been picked out of pwsMask to $buff $buff = $Buff & StringMid($pwsmask,$n,1) Next  
    • By xtcislove
      Hello,
      as a start in Autoit i tried something i was missing since im using Autoit. 

      I build a custom MessageBox which has a large amount of custom options and which scales its size on the parameters you set. 

      Aviable Settings:
      -Title
      -Unlimited Buttons
      -Text Color (Buttons, Text)

      -Background Color (Msgbox, Buttons, Label) 

      -Button Timeout
      -Autoclose Timeout
      -Icon (Default, No Icon, Custom)

      -Label/ Button Style. 
      -Transparency

      I tried to keep this as close as i could to a Msgbox i was used too on my batch times.

      After i was ready i realised, @Melba23 probably build a way better msgbox which would have suit my needs enterly, anyway thanks to @Melba23 because i use his Stringsize UDF. 

       
       
      local $Message = _sMsgBox("Test", 6, "Continue?") if @extended <> -1 Then MsgBox(0, @extended, $Message&" Button pressed")  
      ScalingMessageBox.au3
    • By SkysLastChance
      I am having a hard time understanding why this is not working. I was hoping some one could help explain it to me. 
      $tags = $oIE.document.GetElementsByTagName("input") For $tag in $tags $class_value = $tag.GetAttribute("class") If string($class_value) = "fTs-p3298-l0 wplEditControl" Then $target = $tag ExitLoop EndIF Next MsgBox(0,"",$target) If $target = "fTs-p3298-l0 wplEditControl" THEN MsgBox(0,"","itworked") I have tried 
       MsgBox(0,"",$target.Attribute)  MsgBox(0,"",$target.Value)  MsgBox(0,"",$target.InnerText) I would expect to see this in the msgbox
      fTs-p3298-l0 wplEditControl  
×
×
  • Create New...