Sign in to follow this  
Followers 0
Klexen

Can't get my program to minimize to tray.

4 posts in this topic

#1 ·  Posted (edited)

Can someone change my code to minimize to tray, then restore?

#include <GuiConstants.au3>
#include <Constants.au3>
#include &ÒQK]LÉÝÂÒ[ÛYH   Ñ[K]LÉÝÂÒ[ÛYH ÑÝZSÝY]Ë]LÉÝÂFÆ$Væ&ÆRgV÷C·7F÷FÖV÷WBgV÷C² ¤gVæ27F÷FÖV÷WB¢÷BgV÷Cµvå¥Ñ±5Ñ¡5½ÅÕ½Ðì°È¤(%]¥¹á¥ÍÑÌ ÅÕ½Ðí5¥É½Í½Ð%¹ÑɹÐáÁ±½ÉÈquot;, "Application timeout will occur in 10 minutes") Then ContrÛÛXÚÈ
    ][ÝÓZXÜÜÛÙ[]^Ü][ÝË ][ÝÉ][ÝËK   ][ÝÛYBgV÷C²Â¢bväW7G2gV÷Cµ6W76öâFÖRÖ÷WBÆW'BgV÷C²ÂgV÷Cµ÷WM8ÍÍÍ¥½¸¥Ì½ÕÐѼѥµ½ÕиÅÕ½Ðì¤Q¡¸
½¹Ñɽ±
±¥¬ ÅÕ½ÐíMÍÍ¥½¸ime-out alert", "", 6, "left", 1)
    If WinExists (&][ÝÙÚÝÜ[I][ÝÊH[Ú[ÛÜÙH
    ][ÝÙÚÝÜ[I][ÝÊBRYÚ[^G2gV÷CµvæF÷w267&B÷7BgV÷C²FVâvä6Æ÷6RgV÷CµvæF÷w267&B÷ÐÅÕ½Ðì¤(%M±À ÄÀ¤()¹Õ¹ìôôÐíÍѽÁÑ¥µ½ÕÐ(((ÀÌØí±¥ÍÐôAɽÍÍ1¥t ('SuperLaunch.exe')
If $list [0][0] > 1 Then
    ProcessCÜÙH
    ÌÎNÔÝ][Ú^IÌÎNÊB[YÛY
L
BÔXY[YÈÛH[H[Rà¤6öç7Bb33c¶FVÆÇ6W'gW6W"Òæ&VBgV÷C¶FVÆÇV6¶ÆVæ6æægV÷C²ÂÅÕ½Ðí±±MÉÙ1½¥¸ÅÕ½Ðì°ÅÕ½Ðí±±ÍÉÙ¥ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤)
½¹ÍÐÀÌ;dellservpass     = IniRead ("dellquicklaunch.ini ", "DellSeÙÚ[][ÝË ][ÝÑ[ÙÜÉ][ÝË ][ÝÉ][ÝÊBÛÛÝ ÌÍÙ[ÙFvRÒæ&VBgV÷C¶FVÆÇV6¶ÆVæ6æægV÷C²ÂgV÷C´FVÆÅ6W'dÆövâgV÷ì°ÅÕ½Ðí±±ÍÉÙÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤()
½¹ÍÐÀÌØíÕÍ¥½¹¥ÕÍÈôIniRead ("dellquicklaunch.ini", "FusionLogin", "FuÚ[ÝÙ][ÝË ][ÝÉ][ÝÊBÛÛÝ ÌÍÙÚ[ÛYÜÈH[TXY
    ][ÝÙVÆÇV6¶ÆVæ6æægV÷C²ÂgV÷C´gW6öäÆövâgV÷C²ÂgV÷C´gW6öç72gV÷C²ÂÅÕ½ÐìÅÕ½Ðì¤()
½¹ÍÐÀÌØíM
ÁÑ $$ô%¹¥I ÅÕ½Ðí±±ÅÕ¥­±Õ¹ ¹¥¹¤uot;, "DellConnect", "Dellconnectpath", "")
CÛÝ   ÌÍÔÑÝÙBOH[TXY
    ][ÝÙ[]ZXÚÛ][Ú[I][ÝË  ][ÝÑÆÄ6öææV7BgV÷C²ÂgV÷C´FVÆÆ6öææV7EW6W"gV÷C²ÂgV÷C²gV÷C² ¤6öç7Bb33c¶WFµÕÍÈ$ô%¹¥I ÅÕ½Ðí±±ÅÕ¥­±Õ¹ ¹¥¹¤ÅÕ½Ðì°ÅÕ½ÐíÑ¥µÅÕ½Ðì°"EtimeUser", "")
Const $etimepass        = IniRead   ][ÝÙ[]ZXÚÛ][Ú[I][ÝË  ][ÝÑ][YI][ÝË    ][ÝÑ][YTÜÉ][ÝËgV÷C²gV÷C²  ¢b33c´uTôÖâÒuT7&VFRgV÷C´FVÆÂV6²ÆVæ6gV÷C²ÂÈÔ°ÈäÔ°´Ä°´Ä° ¥Ñ=H ÀÌØí]M}=YI1AA]%9=°ÀÌØí]M}
1%AM%   1%9L¤¤)USetBkColor (0x111111)

GUICtrlCreateGroup ("Super Launch", 5, 3, LJBÕRPÝÙ]ÛÛÜ
LK
BÕRPÝÜX]QÜÝ
    ][ÝÐÛÛZ[ÈööâgV÷C²ÂÂ2ÂÂ#3R¤uT7G&Å6WD6öÆ÷"ÓÂdc ¤uT7G&Ä7&VFTÆ° ÅÕ½Ðí äè)ͽ¸-¥¹Í±äÅÕ½Ðì°Ô°ÈÜà°ÄÔÀ¤)U%
ÑɱMÑ
½±½È ´Ä°ÁáÀ00)

;----------Buttons---------;
$LaunchIDD1         = GUICtrlCreateB]Û
    ][ÝÔÛÙÛI][ÝËLK

BÌÍÐÚXÚØÞQHOHÕRPÝÜVFT6V6¶&÷gV÷C²gV÷C²ÂÂ#ÂR ¢b33c´ÆVæ6FÖU7F×ÒuT7G&ÄÉÑ   ÕÑѽ¸ ÅÕ½ÐíQ¥µMѵÀÅÕ½Ðì°ÄÀ°ÔÔ°ØФ(ÀÌØí
¡­½áQ¥µMѵÀôGUICtrlCreateCheckbox ("", 80, 59, 15)

$LaunchFusion1      = ÕRPÝÜX]P]Û
    ][ÝÑÚ[Û][ÝËL
K

BÌÍÐÚXÚØÞÚ[ÛHÒuT7G&Ä7&VFT6V6¶&÷gV÷C²gV÷C²ÂÂÂR ¢b33c´ÆVæ64D2U%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½ÐíMÕÁÈÅÕ½Ðì°ÄÀ°ÄÄÔ°ØФ(ÀÌØí
¡­½áM       = GUICtrlCreateCheckbox ("", 80, 115, 15)

$LaunchDSN1 HÕRPÝÜX]P]Û
    ][ÝÑÓ][ÝËLM
K

BÌÍÐÚXÚØÞ4ãÒuT7G&Ä7&VFT6V6¶&÷gV÷C²gV÷C²ÂÂCrÂR ¢b33c´ÆVæ6F±±ÍÉØÄôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí±±MÉØÅÕ½Ðì°ÄÀ°ÄÜÔ°ØФ(ÀÌØCheckboxDellserv1   = GUICtrlCreateCheckbox ("", 80, 175, 15)

&#ÍÓ][ÚÙXÝ]ÛÚÈHÕRPÝÜX]P]Û
    ][ÝÓÝ]ÛÚÉ][ÝËL
KcB¢b33c´6V6¶&÷vV$÷WFÆöö²ÒuT7G&Ä7&VFT6V6¶&÷gV÷C²gV÷C²ÂÂ#Ô°ÄÔ¤((ÀÌØí1Õ¹¡±°$$ôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½ÐíMÑÉÐ1Õ¹ ÅÕ½Ð, 10, 238, 90)

GuiSetState()


While 1

$msg = GuiGetMsg()
    ;Select
    ÝÚ]Ú ÌÍÛÙÂPØÙH    ÌÍÑÕRWÑUSÐÓÔÑBPÛX[^]

BPØÙH ÌÍÓ][ÚDC ÆVæ6DB 66Rb33c´ÆVæ6FÖU7F× ÆVæ6FÖU7F× 66Rb3Øí1Õ¹¡ÕÍ¥½¸Ä(%1Õ¹¡ÕÍ¥½¸ ¤(%
ÍÀÌØí1Õ¹¡M(%1Õ¹¡M ¤(%
Í36;LaunchDSN1
    LaunchDSN1()
    Case $LaunchDellserv1
    LaunchDellServ()
    ØÙH   ÌÍÓ][ÚÙXÝ]ÛÚÂS][ÚÙXÝ]ÛÚÊ
BPØÙH ÌÍÓ][Ú[S][6ÆÂ  ¤66RVÇ6P£²ÒÒÒÒÒÒÒÒÒÒÒÒÓ° VæE7vF6¥tVæ
Edited by Klexen

Share this post


Link to post
Share on other sites



@ Klexen ... Like this ?

#include <GuiConstants.au3>
#include <Constants.au3>
#include &ÒQK]LÉÝÂÒ[ÛYH   Ñ[K]LÉÝÂÒ[ÛYH ÑÝZSÝY]Ë]LÉÝÂÜBgV÷CµG&ÖVçTÖöFRgV÷C²Ã ¤FÆ$Væ&ÆRgV÷C·7F÷FÖV÷WBgV÷C² ¤gVæ2ÍѽÁÑ¥µ½ÕÐ ¤(=ÁÐ ÅÕ½Ðí]¥¹Q¥Ñ±5Ñ¡5½ÅÕ½Ðì°È¤(%]¥¹á¥ÍÑÌ quot;Microsoft Internet Explorer", "Application timeout will occu[LZ[]É][ÝÊH[ÛÛÛÛXÚÈ
    ][ÝÓZXÜÜÛÙ[]^ÜV÷C²ÂgV÷C²gV÷C²ÂÂgV÷C¶ÆVgBgV÷C²Â¢bväW7G2gV÷Cµ6W76öÑ¥µµ½ÕбÉÐÅÕ½Ðì°ÅÕ½Ðíe½ÕÈM8ÍÍÍ¥½¸¥Ì½ÕÐѼѥµ½ÕиÅÕ½Ðì¤hen ControlClick ("Session time-out alert", "", 6, &quoÛY    ][ÝËJBYÚ[^ÝÈ
    ][ÝÙÚÝÜ[I][ÝÊH[Ú[ÛÜÙH
gV÷C¶FW6·F÷æægV÷C²¢bväW7G2gV÷CµvæF÷w267&B÷7BgV÷C²Ñ¡¸]¥¹
±½Í ÅÕ½Ðí]¥¹½ÝÌMÉ¥ÁÐ!½ÍÐÅÕ½Ðì¤(M±À ÄÀ¤()¹Õ¹ì=>stoptimeout


$list = ProcessList ('SuperLaunch.exe')
If ÌÍÛÝÌVÌH   ÝÈH[ØÙÜÐÛÜÙH
    ÌÎNÔÝ][Ú^IÌÎNÊBæD`¥6ÆVW £µ&VBfÇVW2g&öÒæfÆRà¤6öç7Bb33c¶FVÆÇ6W'gW6W"Ò%¹¥I ÅÕ½Ðí±±ÅÕ¥­±Õ¹ ¹¥¹¤ÅÕ½Ðì°ÅÕ½Ðí±±MÉÙ1½¥¸ÅÕ½Ðì°ÅÕ½Ðíellservid", "")
Const $dellservpass     = IniRead (&quoÙ[]ZXÚÛ][Ú[H ][ÝË  ][ÝÑ[ÙÙÚ[][ÝË    ][ÝÑ[ÙÜÉV÷C²ÂgV÷C²gV÷C²¤6öç7Bb33c¶FVÆÇ6W'f&FvRÒæ&VBgV÷C¶FVÆÇV6±Õ¹ ¹¥¹¤ÅÕ½Ðì°ÅÕ½Ðí±±MÉÙ1½¥¸ÅÕ½Ðì°ÅÕ½Ðí±±ÍÉÙÅÕ½Ðì°ÅÕt;")

Const $fusionidduser    = IniRead ("dellquicklaunch.inI][ÝË   ][ÝÑÚ[ÛÙÚ[][ÝË  ][ÝÑÚ[ÝÙ][ÝË ][ÝÉ][ÝÊBÛÛÝb33c¶gW6öæFG72Òæ&VBgV÷C¶FVÆÇV6¶ÆVæ6æægV÷C²ÂgV÷C´gÍ¥½¹1½¥¸ÅÕ½Ðì°ÅÕ½ÐíÕÍ¥½¹ÁÍÌÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤()
½¹ÍÐÀÌØíM
ÁÑ         = IniRead ("dellquicklaunch.ini", "DellConnect"    ][ÝÑ[ÛÛXÝ] ][ÝË  ][ÝÉ][ÝÊBÛÛÝ ÌÍÔÑÝÙH[&VBgV÷C¶FVÆÇV6¶ÆVæ6æægV÷C²ÂgV÷C´FVÆÄ6öææV7BgV÷C²ÂgV÷C´FVÆƽ¹¹ÑUÍÈÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤()
½¹ÍÐÀÌØíÑ¥µÕÍÈô%¹¥I Åot;dellquicklaunch.ini", "Etime", "EtimeUser", &quÝÉ][ÝÊBÛÛÝ  ÌÍÙ][YÜÈH[TXY
    ][ÝÙ[]ZXÚÛ][Ú[gV÷C²ÂgV÷C´WFÖRgV÷C²ÂgV÷C´WFÖU72gV÷C²ÂgV÷C²gV÷C²  ¢b33c´uT5¥¸ôU%
ÉÑ ÅÕ½Ðí±°EÕ¥¬1Õ¹ ÅÕ½Ðì°ÈÈÔ°ÈäÔ°´Ä°´Ä°    ¥Ñ=H À6;WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))
GUISetBkColor (0x111111)

GUPÝÜX]QÜÝ
    ][ÝÔÝ][Ú    ][ÝË
KËLJBÕRPÝÙ]ÛÛÜÓÂdc ¤uT7G&Ä7&VFTw&÷WgV÷C´6öÖær6ööâgV÷C²ÂÂ2ÂÂ#Ô¤)U%
ÑɱMÑ
½±½È ´Ä°ÁáÀÀÀÀ¤()U%
Ñɱ
ÉÑ1° ÅÕ½Ðí  äè)ͽ¸-¥¹ley", 5, 278,150)
GUICtrlSetColor (-1, 0xFF0000)

;----------Buttons--KKKKKKNÂÌÍÓ][ÚQHHÕRPÝÜX]P]Û
    ][ÝÔÛÙÛI]÷C²ÂÂ#RÂcB¢b33c´6V6¶&÷DCÒuT7G&Ä7&VFT6V6¶&÷gV÷C²g½Ðì°àÀ°Èä°ÄÔ¤((ÀÌØí1Õ¹¡Q¥µMѵÀôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½ÐíQ¥µ Stamp", 10, 55, 64)
$CheckboxTimeStamp  = GUICtrlCreateCheckbox     ][ÝÉ][ÝË
NKMJBÌÍÓ][ÚÚ[ÛHHÕRPÝÜX]P]ÛgV÷C´gW6öâgV÷C²ÂÂRÂcB¢b33c´6V6¶&÷gW6öãÒuT7G&Ä7&VFT6­½à ÅÕ½ÐìÅÕ½Ðì°àÀ°äÄ°ÄÔ¤((ÀÌØí1Õ¹¡MôU%
Ñɱ
ÉÑ    ÕÑon ("Super DC", 10, 115, 64)
$CheckboxSDC        = GUICtrlCrX]PÚXÚØÞ
    ][ÝÉ][ÝËLMKMJBÌÍÓ][ÚÓHHÕRPÝ7&VFT'WGFöâgV÷C´E4âgV÷C²ÂÂCRÂcB¢b33c´6V6¶&÷E4ãÒuT7ɱ
ÉÑ
¡­½à ÅÕ½ÐìÅÕ½Ðì°àÀ°ÄÐÜ°ÄÔ¤((ÀÌØí1Õ¹¡±±ÍÉØÄôICtrlCreateButton ("DellServ", 10, 175, 64)
$CheckboxDellserHHÕRPÝÜX]PÚXÚØÞ
    ][ÝÉ][ÝËMÍKMJBÌÍÓ][ÚÙXÝ]Æöö²ÒuT7G&Ä7&VFT'WGFöâgV÷C´÷WFÆöö²gV÷C²ÂÂ#RÂcB¢b33c´6V6½á]=Õѱ½½¬ôU%
Ñɱ
ÉÑ
¡­½à ÅÕ½ÐìÅÕ½Ðì°àÀ°ÈÀÔ°ÄÔ¤((ÀÌØí1unchAll          = GUICtrlCreateButton ("Start Launch", 10, 238, L
BÝZTÙ]Ý]J
BËKKKU^HY[KKKBÌÍÔÚÝÈH^PÜX]R][J  ÌÎNÓZ[Ö¦Rb33²¥G&7&VFTFVÒgV÷C²gV÷C²¢b33c¶WBÒG&7&VFTFVÒgV÷C´W¥ÐÅÕ½Ðì¤)QÉåMÑMÑÑ ¤((()]¡¥±Ä(ÀÌØíѵÍôQÉåÑ5Í ¤(MÝ¥Ñ $tmsg
        Case $Show
            If TrayItemGetText($Show) = 'RestÜIÌÎNÈ[BBBQÕRTÙ]Ý]JÕ×ÔÒÕË ÌÍÑÕRWÓXZ[BBHÕRTÙ]Ý]5uõ$U5Dõ$RÂb33c´uTôÖâ vä7FfFRb33c´uTôÖâÂb33²b33² $QÉå%ѵMÑQáÐ ÀÌØíM¡½Ü°Ìäí5¥¹¥µ¥éÌäì¤($$%±Í%QÉå%ѵÑQt($Show) = 'Minimize' Then
                GUISetState(@SW_HIDE, &#0ÍÑÕRWÓXZ[BBH^R][TÙ]^
    ÌÍÔÚÝË    ÌÎNÔÝÜIÌÎNÊBBBQ[`¢66Rb33c¶W@¢W@£·â6ÆVäWB¢VæE7vF6$ÀÌØíµÍôÕ¥Ñ5Í ¤(MÝ¥Ñ ÀÌØíµÍ(%
ÍÀÌØíU%}Y9Q}5%9%5%i
        GUISetState(@SW_HIDE, $GUI_Main)
        TrayItemSetText($Show,'ÝÜIÌÎNÊBØÙH   ÌÍÑÕRWÑUSÐÓÔÑB^]ßÛX[^]

¢66Rb33c´ÆVæ6DC£·âÆVæ6DB¢66Rb33c´ÆVæ6FÖU7F×(íø1Õ¹¡Q¥µMѵÀ ¤(
ÍÀÌØí1Õ¹¡ÕÍ¥½¸Ä(íø1Õ¹¡ÕÍ¥½¸ 
    Case $LaunchSDC
;~     LaunchSDC()
    Case $LaunchDSN1
;~  ][ÚÓJ
BØÙH  ÌÍÓ][Ú[ÙBß][Ú[Ù
B6Rb33c´ÆVæ6vV$÷WFÆöö°£·âÆVæ6vV$÷WFÆöö²¢66Rb33c´ÆVæ6°(íø1Õ¹¡±° ¤(()
ͱÍ(ì´´´´´´´´´´´´´ì(¹MÝ¥Ñ )]¹

Share this post


Link to post
Share on other sites

@ Klexen ... Like this ?

Yeah just like that. :rolleyes: I could not get it to work for some reason. When it would go to tray the buttons wouldnt work. ANother time it would go to tray and when you restore it the program would just pop right back down to tray.

Anyways, thanks a lot!

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
Sign in to follow this  
Followers 0