Jump to content

JAFN

Active Members
  • Posts

    135
  • Joined

  • Last visited

Everything posted by JAFN

  1. #include <GUIConstantsEx.au3> Global $hParentGUI _Main() Func _Main() Local $iButton_1 $hParentGUI = GUICreate("Example by guinness", 200, 200, -1, -1) $iButton_1 = GUICtrlCreateButton("Show MsgBox()", 10, 10, 85, 25) GUISetState(@SW_SHOW, $hParentGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $iButton_1 GUISetState(@SW_DISABLE, $hParentGUI) $hChild = _ChildGUI() GUISetState(@SW_ENABLE, $hParentGUI) GUIDelete($hChild) ; WinActivate($hParentGUI) ; <<<<< Activate the ParentGUI again. EndSwitch WEnd EndFunc ;==>Main Func _ChildGUI() $hChild = GUICreate("Custom MsgBox()", 200, 200, -1, -1, -1, -1, $hParentGUI) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Return $hChild EndFunc ;==>_ChildGUI My brain is working better this morning. While not as elegant, this change greatly reduces redraw flicker in my parent window.
  2. I swear that was the first thing I tried. I must have made some silly error like forgetting to save the change. It works now but with a little more flicker than I would like. I'm curious as to why this is required. I get what it does but it seemed like it should work without it. Thank you again.
  3. I went to implement your straight forward design and ran into the problem that when GUIDelete was reached the parent window was slammed into the background behind other open windows. After going thru the help system and pouring over each possible line of code I decided to run your code just to see it work. After adding: #include <GUIConstantsEx.au3> Global $hParentGUI to the top to make it functional I found it functions the same way. Pushing the parent behind other windows (one being Scite itself.) I'm guessing something in my setup is to blame. My setup is vanilla, I do not even know how to change wrappers and the like. Any ideas? I just rebooted the computer and opened only Scite. It is still doing the same thing.
  4. Thank you ever so much. Lately it seems like whenever I can't figure something out on my own the answer involves many many lines of very dense WM_Notify (I'll be looking for a tutorial for dummies on this soon.) commands. So refreshing to have such an easy to implement and understand answer. Again, thank you.
  5. Sorry for the multiples. I got modeless and modal turned around in the first post and I have no idea how I got two of the latter. What I want is for the child gui to function like a message box. By which I mean, requiring resolution before anything can be done with the parent window.
  6. I thought this one was going to be easy to search for, but alas... How do I open a child gui window in modal mode? Currently I am cycling back to a Winactivate function. But this has the disadvantage of momentarily allowing selection of another process before flipping back to the gui and so burying the parent gui. Thanks.
  7. I thought this one was going to be easy to search for, but alas... How do I open a child gui window in modeless mode? Currently I am cycling back to a Winactivate function. But this has the disadvantage of momentarily allowing selection of another process before flipping back to the gui and so burying the parent gui. Thanks.
  8. In framing the question I gleamed the answer. Works the way I want in New Times Roman.
  9. When I put Unicode characters (using ChrW()) into ListView Column Headers they appear as a square. Is there some way to do this so that they appear correctly? Do I need to be in a certain font? (Using Tahoma currently)
  10. With all the things you can do to the header you'd think a basic color setting would be a built in feature. Maybe in a future version. I find I am understanding more and more but this is well beyond me. I think I'll chock this one up to to convoluted for the non-importance to the project. Thank you for your time.
  11. I feel like I am missing the obvious (again - sigh) but I can't find how to change the color of a ListView Column Header. I'm trying to change the whole header not just one cell, although that would be fine too. Thanks
  12. I will have to comeback to this. As it isn't simple there are far more pressing functions for this script. But I will return to cosmetics at some point and will post my results when successful. As always, thank you for your time.
  13. I don't see how to use that with _GUICtrlListView_AddArray.
  14. Yes, I'm back If I have a ListView that is populated by _GUICtrlListView_AddArray instead of _GUICtrlListView_AddSubItem, is it still possible to have alternating colors for the ListViews rows? Thanks
  15. I have Microsft Assess file (.mdb) that I want to extract one column from it and save it as a text file. I see several udfs for interfacing with other Microsoft products. So I figured it was worth asking. Any ideas?
  16. Thank you for responding so quickly. And for retaining most of what I had done previously. That really helped me to understand it. Wish I still had my first attempt before I started brute forcing it. I'd like to see where I initially screwed up. Again thank you. I think that completes this script. Time to think up another one. JAFN
  17. Assume multiple identical windows who's titles all start with '(-)' I am trying to make it so that the windows align under the window cloesest to the top of the screen. Can anyone show me what is wrong with the code below? #Include <Array.au3> OrderWindow("(-)") Func OrderWindows($Mark) $List = WinList($Mark) $Items = $List[0][0] If $Items <= 2 Then Return ;YPos[x][0] = HWND ; [x][1] = Top position Dim $YList[$Items][2] ; create an Array of hwnd and y position For $x = 0 to $Items - 1 $WinPos = WinGetPos($List[$x+1][1]) $YList[$x][0] = $List[$x+1][1] ;hwnd $YList[$x][1] = $WinPos[1] ;y cord ; MsgBox(0,"", $YList[$x][0] & " | " & $YList[$x][1]) Next ;order array by highest window _ArraySort($YList, 0, 0, 0, 1) ;align all windows that titles start with $mark to align under the window highest on screen ;windows are all instances of the same script and are the same height $Left = $YList[0][1] For $x = 1 To $Items-1 ; start at 1 because 0 is the head $WinPos = WinGetPos($YList[$x][0]) $Top = $WinPos[1]; + $WinPos[3] $Left = $WinPos[0] WinMove($YList[$x][0],"", $Left, $Top) Next EndFunc
  18. Thanks for pointed out winlist to me. I have tried so many different ways on this that think it has become mangled to the point that it needs trained help. Help. ; align windows vertically under the window closest to the top of the desktop Func OrderWindows() $List = WinList($Mark) $Items = $List[0][0] If $Items <= 1 Then Return ;YPos[x][0] = HWND ; [x][1] = Top position $YPos = $List ; create Array of hwnd and y position For $x = 0 to $Items - 1 $WinPos = WinGetPos($List[$x][1]) $YPos[$x][0] = $List[$x][1] ;hwnd $YPos[$x][1] = $WinPos[1] ;y cord Next ;order array by highest window _ArraySort($YPos, 0, 0, 0, 1) ;align all windows that titles start with $mark to align under the window highest on screen ;windows are all instances of the same script and are the same height $Left = $Ypos[0][1] For $x = 1 To $Items-1 ; start at 1 because 0 is the head $WinPos = WinGetPos($YPos[$x-1][0]) $Top = $WinPos[1] - $WinPos[3] $Left = $WinPos[0] WinMove($YPos[$x][0],"", $Left, $Top) Next EndFunc
  19. Assume several windows with titles starting with "(-)". Why does this code never reach the msgbox? OrderWindow() Func OrderWindow() $Marker = "(-)" $First = True $List = ProcessList() $Items = $List[0][0] If $Items < 1 Then Return For $x = $Items To 1 Step -1 If $Marker <> $List[$x][0] Then ContinueLoop MsgBox (0, "", $List[$x][0]) Next EndFunc
  20. My mind is fried now. Can't even figure out who is talking to who now. I'll tackle it fresh in the morning. Thank you.
  21. Okay. I have 3 windows all starting with (-). Why does the comment line never get reached? OrderWindow() Func OrderWindow() $Marker = "(-)" $First = True $List = ProcessList() $Items = $List[0][0] ; MsgBox(0,"",$Items) If $Items < 1 Then Return For $x = $Items To 1 Step -1 If $Marker <> $List[$x][0] Then ContinueLoop ; code never gets here Next EndFunc
  22. Oh that hurt my head. But based on what I have I am going to try to write an aligning routine to run when each new instance opens. Be back much later, most likely. Thank you.
  23. How does it get registered? Does _Singleton do more than I thought it did?
  24. If I understand you right all that part of the code does is determine by '$inst > 1' that there are at least one other instance running. Correct?
×
×
  • Create New...