Recently Browsing 0 members
No registered users viewing this page.
Cannot find example how to locate taskbar icon coordinates or position by window handle.
I want to use PixelChecksum to check only rectangle area over specified taskbar item.
What I already have found and succesfully run for whole taskbar area:
$taskbar = WinGetHandle("[Class:Shell_TrayWnd]") $taskbarPos = WinGetPos($taskbar) $tasklistPos = ControlGetPos($taskbar, "", "[CLASS:MSTaskListWClass; INSTANCE:1]") $iOldCheckSum = PixelChecksum($taskbarPos + $tasklistPos, $taskbarPos + $tasklistPos, $taskbarPos + $tasklistPos, $taskbarPos + $tasklistPos);
I know also that I can pass window handle as parameter to PixelChecksum, but don't know how to do this with taskbar icon.
Also I was able to find something similar but seems outdated: WatchWindows
thanks in advance
Is it possible to compile script without any icon resources included?
When I make exe it uses default system icon of current OS even if I compile as console application.
On other versions of Windows it looks a little strange
It seems that the only way is remove icons from exe after compilation using resource editors like ResHacker.
another bad solution:
Using corrupted 35 bytes icon file. Windows can't load it and shows default system icon.
#pragma compile(Icon, broken.ico) broken.ico
ICU - Icon Configuration Utility
Current Version: v6 (2018-Sep-16)
Restore your desktop when the icons get "rearranged".
Melba23 and I found we were working on very similar ideas to restore the Desktop icons to their normal place if they became "rearranged" (
). Vista seems to like this doing on occasion just for fun - but we all know some apps and games which change the display resolution or move icons around. This annoys "tidy" people who like their desktops arranged "just so" - I am particularly thinking of this desktop when I say that!
We combined efforts and here is the result of our labors.
Operation is easy - press "Save" to store a particular configuration and "Restore" to reset the icons to the saved positions in the selected configuration file. "Delete" allows you to remove unwanted configuration files from the list. There is a command line option so that the restoration can be run via HotKeys if required (that is why the script warns that it should be compiled for full functionality). You can decide what to do with any icons that have been added since you last saved the configuration file - the default is to put them in the top-left corner, but you can also banish them way off-screen or, more sensibly, specify a location for them.
A new feature as of ICU v3.4 is the optional Desktop Contextmenu Integration (DCI) for Win7 (Win7 only because Microsoft implemented an easy way to do this through the registry as of this release).
Version 3.3 should fix the empty save file bug
Version 3.4 Win7: Admin rights no longer needed for DCI
Version 5.0 Win8 compatibility for DCI
The source and executable can be downloaded from my site: http://www.funk.eu
Kudos to Ascend4nt, Melba23, Prog@ndy, & Valik for parts of the code.
Please let me know if you found some piece of code in the source for which I forgot to mention a credit.
Enjoy, let me know what you think of ICU and with Best Regards
Good evening everyone
First, I want to apologize with you for the title not very clear, but I thought a little bit on which title to set at the thread, and this is the one that came in mind.
Now, let me explain what I'm trying to understand.
I am making an application ( with n clients ), with an SQLite Database, which has a Main form, and n sub-forms...
Since these sub-forms are called several times, because they are used to add or update records to the Database, I put the code that generates the GUI of these sub-forms in Functions.
There are two sub-forms which are "treated" as two main forms, since even them have n sub-forms, which perform various tasks.
Where am I stucked?
For the Main form I created a Status Bar, in order to display messages ( add/delete/update/search results ), and it works perfectly with all the forms which don't have other sub-forms.
For the two forms, which indeed have n sub-forms, I created two separated Status Bars, which are (re)created everytime I call the function that then displays the form.
Practically, I can't set icons to these two Status Bars, and I don't know why.
I'm really sorry that I don't feel clear enough, so, here you are an example of what I am saying.
I recreated exactly what my script does:
#include <GuiButton.au3> #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) Global $frmSubForm, _ $txtSubFormField, _ $sbSubFormStatusBar, _ $objSB_IconError = _WinAPI_LoadShell32Icon(109), _ $objSB_IconInformation = _WinAPI_LoadShell32Icon(277) #Region ### START Koda GUI section ### Form= $frmMainForm = GUICreate("Main Form", 300, 300, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "ExitApplication") $sbMainStatusBar = _GUICtrlStatusBar_Create($frmMainForm) $btnCreateSubForm = GUICtrlCreateButton("Create Sub Form", 105, 110, 75, 41, BitOR($BS_CENTER,$BS_VCENTER,$BS_MULTILINE)) GUICtrlSetOnEvent(-1, "GenerateSubForm") GUICtrlSetFont(-1, 10, 400, 0, "Arial") _GUICtrlStatusBar_SetSimple($sbMainStatusBar) _GUICtrlStatusBar_SetText($sbMainStatusBar, "") GUISetState(@SW_SHOW, $frmMainForm) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func ExitApplication() Exit EndFunc Func GenerateSubForm() #Region ### START Koda GUI section ### Form= $frmSubForm = GUICreate("Sub-Form", 300, 300, -1, -1, -1, -1, $frmMainForm) GUISetOnEvent($GUI_EVENT_CLOSE, "DeleteSubForm") $txtSubFormField = GUICtrlCreateInput("", 0, 0, 100, 20) $btnCheckSubFormField = GUICtrlCreateButton("Check Field", 105, 110, 75, 41, BitOR($BS_CENTER,$BS_VCENTER,$BS_MULTILINE)) GUICtrlSetOnEvent(-1, "CheckSubFormField") GUICtrlSetFont(-1, 10, 400, 0, "Arial") $sbSubFormStatusBar = _GUICtrlStatusBar_Create($frmSubForm) _GUICtrlStatusBar_SetSimple($sbSubFormStatusBar) _GUICtrlStatusBar_SetText($sbSubFormStatusBar, "") GUISetState(@SW_SHOW, $frmSubForm) GUISetState(@SW_DISABLE, $frmMainForm) #EndRegion ### END Koda GUI section ### EndFunc Func DeleteSubForm() ; Declared Globally => $frmSubForm GUIDelete($frmSubForm) GUISetState(@SW_ENABLE, $frmMainForm) EndFunc Func WriteToStatusBar($sbStatusBar, $objSB_Icon, $strText) _GUICtrlStatusBar_SetIcon($sbStatusBar, 0, $objSB_Icon) _GUICtrlStatusBar_SetText($sbStatusBar, $strText) ConsoleWrite("Icon Handle: " & $objSB_Icon & @CRLF) EndFunc Func CheckSubFormField() ; Declared Globally => $txtSubFormField If GUICtrlRead($txtSubFormField) = "" Then ; Declared Globally => $sbStatusBar WriteToStatusBar($sbSubFormStatusBar, $objSB_IconError, "Field NOK.") Else WriteToStatusBar($sbSubFormStatusBar, $objSB_IconInformation, "Field OK.") EndIf EndFunc The text is set, but icon is not.
Could someone please tell me why?
Thanks everyone in advance