Guest rbartleman Posted January 10, 2005 Share Posted January 10, 2005 Basically what I'm trying to do is open a specific website inside of the GUI (I got the idea from the doppler script) and be able to use it like normal but when i click minimize i want it to go to the tray. Does that make sense? The website has a popup to let me know when someone is viewing my site and I'd like the popup to still show on my screen even if the "web site" is minimized to the system tray. Any ideas on this? Link to comment Share on other sites More sharing options...
Wolvereness Posted January 10, 2005 Share Posted January 10, 2005 This forum is for 'Scripts/Scraps', meaning you submit works that you have done. Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote] Link to comment Share on other sites More sharing options...
Guest rbartleman Posted January 11, 2005 Share Posted January 11, 2005 I am using the below script with autohotkey and it does almost exactly what I am looking for, but I want to use autoit because I think it is a better product... does anyone know how to convert this or want to help me? if not heres a helpful script that works with an autoit clone; Minimize Window to Tray Menu; http://www.autohotkey.com; This script assigns a hotkey of your choice to hide any window so that; it becomes an entry at the bottom of the script's tray menu. Hidden; windows can then be restored individually or all at once by selecting; the corresponding item on the menu. If the script exits for any reason,; all the windows that it hid will be restored automatically.; CONFIGURATION SECTION: Change the below values as desired.; This is the maximum number of windows to allow to be hidden (having a; limit helps performance):mwt_MaxWindows = 50; This is the hotkey used to hide the active window:mwt_Hotkey = #h ; Win+H; If you prefer to have the tray menu empty of all the standard items,; such as Help and Pause, use N. Otherwise, use Y:mwt_StandardMenu = N; These next few performance settings help to keep the action within the; #HotkeyModifierTimeout period, and thus avoid the need to release and; press down the hotkey's modifier if you want to hide more than one; window in a row. These settings are not needed you choose to have the; script use the keyboard hook via #InstallKeybdHook or other means:#HotkeyModifierTimeout 100SetWinDelay 10SetKeyDelay 0#SingleInstance ; Allow only one instance of this script to be running.; END OF CONFIGURATION SECTION (do not make changes below this point; unless you want to change the basic functionality of the script).Hotkey, %mwt_Hotkey%, mwt_Minimize; If the user terminates the script by any means, unhide all the; windows first:OnExit, mwt_RestoreAllThenExitif mwt_StandardMenu = Y Menu, Tray, Addelse{ Menu, Tray, NoStandard Menu, Tray, Add, E&xit and Restore All, mwt_RestoreAllThenExit}Menu, Tray, Add, &Restore All Hidden Windows, mwt_RestoreAllMenu, Tray, Add ; Another separator line to make the above more special.if a_AhkVersion = ; Since it's blank, version is older than 1.0.22. mwt_MaxLength = 100else mwt_MaxLength = 260 ; Reduce this to restrict the width of the menu.return ; End of auto-execute section.mwt_Minimize:if mwt_WindowCount >= %mwt_MaxWindows%{ MsgBox No more than %mwt_MaxWindows% may be hidden simultaneously. return}; Set the "last found window" to simplify and help performance.; Since in certain cases it is possible for there to be no active window,; a timeout has been added:WinWait, A,, 2if ErrorLevel <> 0 ; It timed out, so do nothing. return; Otherwise, the "last found window" has been set and can now be used:WinGet, mwt_ActiveID, IDWinGetTitle, mwt_ActiveTitleWinGetClass, mwt_ActiveClassif mwt_ActiveClass in Shell_TrayWnd,Progman{ MsgBox The desktop and taskbar cannot be hidden. return}; Because hiding the window won't deactivate it, activate the window; beneath this one (if any). I tried other ways, but they wound up; activating the task bar. This way sends the active window (which is; about to be hidden) to the back of the stack, which seems best:Send, !{esc}; Hide it only now that WinGetTitle/WinGetClass above have been run (since; by default, those commands cannot detect hidden windows):WinHide; If the title is blank, use the class instead. This serves two purposes:; 1) A more meaningful name is used as the menu name.; 2) Allows the menu item to be created (otherwise, blank items wouldn't; be handled correctly by the various routines below).if mwt_ActiveTitle = mwt_ActiveTitle = ahk_class %mwt_ActiveClass%; Ensure the title is short enough to fit. mwt_ActiveTitle also serves to; uniquely identify this particular menu item.StringLeft, mwt_ActiveTitle, mwt_ActiveTitle, %mwt_MaxLength%; In addition to the tray menu requiring that each menu item name be; unique, it must also be unique so that we can reliably look it up in; the array when the window is later unhidden. So make it unique if it; isn't already:Loop, %mwt_MaxWindows%{ if mwt_WindowTitle%a_index% = %mwt_ActiveTitle% { ; Match found, so it's not unique. ; First remove the 0x from the hex number to conserve menu space: StringTrimLeft, mwt_ActiveIDShort, mwt_ActiveID, 2 StringLen, mwt_ActiveIDShortLength, mwt_ActiveIDShort StringLen, mwt_ActiveTitleLength, mwt_ActiveTitle mwt_ActiveTitleLength += %mwt_ActiveIDShortLength% mwt_ActiveTitleLength += 1 ; +1 the 1 space between title & ID. if mwt_ActiveTitleLength > %mwt_MaxLength% { ; Since menu item names are limted in length, trim the title ; down to allow just enough room for the Window's Short ID at ; the end of its name: TrimCount = %mwt_ActiveTitleLength% TrimCount -= %mwt_MaxLength% StringTrimRight, mwt_ActiveTitle, mwt_ActiveTitle, %TrimCount% } ; Build unique title: mwt_ActiveTitle = %mwt_ActiveTitle% %mwt_ActiveIDShort% break }}; First, ensure that this ID doesn't already exist in the list, which can; happen if a particular window was externally unhidden (or its app unhid; it) and now it's about to be re-hidden:mwt_AlreadyExists = nLoop, %mwt_MaxWindows%{ if mwt_WindowID%a_index% = %mwt_ActiveID% { mwt_AlreadyExists = y break }}; Add the item to the array and to the menu:if mwt_AlreadyExists = n{ Menu, Tray, add, %mwt_ActiveTitle%, RestoreFromTrayMenu mwt_WindowCount += 1 Loop, %mwt_MaxWindows% ; Search for a free slot. { ; It should always find a free slot if things are designed right. if mwt_WindowID%a_index% = ; An empty slot was found. { mwt_WindowID%a_index% = %mwt_ActiveID% mwt_WindowTitle%a_index% = %mwt_ActiveTitle% break } }}returnRestoreFromTrayMenu:Menu, Tray, delete, %A_ThisMenuItem%; Find window based on its unique title stored as the menu item name:Loop, %mwt_MaxWindows%{ if mwt_WindowTitle%a_index% = %A_ThisMenuItem% ; Match found. { StringTrimRight, IDToRestore, mwt_WindowID%a_index%, 0 WinShow, ahk_id %IDToRestore% WinActivate ahk_id %IDToRestore% ; Sometimes needed. mwt_WindowID%a_index% = ; Make it blank to free up a slot. mwt_WindowTitle%a_index% = mwt_WindowCount -= 1 break }}returnmwt_RestoreAllThenExit:Gosub, mwt_RestoreAllExitApp ; Do a true exit.mwt_RestoreAll:Loop, %mwt_MaxWindows%{ if mwt_WindowID%a_index% <> { StringTrimRight, IDToRestore, mwt_WindowID%a_index%, 0 WinShow, ahk_id %IDToRestore% WinActivate ahk_id %IDToRestore% ; Sometimes needed. ; Do it this way vs. DeleteAll so that the sep. line and first ; item are retained: StringTrimRight, MenuToRemove, mwt_WindowTitle%a_index%, 0 Menu, Tray, delete, %MenuToRemove% mwt_WindowID%a_index% = ; Make it blank to free up a slot. mwt_WindowTitle%a_index% = mwt_WindowCount -= 1 } if mwt_WindowCount = 0 break}return Link to comment Share on other sites More sharing options...
Developers Jos Posted January 11, 2005 Developers Share Posted January 11, 2005 (edited) mmmmmmm ... AutoHotKey Script and Scrap ...... curious what comments this is going to trigger Edited January 11, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Guest rbartleman Posted January 11, 2005 Share Posted January 11, 2005 (edited) blah blah everyone keeps making comments but nobody is helping me with a solution... if I shouldn't be posting this in here, where should I? and if nobody wants to help than thats probably a good reason not to use autoit... It's a simple question, can anyone help me and if not does anyone know how to convert an autohotkey script? instead of saying this forum is for scripts/scraps (doesn't imply completed scripts) meaning you submit scraps you have done (again I thought this forum was about scripts (period) not just ones that are done, people usually get better at writing scripts when they get help or feedback... if you don't think the the script I am asking for is beneficial to anyone just say so) p.s. search google for minimize to tray script and it appears thouands of people are interested... Edited January 11, 2005 by rbartleman Link to comment Share on other sites More sharing options...
para Posted January 11, 2005 Share Posted January 11, 2005 If your going to ask for help, don't be rude about it. The people are not answering your question simply because the people who come to this part of the forum are not here to help you. Post in the SUPPORT forum because you need SUPPORT. Saying blah blah and attempting to demine what the people here do is not the best way to get help, make a new topic in the support forum... -Para Link to comment Share on other sites More sharing options...
Josbe Posted January 11, 2005 Share Posted January 11, 2005 At the moment, Tray functions aren't available. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Developers Jos Posted January 11, 2005 Developers Share Posted January 11, 2005 (edited) blah blah everyone keeps making comments but nobody is helping me with a solution... if I shouldn't be posting this in here, where should I? and if nobody wants to help than thats probably a good reason not to use autoit... It's a simple question, can anyone help me and if not does anyone know how to convert an autohotkey script? instead of saying this forum is for scripts/scraps (doesn't imply completed scripts) meaning you submit scraps you have done (again I thought this forum was about scripts (period) not just ones that are done, people usually get better at writing scripts when they get help or feedback... if you don't think the the script I am asking for is beneficial to anyone just say so) p.s. search google for minimize to tray script and it appears thouands of people are interested...<{POST_SNAPBACK}>In general the regulars on this forum don't know and probably don't care much about AHK so won't be much of help for you.As to this forum qualifying for this post... short answer: i guess it does if this script is useful for the AutoIt community.... is it ?Don't get upset when you don't get an strait answer right away... if there is one you will get it in general on these forums...... Edited January 11, 2005 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
therks Posted January 11, 2005 Share Posted January 11, 2005 Basically what I'm trying to do is open a specific website inside of the GUI (I got the idea from the doppler script)<{POST_SNAPBACK}>I don't believe we have a way to load a browser window in the GUI objects yet. What is the doppler script you're talking about? Did you mean this script/post? That script is getting just an image from a specific site, and then displaying that in the GUI, not the webpage itself. If that's what you want (although that's not what it sounds like you're looking for) then it's quite easy. But otherwise, sorry, what you're looking for is currently unavailable, and I haven't heard any talks of putting a browser object into the GUI functions, so I don't know if it ever will be available.And remember, being rude and impatient will not get you very far.if nobody wants to help than thats probably a good reason not to use autoitIf you want to be helped, then first try helping yourself. With the exception of a few stupid posts that I've made, I always read the documentation before asking for help from other people. You have made no indication that you tried to help yourself. You just joined the forums, said, "Here's what I want" then got impatient when we didn't provide it for you.Also, big note here: As far as I know, AutoIt and AutoHotKey are not related in any way (save for the 'Auto' in the name).Sorry I couldn't help. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Wolvereness Posted January 12, 2005 Share Posted January 12, 2005 2 reasons,1st is 'YES YOU ARE IN WRONG FORUM' Try the 'Support' forum!2nd is 'More complex your problem is the fewer number of people that could help you'I can't make this any clearer and I don't want another "Please don't laugh-First script" (I know you were hinting that Jdeb) Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote] Link to comment Share on other sites More sharing options...
CyberSlug Posted January 12, 2005 Share Posted January 12, 2005 My first and last post in this thread. Use at own risk; the code could use improvements (such as using window handles instead of titles). Please read the header of the below code: expandcollapse popup; *** This code requires Holger's "special" AutoIt build. *** ; http://www.hiddensoft.com/fileman/users/public/Holger/Autoitspecial.zip ; The official AutoIt beta does not have customizable tray icon features. If Not HotKeySet("#h", "HideActiveWindow") Then Msgbox(4096,"Error", "Could not assign Win+H hotkey... Exiting.") EndIf Opt("TrayMenuMode",1);override default menu with own menu GuiCreate("Program to hide/restore windows") $quit = TrayCreateItem("E&xit and Restore All") $restore = TrayCreateItem("&Restore All Hidden Windows") $separator = TrayCreateItem('') Global $FIRST_ID = 1 + $separator Global $COUNT = 0 While 1 $trayMsg = TrayGetMsg() If $trayMsg = $quit Then ExitLoop If $trayMsg = $restore Then RestoreAllWindows() If $trayMsg >= $FIRST_ID And $trayMsg <= $FIRST_ID + $COUNT Then WinSetState( TrayGetItemText($trayMsg) , "", @SW_SHOW) TrayDelItem($trayMsg) EndIf WEnd RestoreAllWindows() Exit Func HideActiveWindow() Local $winTitle = WinGetTitle("") $id = TrayCreateItem($winTitle) $COUNT = $COUNT + 1 WinSetState($winTitle, "", @SW_HIDE) EndFunc Func RestoreAllWindows() Local $i For $i = $FIRST_ID to $FIRST_ID + $COUNT - 1 WinSetState( TrayGetItemText($i) , "", @SW_SHOW) TrayDelItem($i) Next EndFunc Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Developers Jos Posted January 12, 2005 Developers Share Posted January 12, 2005 Also, big note here: As far as I know, AutoIt and AutoHotKey are not related in any way (save for the 'Auto' in the name).<{POST_SNAPBACK}>Are you sure ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
therks Posted January 13, 2005 Share Posted January 13, 2005 Are you sure ? <{POST_SNAPBACK}>No I'm not, that's why I said, "As far as I know" My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now