Jump to content

Recommended Posts

Posted

hi guys, i want to use a zip program within my script that compress's specific files.

Is it possible for the external programs icon NOT to show up in the taskbar?

thanks for any help

Who needs puzzles when we have AutoIt!!

Posted

At the bottom of the link that I posted was taupe's UDF.

Here is the direct link to the UDF:

http://www.autoitscript.com/forum/index.ph...536entry93536

...and a description same:

"An udf to get process behind any systray icon for easier closing and to give ability to remove any icon(s) from systray."

hope this helps

Ah i did find that, tho unsure how to use it, is it all, or just sections i use, and i'm unsure how to apply it

bear with me, i only found AutoIt 4 days ago, but love it

Who needs puzzles when we have AutoIt!!

Posted

Ah i did find that, tho unsure how to use it, is it all, or just sections i use, and i'm unsure how to apply it

bear with me, i only found AutoIt 4 days ago, but love it

ok, so all is save and example 3 used, but SysTray_UDF.au3 comes up with errors?? ;)

Who needs puzzles when we have AutoIt!!

Posted

Sorry - I've not used it myself - I just remebered the UDF and posted the first link that I found for it.

Perhaps taupe will find this thread or a PM might work...

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

Sorry - I've not used it myself - I just remebered the UDF and posted the first link that I found for it.

Perhaps taupe will find this thread or a PM might work...

ah well, thanks for your help. Its a shame "SysTray_UDF.au3" errors out on line 73, no idea why tho.

does anyone else know how to make it work??

Who needs puzzles when we have AutoIt!!

Posted

ah well, thanks for your help. Its a shame "SysTray_UDF.au3" errors out on line 73, no idea why tho.

does anyone else know how to make it work??

Yay, i resolved it..............

$window = WinGetHandle("My Program") ; taskbar button

GuiCreate("Dummy")

$newParent = WinGetHandle("Dummy")

DllCall("user32.dll", "hwnd", "SetParent", "hwnd", $window, "hwnd", $newParent)

after everthing else it does and program exits:

GuiDelete("Dummy") ; to tidy up

and it works too - amazing - I love AutoIt

Who needs puzzles when we have AutoIt!!

Posted (edited)

...Its a shame "SysTray_UDF.au3" errors out on line 73, no idea why tho...

The "SysTray_UDF.au3" located here:

http://www.autoitscript.com/forum/index.ph...pe=post&id=4436

requires the beta version of AutoIt located here:

http://www.autoitscript.com/autoit3/files/beta/autoit/

I was not sure from your posts which version of AutoIt you had - you need at least 3.1.1.66

I'm not using beta - so not much help.......

later...

Edit: Sure, fix it while I'm composing a post.... glad it is working for you.

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

  • 6 years later...
Posted

Yay, i resolved it..............

$window = WinGetHandle("My Program") ; taskbar button

GuiCreate("Dummy")

$newParent = WinGetHandle("Dummy")

DllCall("user32.dll", "hwnd", "SetParent", "hwnd", $window, "hwnd", $newParent)

after everthing else it does and program exits:

GuiDelete("Dummy") ; to tidy up

and it works too - amazing - I love AutoIt

This code seems to work, but the window is totally disabled, even the min/max/close buttons are gray; why?

Here is my code - this is a work in progress:

#include <Constants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

;#NoTrayIcon

Opt("TrayOnEventMode", 1)
Opt("TrayMenuMode", 1) ; Default tray menu items (Script Paused/Exit) will not be shown.

TraySetOnEvent($TRAY_EVENT_PRIMARYDOUBLE, "SpecialEvent")
TraySetOnEvent($TRAY_EVENT_SECONDARYUP, "SpecialEvent")

$window = GUICreate("No Tray Menu")
GuiCreate("Dummy")
$hWnd = WinGetHandle("Dummy")
DllCall("user32.dll", "hwnd", "SetParent", "hwnd", $window, "hwnd", $hWnd)
GUISetState(@SW_SHOW, $hWnd)
GUISetState(@SW_ENABLE, $hWnd)

TraySetState(1)

While 1
    Sleep(10) ; Idle loop
If GUIGetMsg() = $Gui_Event_Close Then Exit
WEnd
Exit

; Functions
Func SpecialEvent()
    Select
        Case @TRAY_ID = $TRAY_EVENT_PRIMARYDOUBLE
            MsgBox(64, "SpecialEvent-Info", "Primary mouse button double clicked.")
        Case @TRAY_ID = $TRAY_EVENT_SECONDARYUP
   GUISetState(@SW_SHOWNORMAL, $hWnd)
TraySetState(2)
            ;MsgBox(64, "SpecialEvent-Info", "Secondary mouse button clicked.")
    EndSelect
EndFunc   ;==>SpecialEvent

Func ExitEvent()
    Exit
EndFunc   ;==>ExitEvent

“No other God have I but Thee; born in a manger, died on a tree.” Martin Luther

  • Moderators
Posted

rdwray,

Necroing a nigh-on 7 year old thread is NOT something we encourage - please do not make a habit of it. :oops:

And before you argue - you can see that the beta version at the time was v3.1.1.66. That is now so outdated that I am really quite surprised that the code still worked. :bye:

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

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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