Jump to content

Recommended Posts

Posted

@MrCreator: But I like thinking! Lol, and I did... looked at select instead of switch muttley I stand corrected :)

Regards,Josh

  • Replies 72
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Well thanks to you guys and all of your help I finally got it working. muttley But i would still like to know how to handle my TrayGetMsg() events when using Switch. An example could help. More info on this question is in my previous post.

Posted

how will I handle my TrayGetMsg() in addition to my GUIGetMsg() events?

You can add TrayGetMsg() to GUIGetMsg():

#include <GuiConstantsEx.au3>

Opt("TrayMenuMode", 1)

$Exit_TrayItem = TrayCreateItem("Exit")

$GUI = GUICreate("Test Script", 300, 200)

$Button = GUICtrlCreateButton("Button", 20, 40, 60, 20)

GUISetState(@SW_SHOW, $GUI)

While 1
    $nMsg = GUIGetMsg() + TrayGetMsg()
    
    Switch $nMsg
        Case $GUI_EVENT_CLOSE, $Exit_TrayItem
            Exit
        Case $Button
            ConsoleWrite("Button Event" & @LF)
    EndSwitch
WEndoÝ÷ Ø­¶­Â)ei×Zìm­ªZºÇ¢Ø^)mçºÇ­¬zÓ,«P´Ë ZJW§]º)m{ayû§rب*"¶+zÛ^®Ú!jwezØ^¶¶²z÷§¶Ì"¶®¢Ó§÷§¶«¨¶jy«­¢+Ø¥¹±Õ±ÐíÕ¥
½¹ÍѹÑÍà¹ÔÌÐì(¥¹±Õ±Ðí
½¹ÍѹÑ̹ÔÌÐì()=ÁÐ ÅÕ½ÐíQÉå5¹Õ5½ÅÕ½Ðì°Ä¤)=ÁÐ ÅÕ½ÐíQÉå=¹Ù¹Ñ5½ÅÕ½Ðì°Ä¤((ÀÌØíá¥Ñ}QÉå%Ñ´ôQÉå
ÉÑ%Ñ´ ÅÕ½Ðíá¥ÐÅÕ½Ðì¤)QÉå%ѵMÑ=¹Ù¹Ð ÀÌØíá¥Ñ}QÉå%Ñ´°ÅÕ½ÐíQÉåÙ¹ÑÌÅÕ½Ðì¤()QÉåMÑ
±¥¬ ÄØ¤)QÉåMÑ=¹Ù¹Ð ÀÌØíQIe}Y9Q}AI%5Ie=]8°ÅÕ½ÐíQÉåÙ¹ÑÌÅÕ½Ðì¤((ÀÌØíU$ôU%
ÉÑ ÅÕ½ÐíQÍÐMÉ¥ÁÐÅÕ½Ðì°ÌÀÀ°ÈÀÀ¤((ÀÌØí ÕÑѽ¸ôU%
Ñɱ
ÉÑ    ÕÑѽ¸ ÅÕ½Ðí   ÕÑѽ¸ÅÕ½Ðì°ÈÀ°ÐÀ°ØÀ°ÈÀ¤()U%MÑMÑÑ¡M]}M!=°ÀÌØíU$¤()]¡¥±Ä($ÀÌØí¹5ÍôU%Ñ5Í ¤($(%MÝ¥Ñ ÀÌØí¹5Í($%
ÍÀÌØíU%}Y9Q}
1=M($$%á¥Ð($%
ÍÀÌØí  ÕÑѽ¸($$%
½¹Í½±]É¥Ñ ÅÕ½Ðí    ÕÑѽ¸Ù¹ÐÅÕ½ÐìµÀì1¤(%¹MÝ¥Ñ )]¹()Õ¹QÉåÙ¹ÑÌ ¤(%MÝ¥Ñ QIe}%($%
ÍÀÌØíá¥Ñ}QÉå%Ñ´($$%á¥Ð($%
ÍÀÌØíQIe}Y9Q}AI%5Ie=]8($$%U%MÑMÑÑ¡M]}IMQ=I°ÀÌØíU$¤(%¹MÝ¥Ñ )¹Õ¹

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted

What if I wanted to set to all of the icons an "On Top" attribute?

It's already have:

WinSetOnTop($ahInput[$ahInput[0][0]][0], "", 1)

muttley

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Posted (edited)

MrCreator:

What if I want to do simulate this whole idea, but with different image files. The only way I could think of doing this is a completely retarded ass way where I keep making new functions for every image file.

I know there's a perfect method and solution to handle this.

Could you help me?

Thanks

Edited by nowagain
Posted (edited)

MrCreator:

How do I add functionality for new menu items?

Edit: Just figured it out moments ago.

But I am still having trouble with the problem in this post ( A few posts above)

Edited by IWantIt
Posted (edited)

And whats the variable handle to all the windows. I tried hide ALL the icons by doing this:

WinSetState($ahInput[$ahInput[0][0]][0], "", @SW_HIDE)

and it didn't work...it just hides the last one created.

Edited by IWantIt
Posted

And whats the variable handle to all the windows. I tried hide ALL the icons by doing this:

WinSetState($ahInput[$ahInput[0][0]][0], "", @SW_HIDE)

and it didn't work...it just hides the last one created.

Seems a strange question. You set the state of the last window to @SW_HIDE and it becomes hidden. So having seen that why not try and set the first one to hidden and see what happens?

There is no variable handle to all the windows, there is a handle for each window. The only way I know of to hide a group of windows using one handle is if the group of windows are children and then hiding the parent also hides the children.

To set tooltips add a line in the CreateDragIp function

$ahInput[$ahInput[0][0]][1] = GUICtrlCreatePic(@SystemDir & "\oobe\images\merlin.gif", 0, 0, 26, 26, -1)
 GUICtrlSetTip(-1,"image No. " & $ahInput[0][0]);<------------add a line here
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Posted

Thanks for the tooltip info but I don't know how to hide the first one. Would I have to loop through all of the window handles with For and then hide the first one in the loop?

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...