Jump to content

mac1

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by mac1

  1. Hi All, I've searched the forums and even posted accidentally in the developers forum. So that means the answer is obvious and I'll be slapping my forehead. How do I determine the color of a control (a button in this case) before I use GUICtrlSetBkColor, so I can change it back? Thanks, Mac
  2. I just tried the 0xECE9D8 version and this sets the button to the parent window background color not the original color of the button. $GUI_BKCOLOR_TRANSPARENT version sets it to some dark color... What am I doing wrong?
  3. In AutoIt on a control create in an AutoIt GUI
  4. Hi All, I've done a fair bit of searching the forums to no avail. It will probably be a forehead slap answer...but here goes: How do you get the current background color of a control or window for that matter? Regards, Mac
  5. Thanks Siao, I forgot/overlooked the parent/child thing. Thanks for the example. I see the example accomplishes some of what my original intent. It does not create a focus rectangle when the mouse activates the control. Unfortunately, it displays part of the focus rectangle as the slider is moved. Any idea what message is causing that?
  6. Ok, I wipped up a quick example based on code lifted from elsewhere on the forum trying to grab just the setfocus from a particular slider...but it doesn't seen to get the slider setfocus. What did I get wrong? #include <GuiConstants.au3> Global Const $WM_ACTIVATE = 0x0006 Global Const $WM_SETFOCUS = 0x0007 Global Const $WM_HSCROLL = 0x0114 Global Const $WM_VSCROLL = 0x0115 Global $slider_ctrl_id[2] $Gui = GuiCreate("Slider Update Demo", 250, 200) GUIRegisterMsg($WM_HSCROLL, "WM_HVSCROLL") GUIRegisterMsg($WM_VSCROLL, "WM_HVSCROLL") GUIRegisterMsg($WM_ACTIVATE, "WM_ACTIVATE") For $i = 0 To 1 $slider_ctrl_id[$i] = GUICtrlCreateSlider(20 + 20*$i, 50, 30, 120, $TBS_VERT) Next $Vertical_Label = GUICtrlCreateLabel("Vertical Slider Read: 0", 20, 20, 200) $Horizontal_Label = GUICtrlCreateLabel("Horizontal Slider Read: 0", 80, 120, 200) $misc_label = GUICtrlCreateLabel("lala", 120, 130, 50, 50) ;$Vertical_Slider = GUICtrlCreateSlider(20, 50, 30, 120, BitOr($GUI_SS_DEFAULT_SLIDER, $TBS_VERT)) ;$Horizontal_Slider = GUICtrlCreateSlider(60, 150, 160, 30) GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case -3 Exit EndSwitch WEnd Func WM_HVSCROLL($hWndGUI, $MsgID, $WParam, $LParam) Switch $LParam Case GUICtrlGetHandle($slider_ctrl_id[0]) GUICtrlSetData($Vertical_Label, "Vertical Slider Read: " & GUICtrlRead($slider_ctrl_id[0])) Case GUICtrlGetHandle($slider_ctrl_id[1]) GUICtrlSetData($Horizontal_Label, "Horizontal Slider Read: " & GUICtrlRead($slider_ctrl_id[1])) EndSwitch EndFunc Func WM_ACTIVATE($hWndGUI, $MsgID, $WParam, $LParam) Switch $LParam Case GUICtrlGetHandle($slider_ctrl_id[0]) MsgBox(0,"",$LParam) GUICtrlSetData($misc_label, "") EndSwitch EndFunc
  7. Hmm...I was hoping it would be easier...looks like I'll need to dig out my old copy of Petzold... Spoofing Windows messages, ya just gotta love it. Now where is that bloody big Petzold book, I think it was being a door stop in the attic...
  8. Did you move the control? I just tried this code and when you click on the slider control to move it, I get a dotted line border around the slider control.
  9. Hi All, I've tried various control styles when adding two sliders. But I've not found the one that makes the dotted line border invisible when the mouse is clicked on the slider. Is there such a style? Thanks, Mac
  10. Have you used MidiOutLongMsg? I'm curious how one would pack midi bytes for use with this function and how to allocate large buffers for use as the $data argument. Mac
  11. Hi, I did a quick search of the forum about this but didn't find anything specific. So, here's my question: - I have a .reg file created by an export from regedit. - I've written an AutoIt script that installs an application. - I need to set some entries in the registry during the install. - Is there a way, has anyone written a script that I can use the native .reg file contents to update the regitry in my AI script? I know I can read the .reg file with AI's iniread since the [hive\key] looks just like a ini key, but I won't know the hive\key ahead of time. Any ideas? Thanks, Mac
×
×
  • Create New...