Jump to content

Recommended Posts

Posted

example

 

$Form1 = GUICreate("form1", 402, 178, 244, 153)

GUISetState(@SW_SHOW)

$MenuItem3 = GUICtrlCreateMenuItem("About ;", $MenuItem1)

$Form2 = GUICreate("About ; ", 297, 144, 328, 312)

GUISetState(@SW_SHOW)

 

Click $MenuItem3 show form2

and

{X} Exit form2 one

 

  • Moderators
Posted

InJuriesX,

Read the help file for GUICtrlCreateMenuItem to see how to correctly action  the menu item events.

Reading the Managing Multiple GUIs tutorial in the Wiki will explain how to create and close the child GUI.

Come back if you still have problems.

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

 

  • Moderators
Posted

InJuriesX,

Did you read the tutorial to which I linked? Please post the code you used - see here how to do it.

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

 

Posted
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;this my tools

;Speed Win by registry
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Speed Win InJuriesX", 402, 178, 244, 153)
$Pic1 = GUICtrlCreatePic("D:\صصور\صور\Wallpapers-room_com___Minimal_Wood_3_by_dimage_1920x1200.jpg", 0, -8, 401, 185, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlSetState(-1, $GUI_DISABLE)
$Button1 = GUICtrlCreateButton("Speed Win", 120, 64, 169, 33, $WS_GROUP)
GUISetState(@SW_SHOW)
$MenuItem1 = GUICtrlCreateMenu("File ; ")
$MenuItem4 = GUICtrlCreateMenuItem("Rest ; ", $MenuItem1)
GUICtrlSetState(-1, $GUI_CHECKED)
$MenuItem3 = GUICtrlCreateMenuItem("About ;", $MenuItem1)
$MenuItem2 = GUICtrlCreateMenuItem("Exit ; ", $MenuItem1)
#EndRegion ### END Koda GUI section ###
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $MenuItem4
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;here code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Case $MenuItem3
$Form2 = GUICreate("About ; ", 297, 144, 328, 312)
$Edit1 = GUICtrlCreateEdit("", 16, 16, 265, 97)
GUICtrlSetData(-1, StringFormat("My Account ; \r\nyoutube ; injuries yemen\r\noovoo ; al_ko_oon\r\nEmail Gmail ; weaklyinjuries@gmail.com"))
GUICtrlSetState(-1, $GUI_DISABLE)
GUISetState(@SW_SHOW)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Case $MenuItem2
Exit
Case $Button1
;here code
EndSwitch
WEnd

 

Posted

We understand, as pointed out already, you should check the posted link.

If you're too lazy, check this code:

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

Example()

Func Example()
    ; Create a GUI.
    Local $hGUI1 = GUICreate("Example GUI1")
    ; Create a button.
    Local $idButton1 = GUICtrlCreateButton("Button1", 10, 10, 80, 22)
    ; Display the GUI
    GUISetState(@SW_SHOW, $hGUI1)

    ; Create a GUI.
    Local $hGUI2 = GUICreate("Example GUI2", 300, 300)
    ; Create a button.
    Local $idButton2 = GUICtrlCreateButton("Button2", 10, 10, 80, 22)
    ; Display the GUI
    GUISetState(@SW_SHOW, $hGUI2)

    ; Initialize a Local variable.
    Local $aMsg = 0

    While 1
        ; Assign to $aMsg the advanced GUI messages.
        $aMsg = GUIGetMsg($GUI_EVENT_ARRAY)

        ; Switch from GUIs
        Switch $aMsg[1]
            Case $hGUI1
                ; The event comes from the GUI1

                ; Switch from event ID
                Switch $aMsg[0]
                    Case $GUI_EVENT_CLOSE
                        ExitLoop
                    Case $idButton1
                        MsgBox($MB_SYSTEMMODAL, "", "Button1 clicked.")
                EndSwitch
            Case $hGUI2
                ; The event comes from the GUI2

                ; Switch from event ID
                Switch $aMsg[0]
                    Case $GUI_EVENT_CLOSE
                        GUIDelete($hGUI2)
                    Case $idButton2
                        MsgBox($MB_SYSTEMMODAL, "", "Button2 clicked.")
                EndSwitch
        EndSwitch
    WEnd

    ; Delete the previous GUIs and all controls.
    GUIDelete($hGUI1)
EndFunc   ;==>Example

There's also GUISetOnEvent but you'd have to change some code.

Basic idea is you need to let the script know what window you want to close and use

GUIDelete($Form2)

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

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
  • Recently Browsing   0 members

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