Jump to content

Nick Duffill

Active Members
  • Posts

    20
  • Joined

  • Last visited

Everything posted by Nick Duffill

  1. Thanks Zedna, but as I understand it, the Windows Message Codes are used to handle events received from Windows. Is there a way to send a message to a control to change the font settings, apart from GUICtrlSetFont() ? Best regards Nick
  2. Is it possible to set the underline attribute on a label control, without also specifying the font size and weight? I would like them to remain as the system defaults, but apply the underline. Best regards Nick
  3. Thanks everyone for all your help and suggestions. For the time being I will position the use of the Clipboard as a feature of the text-grabbing utility instead of a slight complication Best regards Nick
  4. What I want to do is use a hotkey to capture the selected text in whatever program is activated at the time. Ideally I would like to avoid using the clipboard to do this, as it would overwrite anything that the user thought they had placed there. So I'm looking for either a way to save and restore the clipboard (allowing send(^c) to be used), or a different way to access whatever is highlighted in the active window, which could be any program. Thanks for your help Nick
  5. Thanks, but this still consumes the Clipboard. I guess there is no way to avoid this. Regards Nick
  6. I want to access the selected text in the currently active window. $var = ControlCommand(WinGetTitle(""), "", ControlGetFocus(WinGetTitle("")), "GetSelected", "")oÝ÷ Û +Çâçè­Ê'¶º%²ØZµªÞyØ­rí®lnëbíz¹Þ´LiÞ­ú+{¦¦W¨­æv·¬±¶«Æ§yØ­rí®Sån z+lzWâ²z-jëh×6send("^c", 0) $var = ClipGet() works pretty much everywhere, except that it overwrites the Clipboard, which is not so user-friendly. Is there a third way, or is there a way to save and restore any type of Clipboard contents? As far as I know, ClipGet() and ClipPut() will only save and restore plain text. Best regards Nick
  7. $i_GUIEntTxtItem = GUICtrlCreateInput(.... ) ; create input box ... GUICtrlSetState($i_GUIEntTxtItem, $GUI_FOCUS) ; set focus on input box sets the focus correctly, but also selects all existing text in the input control. Is it possible to set the focus on the input control without selecting the text? I want to avoid using a workaround like ControlSend($i_GUIEntHandle, "", $i_GUIEntTxtItem, "{RIGHT}") to achieve this, because ControlSend() should now be avoided within HotKey event handlers. Thanks Nick
  8. Thanks to all your help, I got GUIRegisterMsg() to work great, but I could not find out how to un-register again. I only need this notification for one window while it is active. I tried it with only the first parameter or with an empty function name, but it doesn't like either of those. Any suggestions? I am also seeing a strange effect. I used gafrosts example above to implement an event handler. When I left-click and release slowly on a row in the ListView (e.g. holding the button more than 0.5 sec), it works fine. But if I left-click and release quickly, it starts a drag operation, as if the mouse-up event had been missed. Is there a way to prevent this effect? The handler updates the ListView control during processing, so I implemented a mutex to prevent re-entry, but it made no difference. Regards Nick
  9. Thanks to everyone for all your help. I will work through this and will learn a lot Best regards Nick
  10. I have attached an event to a ListView item, so that the status of move up/ move down buttons can be refreshed when a ListViewItem is selected. This works fine. However, the selection in the ListView can also be changed with the up/down arrow keys on the keyboard. The ListViewItem event does not fire if the arrow keys are used. Is there a better way to detect a change in the selection within a ListView control, using events? The code does not poll for messages. I tried attaching an event to the ListView control itself but it was not fired by using the arrow keys. Best regards Nick
  11. Thanks Helge, but this was not the cause. What we found was that it works fine on systems with the desktop DPI set to 96, but does not work on systems with a DPI of 120. The cause was the height of the input box. Increasing it by 1 pixel allowed the text to also be displayed at 120 DPI. If the input box is not high enough, Windows will not display any characters at all, instead of only displaying truncated characters. So the minimum for broad compatibility is 20 pixels. Best regards Nick
  12. A user with a ThinkPad T41p running Windows XP has reported that text in an input box (created with GuiCtrlCreateInput) is invisible on his system. Text that he enters is there, because is processed when he clicks the OK button on the form - but it is not displayed as he types. In case it helps, here is the code for the offending item, but I cannot reproduce the issue myself. $s_1 is the initialisation string. $i_GUIEntTxtItem = GUICtrlCreateInput($s_1, 60, 20, 290, 19, $ES_MULTILINE + $ES_AUTOVSCROLL) GUICtrlSetBkColor($i_GUIEntTxtItem, 0xFFFFEE) GUICtrlSetFont($i_GUIEntTxtItem, 9, 400, 0, "Verdana") GUIRegisterMsg ($WM_COMMAND, "p_GUIEntTxtItem") ; direct message event GUICtrlSetState($i_GUIEntTxtItem, $GUI_FOCUS) This code works fine on other systems, and so far the issue is a unique case. Has anyone seen this before, or got any ideas on how I might debug it? Best regards Nick
  13. Thanks - I already had the beta, but Scite > Tools > SyntaxCheckBeta throws warnings about the new constants. It is reading the Include\ folder instead of beta\Include\. I guess this is the default for the #include keyword. My apologies for making a meal out of this - I'm sure when I fix this issue your solution above will work great.
  14. Thanks gafrost This looks like exactly the answer, but my beta installation is not picking up beta\Include\GUIConstants.au3 although the beta 3.1.1 (beta) file is there (and does contain new constants such as $GUI_DROPACCEPTED). Have I missed out some vital step in configuring the beta installation? Best regards Nick
  15. Thanls Sbad & Big Daddy I guess I could use a flag in the loop to prevent continuous re-enabling, but I'd rather keep the loop clean if I can. regards Nick
  16. Hello Is there an event for the user typing into a GUICtrlCreateInput() control? I tried registering an event for an Input control but it does not seem to fire when text is typed into it. The event does fire when the GUI is destroyed, though. Other button and GUI events are working OK. Regards Nick
  17. Is there a way to read non-text formats from the clipboard? I want to be able to select some text in a web browser page, copy it to the clipboard, then parse any hyperlinks that it contains. But the ClipGet() function seems to return the plain text version of the clipboard contents, i.e. does not contain the links. Will I need to use Dale's IE Automation library? TIA Nick
  18. Hello Newbie question: I want to create an AutoIt GUI and then send keys to it from another application. What is the best way to detect keyboard input in the GUI? Or is there a way to receive keyboard input without a GUI? TIA Nick
×
×
  • Create New...