AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

autofilling a combobox

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Bartimus



Joined: 10 Nov 2005
Posts: 164
Location: Texas

PostPosted: Wed Jun 24, 2009 6:26 pm    Post subject: autofilling a combobox Reply with quote

Is there a way to have a combobox automattically fill in what you're typing based on a pre-existing list of choices? Example: Lets say I want to search for Watermelon. I start typing in the combobox and get to wate, the box will autoexpand and show Water & Watermelon. I'm kinda looking for the same effect as some of the major search engines have when you try to do a query with them.
So, is it possible?
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
RTFM.
Guest





PostPosted: Wed Jun 24, 2009 6:57 pm    Post subject: Reply with quote

Check out: "incremental search".
I guess Intellisense/ISense's functionality is what you're looking for.
Back to top
Bartimus



Joined: 10 Nov 2005
Posts: 164
Location: Texas

PostPosted: Wed Jun 24, 2009 8:05 pm    Post subject: Reply with quote

Thanks RTFM... this is the idea I'm looking for, but ListView won't work for my application.
I'm using a Combo to generate the list and if an entry doesn't exist to allow the person using add a new entry. I'll provide the script. This is a phone call logging script. It records date, time, person logging the call, the caller, and reason. The caller and reason are what the comboboxes are for. I am using this script in my I.T. dept. My tech's have a shortcut to it and use it as they receive calls that don't need service tickets. I need the log for accountability purposes.
Code:
;
; Language:       English
; Platform:       WinAll
; Author:         Bartimus
;
; Script Function:
;   Phone Log Script
;   Generates a CSV file to log incoming calls based on date, time, and user. 
;


#SingleInstance, Force
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.


Loop, read, \\Server\share$\Phone-Log-lists.csv
{
    LineNumber = %A_Index%
    Loop, parse, A_LoopReadLine, CSV
    {
   If (A_Index = 1)
     If (A_LoopField <> "")
      LstWho .= A_LoopField "|"

   If (A_Index = 2)
     If (A_LoopField <> "")
      LstWhat .= A_LoopField "|"

    }
}


WinPosx := (A_ScreenWidth)-(360)
WinPosy := (A_ScreenHeight)-(166)

Gui -system
Gui, Color, EEAA99
Gui, Font, s16, Verdana
Gui, Add, Text, Center  x0 w325, Log a Phone Call
Gui, Font, s11, Tahoma

Gui, Add, Text, w115 y45 x5 Right,Person Calling:
Gui, Add, ComboBox, yp-5 x120 w155 vWho, %LstWho%

Gui, Add, Text, w115 x5 Right, Reason for Call:
Gui, Add, ComboBox, yp-5 x120 w155 vWhat,%lstWhat%

Gui, Add, Button, x275 y40 w60 h60 default gSubmit, &Submit`nCall

Gui, Show, w345 h105 x%WinPosx% y%WinPosy%, I.T. Phone Log

Gui +LastFound



return

Submit:
  Gui, Submit, NoHide
  Gui, Destroy

FileAppend, %A_YYYY%-%A_MMM%-%A_DD%`,%A_Hour%:%A_Min%:%A_Sec%`,%A_username%`,%who%`,%what%`n, \\Server\share$\Phone-Log.csv

  IfNotInString, LstWho, %Who%
  {
    FileAppend, %who%, \\Server\share$\Phone-Log-lists.csv
  }

  IfNotInString, LstWhat, %What%
  {
    FileAppend, `,%what%, \\Server\share$\Phone-Log-lists.csv
  }


    FileAppend, `n, \\Server\share$\Phone-Log-lists.csv



TrayTip, I.T. Phone Log, %A_username%`,`nAn entry was made on`n%A_YYYY%-%A_MMM%-%A_DD% at %A_Hour%:%A_Min%:%A_Sec%, 10, 1
Soundbeep, 1500,500
sleep 10000

GuiEscape:
GuiClose:
ExitApp
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
System Monitor



Joined: 09 Mar 2007
Posts: 509
Location: Unknown

PostPosted: Wed Jun 24, 2009 10:07 pm    Post subject: Reply with quote

If you can use a DropDownList in your program add the option "sort".
Code:
Gui, 2:Add, DropDownList, Sort , List|List1|WaterMelon
Back to top
View user's profile Send private message Visit poster's website
Bartimus



Joined: 10 Nov 2005
Posts: 164
Location: Texas

PostPosted: Wed Jun 24, 2009 10:22 pm    Post subject: Reply with quote

I'm working with this notion (from the help file):

Quote:
ComboBox
Description: Same as DropDownList but also permits free-form text to be entered as an alternative to picking an item from the list.


I really need that free-form entry because the list grows as more people call in. I was hoping that I can get the list to pop up as my techs type, so if there's an existing person or reason, they can just use it.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
System Monitor



Joined: 09 Mar 2007
Posts: 509
Location: Unknown

PostPosted: Wed Jun 24, 2009 10:44 pm    Post subject: Reply with quote

http://www.autohotkey.com/forum/viewtopic.php?t=1371&highlight=intellisense
Back to top
View user's profile Send private message Visit poster's website
Bartimus



Joined: 10 Nov 2005
Posts: 164
Location: Texas

PostPosted: Thu Jun 25, 2009 1:54 pm    Post subject: Reply with quote

I'm having a hard time seeing how Intellisense is going to apply to my situation. Question Question
Intellisense is a great tool, don't get me wrong, but it only pulls from one list (which I have 2) and then on top of that, even if I recode it to work on my app, it will give me the one list it has and apply it to both inputs that I need in my app. I don't need 'reasons' to show up in the 'names' input and I don't need 'names' to show up in the 'reasons' input. I want to keep the two separate. I was also hoping to have a dropdown show up instead of a tooltip as well.

I don't ask for too much do I? Wink
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
sysmon
Guest





PostPosted: Thu Jun 25, 2009 4:17 pm    Post subject: Reply with quote

http://www.autohotkey.com/forum/topic19766.html
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group