souldjer777 Posted November 2, 2011 Posted November 2, 2011 Hi all, I have a strange issue... we have a ticker that displays the latest info 24x7... Problem is - when someone updates the ticker - it automatically minimizes itself. How can I keep autoit running in the taskbar to monitor and then maximize this window / program if it's ever minimized. This ticker shows us vital information so we need it displayed 24x7 Thanks yall! I checked your forums and couldn't find anything like this... sry if I'm being ri-donk-ulus "Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet"Song Title: I guess you could sayArtist: Middle Class Rut
Moderators Melba23 Posted November 2, 2011 Moderators Posted November 2, 2011 souldjer777,Something along these lines should work: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("Test", 500, 500, -1, -1, BitOr($GUI_SS_DEFAULT_GUI, $WS_MAXIMIZEBOX)) GUICtrlCreateLabel("Try to minimize me!", 10, 10, 400, 400) GUICtrlSetFont(-1, 48) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch ; See if the GUI is minimized If BitAND(WinGetState($hGUI), 16) Then ; And maximize it if it was WinSetState($hGUI, "", @SW_MAXIMIZE) EndIf WEndRemember that if you do not have a GUI you will need a Sleep(10) in the loop in place of the GUIGetMsg so you do not max out the CPU. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
kaotkbliss Posted November 2, 2011 Posted November 2, 2011 While 1 ;will create an infinate loop $state = WinGetState("your ticker window name here") ;gets the state of your ticker window If BitAnd($state, 16) Then ;if it's minimized WinSetState("your ticker window name here","",@SW_RESTORE) ;restore it EndIf Sleep(10) ;small sleep to save resources Wend 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
Moderators Melba23 Posted November 2, 2011 Moderators Posted November 2, 2011 kaotkbliss, Great minds! M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
kaotkbliss Posted November 2, 2011 Posted November 2, 2011 Curse you Melba, you beat me to it! LOL 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
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