SysInfo in Task bar v3.0
It did not. The Gui appears for a fraction of a second, only, and not on top of the SysInfo toolbar, but at the location specified by moduleX, moduleY. I wonder, if it is a problem because my TaskBar is on the left, not on the bottom of the screen.
Hmm, where the taskbar is should not be a problem.
Try this it uses the default "Quick Launch" toolbar.
Code removed
This works, perfectly. I put in a test MsgBox. In the SysInfo version it shows the control as ToolbarWindow325. The Quick Launch version shows ToolbarWindow322.
Now we are getting somewhere , if you move the "Quick Launch" toolbar does the script follow?
The name of the control should not matter just the text inside which is the same as the folder name used to make the toolbar.
I know that the name of the control does not matter, just wanted to check if the new toolbar is found (no spelling error), and the control is different.
if OutputVar1=Quick Launch ;Find the toolbar we want by comparing controls TextAnd test if it works.
When you tryid my first version with Sysinfo did you change the toolbars size bigger?
I did not change the size, only the vertical position from 0 to 800. The short appearance of the Gui is at this position, except with Quick Launch, when the set position is ignored, the Gui is in the top left corner of the Quick Launch area.
My Toolbar attached to a Sysinfo folder is working great so I don't understand why it is not working for you.I tried "Links" and "xxx" folders. They don't work. Only Quick Launch does. Maybe, because it is a normal control, not just a link to a folder?
I did not change the size, only the vertical position from 0 to 800. The short appearance of the Gui is at this position, except with Quick Launch, when the set position is ignored, the Gui is in the top left corner of the Quick Launch area.
I ment drag the toolbar bigger(longer), the script might be hidden and only the toolbar text shown, If the script is not visible I think this must be it, if the script can't find the right control it is visible at the top left corner of the desktop. :shock:
THAT'S IT! My toolbar was only the title and a double downward arrow (for the possible icons I don't have in there), there is no actual screen area reserved to hold the new GUI, so it does not show up. I dragged the new toolbar larger, and as you said, up pops the GUI, working perfectly. Thanks for your patience!...drag the toolbar bigger(longer), the script might be hidden and only the toolbar text shown
working perfectly. Thanks for your patience!
Great I was getting worried :? .
It should be quite simple to have other scripts with their own toolbars, I think it should be possible to separate the toolbars from the taskbar too, I even attached the script to the clock. :lol:
Good job! I am re-writing my main script, to use this toolbar-docking. Hope it is not patented ;-)
Well, I want $1000 in small bills if you want to use my code. :twisted:
Well, I want $1000 in small bills if you want to use my code. :twisted:
Just joking 8) I am happy if it is useful.
I extracted the part of jonib's script, which finds the toolbar we want our Gui window to dock to. I am sure it will be useful for many of us, even beyond the use of the nice original Sysinfo script of Veovis.
WinExist("ahk_class Shell_TrayWnd") ; LastFound = System tray WinGet CtrlList, ControlList ; Get list of its controls Loop Parse, CtrlList, `n ; Check each ... { ControlGetText txt, %A_LoopField% ; ... for its text If txt = Links ; Find the toolbar we want by comparing control's Text ControlGet hndl,Hwnd,,%A_LoopField% ; Get the handle for the toolbar } Gui -Caption ToolWindow ; Setup simple test GUI window Gui Add, Text,,TEST Gui Show, x0 y0 w60 h26 ; x,y relative to top left corner of control WinGet GuiID, ID, A ; ID of active window (GUI) DllCall("SetParent",UInt,GuiID,UInt,hndl) ; Doc GUI to chosen Control
I am unsure how this relates to attaching the module to its own bar as I have not tested it...
Once again, feedback is appreciated!
"Power can be given overnight, but responsibility must be taught. Long years go into its making."