Jump to content

Check windows size


AutoDEV
 Share

Recommended Posts

1 hour ago, AutoDEV said:

Please can you tell me how to continue and not stay in loop while ? For whow show a MsgBox

I still don't realize what you want to achieve with this script. To exit a loop like While, a termination condition is required. This is currently not the case and therefore the script runs forever. I have activated the exit button, but I am almost certain that this will not solve your actual problem.

$choice = GUICreate("Custom MsgBox", 225, 80)
GUICtrlCreateLabel("Please select a button.", 10, 10)
Local $idYess = GUICtrlCreateButton("YES", 10, 50, 65, 25)
Local $idNoo = GUICtrlCreateButton("NON", 80, 50, 65, 25)
Local $idExitt = GUICtrlCreateButton("EXIT", 150, 50, 65, 25)
GUISetState(@SW_SHOW, $choice)

;While can must run in background
While 1

    Switch GUIGetMsg()
        Case $idYess
            ConsoleWrite("$idYess=" & $idYess & @CRLF)
            ;ExitLoop

        Case $idNoo
            ConsoleWrite("$idNoo=" & $idNoo & @CRLF)

        Case $idExitt
            ConsoleWrite("$idExitt=" & $idExitt & @CRLF)
            ExitLoop

    EndSwitch

WEnd

MsgBox(0, '', "I want show this msgbox")

 

EDIT : @Melba23 was a little faster :)

Edited by Musashi

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

13 minutes ago, AutoDEV said:

When i click is ok i can show mw modal. But after GUI is disable anydes button work

I need a GUI

Can you helo me plz ?

I rarely say this, but your posts are getting increasingly ridiculous. Since English is obviously not your native language, show at least some effort and use a translation software. 

A reasonably clear description of your problem would also be helpful. I, and probably others as well, have not the faintest clue what you want to achieve.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

Thx, sorry if u not understand.

Exemple i have this :

Global $test


$choice = GUICreate("Custom MsgBox", 225, 80)
GUICtrlCreateLabel("Please select a button.", 10, 10)
Local $idYess = GUICtrlCreateButton("YES", 10, 50, 65, 25)
Local $idNoo = GUICtrlCreateButton("NON", 80, 50, 65, 25)
Local $idExitt = GUICtrlCreateButton("EXIT", 150, 50, 65, 25)
GUISetState(@SW_SHOW, $choice)

Local $iMsgBoxAnswer = 1, $bLoop = True

While $bLoop
    Switch GUIGetMsg()
        Case $idYess
            ConsoleWrite("$idYess=" & $idYess & @CRLF)

        Case $idNoo
            ConsoleWrite("$idNoo=" & $idNoo & @CRLF)

    EndSwitch
    
    

    If $iMsgBoxAnswer = 1 Then ContinueLoop
        

    $iMsgBoxAnswer = MsgBox(4100, "MsgBox", "Are you sure you want to close the program?", 3)
    Select
        Case $iMsgBoxAnswer = 6 ;Yes
            ConsoleWrite("- bye bye" & @CRLF)
            $bLoop = False

    EndSelect

WEnd 
      
Global $num = 1    
    
While 1
                                            
  Switch $num

    Case "1"
    MsgBox(0, '', 'Number 1')
    ExitLoop 
    
  EndSwitch
  
Wend

How to check my while 2 and cointinue run un background my frirst while.

Idk if is posible but it's what i need.

Ty

Link to comment
Share on other sites

Is

19 hours ago, Musashi said:

I still don't realize what you want to achieve with this script. To exit a loop like While, a termination condition is required. This is currently not the case and therefore the script runs forever. I have activated the exit button, but I am almost certain that this will not solve your actual problem.

$choice = GUICreate("Custom MsgBox", 225, 80)
GUICtrlCreateLabel("Please select a button.", 10, 10)
Local $idYess = GUICtrlCreateButton("YES", 10, 50, 65, 25)
Local $idNoo = GUICtrlCreateButton("NON", 80, 50, 65, 25)
Local $idExitt = GUICtrlCreateButton("EXIT", 150, 50, 65, 25)
GUISetState(@SW_SHOW, $choice)

;While can must run in background
While 1

    Switch GUIGetMsg()
        Case $idYess
            ConsoleWrite("$idYess=" & $idYess & @CRLF)
            ;ExitLoop

        Case $idNoo
            ConsoleWrite("$idNoo=" & $idNoo & @CRLF)

        Case $idExitt
            ConsoleWrite("$idExitt=" & $idExitt & @CRLF)
            ExitLoop

    EndSwitch

WEnd

MsgBox(0, '', "I want show this msgbox")

 

EDIT : @Melba23 was a little faster :)

OK, i need one gui for pause or exit a task who i making in my script.

GUI maust be always show.

And if i click on button i want stop or pause a script.

 

I can't say more.

If u not understand i can add a more description

Thank

Link to comment
Share on other sites

Please i very need help.

 

Exemple :

$choice = GUICreate("Custom MsgBox", 225, 80)
GUICtrlCreateLabel("Please select a button.", 10, 10)
Local $idYess = GUICtrlCreateButton("YES", 10, 50, 65, 25)
GUISetState(@SW_SHOW, $choice)
;GUI MUST BE ALWAS ON

$num = 1
while 1
Switch $num
    case 1
    MsgBox(0, '', $num)
    ExitLoop 
EndSwitch

While 1

    Switch GUIGetMsg()
        Case $idYess
            ConsoleWrite("$idYess=" & $idYess & @CRLF)
            ;ExitLoop
    EndSwitch

WEnd
Wend

Please how to get on last while a statu of button who i have clicked ? (YES)

Edited by AutoDEV
Link to comment
Share on other sites

  • Moderators

AutoDEV,

I think I am safe in saying that no-one here has the slightest idea of what you are trying to do with this script - which rather limits us in the help we can offer you.

I suggest you write down in your native language clearly and in some detail what it is you are trying to achieve and post both that AND a translated version - that way there is a chance that we might be able to work out a solution for you.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • 1 month later...
Posted (edited)

Hellow

Im come back with a same problem

Your code work but if i not click on

Quote

MsgBox(0, '', "I want show this msgbox")

My next code not working.

I have show this :

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

Local $idMsg, $iMenustate, $sMenutext
    Do
        $idMsg = GUIGetMsg()
        If $idMsg = $idButton Then
            MsgBox($MB_SYSTEMMODAL, "Selected listbox entry", GUICtrlRead($idList))
            $iMenustate = GUICtrlRead($idMenu1)
            $sMenutext = GUICtrlRead($idMenu1, 1)
            MsgBox($MB_SYSTEMMODAL, "State and text of the menuitem", "state:" & $iMenustate & @CRLF & "text:" & $sMenutext)
        EndIf
    Until $idMsg = $GUI_EVENT_CLOSE

 

But for continue code and waiting action on my gui how to make please .

Edited by AutoDEV
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...