Jump to content

Search the Community

Showing results for tags 'enter key'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi Again, I'm really stuck with this, I have a complex program now more than 3K lines, I'll only post the portion which is giving me a lot of headache. This slice of code will monitor where the active cursor is and when the user press enter it will call the function associated with the input field(Search Field). Each of these Search input box reside on its own Tab Control It does work pretty well HOWEVER if I left the cursor at the input field and fire up other applications such as notepad, the HotKey (enter) does not set to its default. Case Else ;user is doing something else other than pressing/clicking on buttons/controls $sFocus = ControlGetFocus($formAgentBuddy) $hFocus = ControlGetHandle($formAgentBuddy, "", $sFocus) $ctrlFocus = _WinAPI_GetDlgCtrlID($hFocus) Switch $hFocus Case $hnptSearchMeC HotKeySet("{ENTER}", "_SearchContactList") Case $hnptSearchMeR HotKeySet("{ENTER}", "_SearchReferenceList") Case $hnptSearchMeK HotKeySet("{ENTER}", "_SearchAccountList") Case $hnptSearchMeM HotKeySet("{ENTER}", "_SearchTemplateList") Case $hnptSearchMeL HotKeySet("{ENTER}", "_SearchAlarmList") Case Else HotKeySet("{ENTER}") EndSwitch I tried using GUISetAccelerators but I guess this cannot be dynamically changed like Case Else ;user is doing something else other than pressing/clicking on buttons/controls $sFocus = ControlGetFocus($formAgentBuddy) $hFocus = ControlGetHandle($formAgentBuddy, "", $sFocus) $ctrlFocus = _WinAPI_GetDlgCtrlID($hFocus) Switch $hFocus Case $hnptSearchMeC Dim $AccelKeys[1][2]=[["{ENTER}",$btnSearchContactList]] GUISetAccelerators($AccelKeys) Case $hnptSearchMeR Dim $AccelKeys[1][2]=[["{ENTER}",$btnSearchReferenceList]] GUISetAccelerators($AccelKeys) Case $hnptSearchMeK ;.... and so on Case $hnptSearchMeM ;.... and so on Case $hnptSearchMeL ;.... and so on Case Else Dim $AccelKeys = "" EndSwitch I also tried to monitor the Active Window with WinGetState and use BitAnd with an 8 but sadly that doesn't also do the trick even if I switch to other application my program seem to be still active even when its already greyed out like if I left the cursor at the Search Field(input Box) and I press enter in notepad instead of giving me a new line in notepad it executes the search in my application.
×
×
  • Create New...