Jump to content
Miliardsto

Restore from tray speed

Recommended Posts

From tray? how are you doing it now?


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

Share this post


Link to post
Share on other sites

I understand, but still, what code do you have? or is it another application? If it's your own code it's one thing,

if it's a different application (not autoit) i don't know how to help.


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

Share this post


Link to post
Share on other sites

I got this

And there is defined metro gui which one has that effects slower appearing from tray when its restored.

And I got second child gui inside this metro gui.

When I restore from tray my program, child gui appear first and this metro gui appear with slower like fade effects xd

I can delete this effect in this UDF but i cant find where is it or make faster child gui appearing

Share this post


Link to post
Share on other sites

How is the child gui hiding? is it just the sw_hide flag, or does it go away by means of winmove? This is why it's important to see the code, you can clear the contents and leave only the show/hide part for the gui, so we can test. But so it seems you have a parent and a child gui on at the same time, why? why not making the child only come up when you need?


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

Share this post


Link to post
Share on other sites

look what is going on

there is udf metro and child gui on metro gui. minimalize it to tray and restore then white gui and black gui and u will see difference

https://mega.nz/#!O4sCBRAK!lOQc5XGgUCZljRjpWycEI7eJa_NSGBRT1liv_7_Qejg

 

if u afraid download this then , download metro udf and replace example.au3 with this

; ===============================================================================================================================
; Name ..........: MetroGUI UDF Example
; Version .......: v5.1
; Author ........: BB_19
; ===============================================================================================================================

;!Highly recommended for improved overall performance and responsiveness of the GUI effects etc.! (after compiling):
#AutoIt3Wrapper_Run_Au3Stripper=y
#Au3Stripper_Parameters=/so /rm /pe

;YOU NEED TO EXCLUDE FOLLOWING FUNCTIONS FROM AU3STRIPPER, OTHERWISE IT WON'T WORK:
#Au3Stripper_Ignore_Funcs=_iHoverOn,_iHoverOff,_iFullscreenToggleBtn,_cHvr_CSCP_X64,_cHvr_CSCP_X86,_iControlDelete
;Please not that Au3Stripper will show errors. You can ignore them as long as you use the above Au3Stripper_Ignore_Funcs parameters.

;Required if you want High DPI scaling enabled. (Also requries _Metro_EnableHighDPIScaling())
#AutoIt3Wrapper_Res_HiDpi=y
; ===============================================================================================================================

#NoTrayIcon
#include "MetroGUI-UDF\MetroGUI_UDF.au3"
#include "MetroGUI-UDF\_GUIDisable.au3" ; For dim effects when msgbox is displayed
#include <GUIConstants.au3>

;=======================================================================Creating the GUI===============================================================================
;Enable high DPI support: Detects the users DPI settings and resizes GUI and all controls to look perfectly sharp.
_Metro_EnableHighDPIScaling() ; Note: Requries "#AutoIt3Wrapper_Res_HiDpi=y" for compiling. To see visible changes without compiling, you have to disable dpi scaling in compatibility settings of Autoit3.exe

;Set Theme
_SetTheme("DarkTeal") ;See MetroThemes.au3 for selectable themes or to add more

;Create resizable Metro GUI
$Form1 = _Metro_CreateGUI("Example", 500, 300, -1, -1, True)

;Add/create control buttons to the GUI
$Control_Buttons = _Metro_AddControlButtons(True, True, True, True, True) ;CloseBtn = True, MaximizeBtn = True, MinimizeBtn = True, FullscreenBtn = True, MenuBtn = True

;Set variables for the handles of the GUI-Control buttons. (Above function always returns an array this size and in this order, no matter which buttons are selected.)
$GUI_CLOSE_BUTTON = $Control_Buttons[0]
$GUI_MAXIMIZE_BUTTON = $Control_Buttons[1]
$GUI_RESTORE_BUTTON = $Control_Buttons[2]
$GUI_MINIMIZE_BUTTON = $Control_Buttons[3]
$GUI_FULLSCREEN_BUTTON = $Control_Buttons[4]
$GUI_FSRestore_BUTTON = $Control_Buttons[5]
$GUI_MENU_BUTTON = $Control_Buttons[6]
;======================================================================================================================================================================
GUISetState(@SW_SHOW, $Form1)

$GUI = GUICreate("Main", 300, 200, 20, 35, $WS_POPUP, $WS_EX_MDICHILD, $Form1)
GUISetBkColor(0xFFFFFF)




;~ ;Create  Buttons
;~ $Button1 = _Metro_CreateButton("Button Style 1", 50, 245, 115, 40)
;~ $Button2 = _Metro_CreateButtonEx("Button Style 2", 195, 245, 115, 40)
;~ $Button3 = _Metro_CreateButtonEx2("Button Style 3", 340, 245, 115, 40)

;~ ;Create Checkboxes
;~ $Checkbox1 = _Metro_CreateCheckbox("Checkbox 1", 30, 70, 125, 30)
;~ $Checkbox2 = _Metro_CreateCheckboxEx("Checkbox 2", 30, 107, 125, 30)
;~ $Checkbox3 = _Metro_CreateCheckboxEx2("Checkbox 3", 29, 142, 125, 30)
;~ ;Set status to checked
;~ _Metro_CheckboxCheck($Checkbox1, True)
;~ _Metro_CheckboxCheck($Checkbox2, True)
;~ _Metro_CheckboxCheck($Checkbox3, True)

;~ ;Create 3 Radios that are assigned to Radio Group 1
;~ $Radio1 = _Metro_CreateRadio("1", "Radio 1", 180, 70, 100, 30)
;~ $Radio2 = _Metro_CreateRadio("1", "Radio 2", 180, 110, 100, 30)
;~ $Radio3 = _Metro_CreateRadioEx("1", "Radio 3", 180, 150, 100, 30) ;Style with colored checkmark
;~ _Metro_RadioCheck("1", $Radio1) ;check $Radio1 which is assigned to radio group "1" and uncheck any other radio in group "1"

;~ ;Create Toggles
;~ $Toggle1 = _Metro_CreateToggle("Toggle 1", 320, 70, 130, 30)
;~ $Toggle2 = _Metro_CreateToggleEx("Toggle 2", 322, 107, 128, 30)
;~ $Toggle3 = _Metro_CreateOnOffToggle("Enabled", "Disabled", 320, 144, 130, 30) ; Creates a toggle with different texts for on/off. Alternatively you can use _Metro_CreateOnOffToggleEx for the secondary toggle style.

;Create Progressbar
$Progress1 = _Metro_CreateProgress(100, 195, 300, 26)


GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE, $GUI_CLOSE_BUTTON
            _Metro_GUIDelete($Form1) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs!
            Exit
        Case $GUI_MAXIMIZE_BUTTON
            GUISetState(@SW_MAXIMIZE, $Form1)
        Case $GUI_MINIMIZE_BUTTON
            GUISetState(@SW_MINIMIZE, $Form1)
        Case $GUI_RESTORE_BUTTON
            GUISetState(@SW_RESTORE, $Form1)
        Case $GUI_FULLSCREEN_BUTTON, $GUI_FSRestore_BUTTON
            ConsoleWrite("Fullscreen toggled" & @CRLF) ;Fullscreen toggle is processed automatically when $ControlBtnsAutoMode is set to true, otherwise you need to use here _Metro_FullscreenToggle($Form1)
        Case $GUI_MENU_BUTTON
            ;Create an Array containing menu button names
            Local $MenuButtonsArray[5] = ["Themes Demo", "Settings", "About", "Contact", "Exit"]
            ; Open the metro Menu. See decleration of $MenuButtonsArray above.
            Local $MenuSelect = _Metro_MenuStart($Form1, 150, $MenuButtonsArray)
            Switch $MenuSelect ;Above function returns the index number of the selected button from the provided buttons array.
                Case "0"
                    ConsoleWrite("Returned 0 = Starting themes demo. Please note that the window border colors are not updated during this demo." & @CRLF)
                    _ThemesDemo()
                Case "1"
                    ConsoleWrite("Returned 1 = Settings button clicked." & @CRLF)
                Case "2"
                    ConsoleWrite("Returned 2 = About button clicked." & @CRLF)
                Case "3"
                    ConsoleWrite("Returned 3 = Contact button clicked." & @CRLF)
                Case "4"
                    ConsoleWrite("Returned 4 = Exit button clicked." & @CRLF)
                    _Metro_GUIDelete($Form1)
                    Exit
            EndSwitch

        Case $GUI_EVENT_SECONDARYDOWN ;Demo for starting rightclick menu
            Local $aCInfo = GUIGetCursorInfo($Form1)
            If $aCInfo[4] = $Button3 Then
                ;Create an Array containing menu button names
                Local $MenuButtonsArray[4] = ["Button 1", "Button 2", "Button 3", "Button 4"]
                ; Open the rightclick Menu. See decleration of $MenuButtonsArray above.
                Local $MenuSelect = _Metro_RightClickMenu($Form1, 300, $MenuButtonsArray)
                Switch $MenuSelect ;Above function returns the index number of the selected button from the provided buttons array.
                    Case "0"
                        ConsoleWrite("Returned 0 = Button 1 clicked." & @CRLF)
                    Case "1"
                        ConsoleWrite("Returned 1 = Button 2 clicked." & @CRLF)
                    Case "2"
                        ConsoleWrite("Returned 2 = Button 3 clicked." & @CRLF)
                    Case "3"
                        ConsoleWrite("Returned 3 = Button 4 clicked." & @CRLF)
                EndSwitch
            EndIf

    EndSwitch
WEnd


Func _SecondGUI()
    Local $Form2 = _Metro_CreateGUI("Example2", 600, 400, -1, -1, True)

    ;Add control buttons
    Local $Control_Buttons_2 = _Metro_AddControlButtons(True, True, True, True)
    Local $GUI_CLOSE_BUTTON = $Control_Buttons_2[0]
    Local $GUI_MAXIMIZE_BUTTON = $Control_Buttons_2[1]
    Local $GUI_RESTORE_BUTTON = $Control_Buttons_2[2]
    Local $GUI_MINIMIZE_BUTTON = $Control_Buttons_2[3]

    Local $Button1 = _Metro_CreateButton("Close", 250, 340, 100, 40)
    GUICtrlSetResizing($Button1, 768 + 8)
    GUISetState(@SW_SHOW)

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE, $Button1, $GUI_CLOSE_BUTTON
                _Metro_GUIDelete($Form2) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs!
                Return 0
            Case $GUI_MAXIMIZE_BUTTON
                GUISetState(@SW_MAXIMIZE, $Form2)
            Case $GUI_MINIMIZE_BUTTON
                GUISetState(@SW_MINIMIZE, $Form2)
            Case $GUI_RESTORE_BUTTON
                GUISetState(@SW_RESTORE, $Form2)
        EndSwitch
    WEnd
EndFunc   ;==>_SecondGUI


Func _ThemesDemo() ;Loop through all themes by recreating all controls
    Local $ThemesArray[25] = ["DarkMidnightTeal", "DarkMidnightBlue", "DarkMidnightCyan", "DarkMidnight", "DarkTeal", "DarkBlueV2", "DarkBlue", "DarkCyan", "DarkRuby", "DarkGray", "DarkGreen", "DarkGreenV2", "DarkPurple", "DarkAmber", "DarkOrange", "LightTeal", "LightGray", "LightBlue", "LightCyan", "LightGreen", "LightRed", "LightOrange", "LightPurple", "LightPink", "DarkTealV2"]
    For $i = 0 To 24
        GUISetState($Form1, @SW_LOCK)
        ConsoleWrite($ThemesArray[$i] & @CRLF)
        _SetTheme($ThemesArray[$i]) ;See MetroThemes.au3 for selectable themes or to add more
        GUICtrlDelete($Button1)
        GUICtrlDelete($Button2)
        GUICtrlDelete($Button3)
        GUICtrlDelete($Checkbox1)
        GUICtrlDelete($Checkbox2)
        GUICtrlDelete($Checkbox3)
        GUICtrlDelete($Radio1)
        GUICtrlDelete($Radio2)
        GUICtrlDelete($Radio3)
        GUICtrlDelete($Toggle1)
        GUICtrlDelete($Toggle2)
        GUICtrlDelete($Toggle3)
        GUICtrlDelete($Progress1[0])
        GUICtrlDelete($GUI_CLOSE_BUTTON)
        GUICtrlDelete($GUI_MAXIMIZE_BUTTON)
        GUICtrlDelete($GUI_RESTORE_BUTTON)
        GUICtrlDelete($GUI_MINIMIZE_BUTTON)
        GUICtrlDelete($GUI_FULLSCREEN_BUTTON)
        GUICtrlDelete($GUI_FSRestore_BUTTON)
        GUICtrlDelete($GUI_MENU_BUTTON)
        GUISetBkColor($GUIThemeColor, $Form1)
        $Control_Buttons = _Metro_AddControlButtons(True, True, True, True, True)
        $GUI_CLOSE_BUTTON = $Control_Buttons[0]
        $GUI_MAXIMIZE_BUTTON = $Control_Buttons[1]
        $GUI_RESTORE_BUTTON = $Control_Buttons[2]
        $GUI_MINIMIZE_BUTTON = $Control_Buttons[3]
        $GUI_FULLSCREEN_BUTTON = $Control_Buttons[4]
        $GUI_FSRestore_BUTTON = $Control_Buttons[5]
        $GUI_MENU_BUTTON = $Control_Buttons[6]
        $Button1 = _Metro_CreateButton("Button Style 1", 50, 245, 115, 40)
        $Button2 = _Metro_CreateButtonEx("Button Style 2", 195, 245, 115, 40)
        $Button3 = _Metro_CreateButtonEx2("Button Style 3", 340, 245, 115, 40)
        $Checkbox1 = _Metro_CreateCheckbox("Checkbox 1", 30, 70, 125, 30)
        $Checkbox2 = _Metro_CreateCheckboxEx("Checkbox 2", 30, 107, 125, 30)
        $Checkbox3 = _Metro_CreateCheckboxEx2("Checkbox 3", 29, 142, 125, 30)
        _Metro_CheckboxCheck($Checkbox1, True)
        _Metro_CheckboxCheck($Checkbox2, True)
        _Metro_CheckboxCheck($Checkbox3, True)
        $Radio1 = _Metro_CreateRadio("1", "Radio 1", 180, 70, 100, 30)
        $Radio2 = _Metro_CreateRadio("1", "Radio 2", 180, 110, 100, 30)
        $Radio3 = _Metro_CreateRadioEx("1", "Radio 3", 180, 150, 100, 30)
        _Metro_RadioCheck("1", $Radio1)
        $Toggle1 = _Metro_CreateToggle("Toggle 1", 320, 70, 130, 30)
        $Toggle2 = _Metro_CreateToggleEx("Toggle 2", 322, 107, 128, 30)
        $Toggle3 = _Metro_CreateOnOffToggle("Enabled", "Disabled", 320, 144, 130, 30)
        $Progress1 = _Metro_CreateProgress(100, 195, 300, 26)
        GUICtrlSetResizing($Button1, 768 + 8)
        GUICtrlSetResizing($Button2, 768 + 8)
        GUICtrlSetResizing($Button3, 768 + 8)
        GUICtrlSetResizing($Checkbox1, 768 + 2 + 32)
        GUICtrlSetResizing($Checkbox2, 768 + 2 + 32)
        GUICtrlSetResizing($Checkbox3, 768 + 2 + 32)
        GUICtrlSetResizing($Radio1, 768 + 2 + 32)
        GUICtrlSetResizing($Radio2, 768 + 2 + 32)
        GUICtrlSetResizing($Radio3, 768 + 2 + 32)
        GUICtrlSetResizing($Toggle1, 768 + 2 + 32)
        GUICtrlSetResizing($Toggle2, 768 + 2 + 32)
        GUICtrlSetResizing($Toggle3, 768 + 2 + 32)
        GUICtrlSetResizing($Progress1[0], 768 + 2 + 32)
        GUISetState($Form1, @SW_UNLOCK)
        Sleep(1500)
    Next
EndFunc   ;==>_ThemesDemo

 

Share this post


Link to post
Share on other sites

From what i see, you don't even have a tray icon, and the window never minimizes to tray, but instead, it goes to and from the taskbar.

Im not sure how i can help with this, i go the same issue as you described, the white rectangle appears before the main window.

Maybe you can delay it's appearance, or maybe someone else has a better idea.


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

Share this post


Link to post
Share on other sites
On 12/11/2017 at 9:12 PM, careca said:

the window never minimizes to tray, but instead, it goes to and from the taskbar

i'm not clear with all what the Op is describing and couldn't run his script

Maybe _WinAPI_DrawAnimatedRects ?
have the effect drawn from point\anywhere to point\anywhere
 

Share this post


Link to post
Share on other sites

2 gui, the parent has a small effect/animation when min-restoring. The shild has a flag that attaches itself to the parent so both move when you drag parent.

Problem is qhen you restore the child appears first, nodelay or animation. i guess the op wants to delay it a bit, so it shows with parent, not before it.

download and run the example. https://mega.nz/#!O4sCBRAK!lOQc5XGgUCZljRjpWycEI7eJa_NSGBRT1liv_7_Qejg

Edited by careca

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

Share this post


Link to post
Share on other sites
On 17.12.2017 at 5:37 AM, careca said:

2 gui, the parent has a small effect/animation when min-restoring. The shild has a flag that attaches itself to the parent so both move when you drag parent.

Problem is qhen you restore the child appears first, nodelay or animation. i guess the op wants to delay it a bit, so it shows with parent, not before it.

download and run the example. https://mega.nz/#!O4sCBRAK!lOQc5XGgUCZljRjpWycEI7eJa_NSGBRT1liv_7_Qejg

have u changed here something in code? Cause i Dont see effect changed

Share this post


Link to post
Share on other sites

No need to quote me from the previous post..

No, no change, it wasn't for you, it was to respond to Deye.

I can't help you with this, in fact i don't really understand why you need 2 gui's positioned like that, but whatever.


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

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 Queener
      I'm not sure if I'm doing it right or there's a better way to restore windows from hidden in system tray, but if I remove the if statement then it's able to restore the program from system tray, but if I add the if statement then it doesn't restore it. Here's what I gotten so far and the reason why I use the if statement is because #32770 opens many other apps also.

      WinSetState("[CLASS:#32770]", "", @SW_SHOW) If WinExists($title_Pass_Entrance) Then WinWaitActive(WinActivate($title_Pass_Entrance))   ControlSend($title_Pass_Entrance, "", "[CLASS:Edit; INSTANCE:1]", "TempPassword")   ControlClick($title_Pass_Entrance, "", "[CLASS:Button; INSTANCE:2]", "left", 1) EndIf   >>>> Window <<<< Title:    Enter Safe Combination Class:    #32770 Position:    728, 411 Size:    465, 218 Style:    0x94C800C4 ExStyle:    0x00010101 Handle:    0x0000000000050A7A >>>> Control <<<< Class:     Instance:     ClassnameNN:     Name:     Advanced (Class):     ID:     Text:     Position:     Size:     ControlClick Coords:     Style:     ExStyle:     Handle:   
    • By MattHiggs
      Like stated above, I have never really attempted to create tray icon menus simply due to the fact I find them annoying (if I want to minimize a program, I will click "minimize", but if I want to close it, I don't want it to minimize to task bar and require me to close it there), but thought I should try incorporating them into latest script to at least say that I can use them.  However, I am running into a couple of snags/facts I would like to verify.  1) Since tray icons come with their own "GetMsg" function, I just want to verify that, while the continual paging of the tray menu item would still occur within some kind of loop, can the tray menu item events be declared outside and separate from the GUI events?  eg.
      While 1 $tmsg = TrayGetMsg () $nMsg = GUIGetMsg(1) Switch $tmsg Case $TrayMenu Case $settings1 If TrayItemGetState ( $settings1 ) = 65 Then IniWrite ( $path & "\infostore.ini", "Tray Settings", "No Notifications", "$TRAY_CHECKED" ) ElseIf TrayItemGetState ( $settings1 ) = 68 Then IniWrite ( $path & "\infostore.ini", "Tray Settings", "No Notifications", "$TRAY_UNCHECKED" ) Else EndIf Case $settings2 If TrayItemGetState ( $settings2 ) = 65 Then IniWrite ( $path & "\infostore.ini", "Tray Settings", "On top", "$TRAY_CHECKED" ) GUISetStyle ( BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP), $WS_EX_TOPMOST, $Form1_1 ) GUISetStyle ( BitOR($GUI_SS_DEFAULT_GUI, $DS_SETFOREGROUND), $WS_EX_TOPMOST, $Form2 ) GUISetStyle ( -1, $WS_EX_TOPMOST, $Form3 ) GUISetStyle ( BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP), BitOR($WS_EX_OVERLAPPEDWINDOW, $WS_EX_WINDOWEDGE, $WS_EX_TOPMOST), $Form3_1 ) GUISetStyle ( -1, $WS_EX_TOPMOST, $Form4 ) GUISetStyle ( -1, $WS_EX_TOPMOST, $Form5 ) ElseIf TrayItemGetState ( $settings2 ) = 68 Then IniWrite ( $path & "\infostore.ini", "Tray Settings", "On top", "$TRAY_UNCHECKED" ) GUISetStyle ( BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP), 0, $Form1_1 ) GUISetStyle ( $GUI_SS_DEFAULT_GUI, 0, $Form2 ) GUISetStyle ( $GUI_SS_DEFAULT_GUI, 0, $Form3 ) GUISetStyle ( BitOR($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX, $WS_SIZEBOX, $WS_THICKFRAME, $WS_TABSTOP), BitOR($WS_EX_OVERLAPPEDWINDOW, $WS_EX_WINDOWEDGE), $Form3_1 ) GUISetStyle ( $GUI_SS_DEFAULT_GUI, 0, $Form4 ) GUISetStyle ( $GUI_SS_DEFAULT_GUI, 0, $Form5 ) Else EndIf EndSwitch Switch $nMsg[1] Case $Form1_1 Switch $nMsg[0] Case $GUI_EVENT_CLOSE ;ProcessClose ( "pastebutt.exe" ) ;ProcessClose ( "PasteButtonhk.exe" ) Exit EndSwitch EndSwitch Wend My second question also involves the above code, but specifically the "Ini" functions which attempt to read a "tray" state flag from an Ini file.  The following is code located at very beginning of script:
      Const $path = @AppDataDir & "\filler" Opt ( "TrayMenuMode", 1 ) OnAutoItExitRegister ( "refresh" ) $nonote = False $TrayMenu = TrayCreateMenu ( "Settings" ) $settings1 = TrayCreateItem ( "Turn off notifications", $TrayMenu ) TrayItemSetState ( -1, IniRead ( $path & "\infostore.ini", "Tray Settings", "No Notifications", "$TRAY_UNCHECKED" ) ) $settings2 = TrayCreateItem ( "Keep Window on top", $TrayMenu ) TrayItemSetState ( -1, IniRead ( $path & "\infostore.ini", "Tray Settings", "On top", "$TRAY_UNCHECKED" ) ) So the idea is that whenever the user "checks" one of the tray icon menu options, its current "state" will be input into the "ini" file, so that the state of the particular tray menu item will be in the same state as the user left it when the script is launched next.  However, this is not occurring: the ini file contains the "state" flag like it should, but the tray menu item remains unchecked at startup.  Furthermore, the checking or unchecking of "setting1" is not being recognized, as the windows' extended styles do not obtain the "Topmost" flag like they should had it worked.  I get the feeling I'm not getting the "states" of the tray menu items correct.  Any advice?

    • By Chimaera
      Ive had a bit of code from a long time ago and its always worked perfectly until recently
      It creates a restore point of a given name that i choose and i use it when i finalize a customers pc to go back to them.
      the original code was from Venom 007
      Global $CuDate = _Date_Time_GetLocalTime() Global $sRestorePointName = 'Tech_Finish ' & StringTrimRight(_Date_Time_SystemTimeToDateTimeStr($CuDate), 9) Func _CreateRestorePoint($sRestorePointName) ; Author = Venom007 SplashTextOn('Restore Point', 'Creating Restore Point.' & @CRLF & @CRLF & _ 'Please Wait', 300, 90, -1, -1, 18) Local $objSystemRestore $objSystemRestore = ObjGet('winmgmts:{impersonationLevel=impersonate}!root/default:SystemRestore') If Not $objSystemRestore.createrestorepoint($sRestorePointName, 0, 100) = 0 Then SetError(1) SplashOff() If Not @error Then SplashTextOn('System Restore', 'System Restore Point Created Successfully.', 300, 45) Sleep(2000) SplashOff() Else SplashTextOn('System Restore Error', 'System Restore Point Was Not Created.', 300, 45) Sleep(2000) SplashOff() EndIf EndFunc ;==>_CreateRestorePoint Just recently now im seeing windows 10 machines it fails at this line im pretty sure
      $objSystemRestore = ObjGet('winmgmts:{impersonationLevel=impersonate}!root/default:SystemRestore') Does anyone know what has changed in win 10 to cause this?
    • By jvds
      is it possible to create a 16x16 gui and use it instead of the tray icon?
      I have seen http://www.desksoft.com/BWMeter.htm does this, it aloes you you place one of the bandwidth graphics in the tray menu instead of its own icon, I don't know if they have a little gui or use a fancy way to draw an icon in real time but it would be nice to have an interactive icon, or a mini gui like icon you can to things with
      any idea how it is done?
       
       
    • By kcvinu
      Hi all,
      I have searched this forum and found a function named "Get_Systray_Index()" written by Melba23. It is working very good. It can right click on my particular tray icon. But how can select a particular menu item from it. See the attached image. I have tried Send("K") and Send("k") and Send("{DOWN}{ENTER}"). But none of them is working. I don't want to use a mouseclick function. Because i need to use the same script in my laptop too. So please help. Thanks in advance.

×
×
  • Create New...