![]() |
|
| HALi HALi is an Actixe X interface that allow more advanced programming with HAL. Search this forum on how to create HALi Apps as well as find apps that others have already created. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Advanced Member
Join Date: Jul 2009
Posts: 157
|
I am trying to use the following:
Dim AnsCall - AxHALi1.TTX.AskListContext("Who?", 3, 60, "Darrin, Donna,") If AnsCall="Donna" then AxHALi1.Macros.ItemByName(Get Donna).Play() END IF I can't seem to get the variable string AnsCall filled with anything. Any Ideas? I read where others posted in 2008 were having problems, but not sure if they ever got it working. |
|
|
|
|
|
#2 |
|
Super Moderator
Join Date: Jul 2003
Location: NJ
Posts: 3,050
|
What language is that? it looks like VB but your dim statement looks strange. For VB I would expect
Dim AnsCall as String AnsCall = AxHALi1.TTX.AskListContext("Who?", 3, 60, "Darrin, Donna,")
__________________
DISCLAIMER: Use my advice at your own risk. If you are not familiar with how to safely accomplish a task HIRE A PROFESSIONAL. Improper use/installation can cause damage to equipment, fire, electrical problems and in some cases death. |
|
|
|
|
|
#3 |
|
Advanced Member
Join Date: Jul 2009
Posts: 157
|
I have what you have listed in the code.
But it doesn't ever fill the string...even if I put one response in and regardless where I put commas. |
|
|
|
|
|
#4 |
|
Advanced Member
Join Date: Jul 2009
Posts: 157
|
Does anyone use this and got it to work??
|
|
|
|
|
|
#5 |
|
Super Moderator
Join Date: Jul 2003
Location: NJ
Posts: 3,050
|
I'll try it out later today. Does it timeout or does it return immediatly?
__________________
DISCLAIMER: Use my advice at your own risk. If you are not familiar with how to safely accomplish a task HIRE A PROFESSIONAL. Improper use/installation can cause damage to equipment, fire, electrical problems and in some cases death. |
|
|
|
|
|
#6 |
|
Advanced Member
Join Date: Jul 2009
Posts: 157
|
I set it for 420 and it seems to pause breifly, but it never fills the string with a response.
|
|
|
|
|
|
#7 |
|
Advanced Member
Join Date: Jul 2009
Posts: 157
|
Jim,
any luck getting it to fill the string? |
|
|
|
|
|
#8 |
|
Super Moderator
Join Date: Jul 2003
Location: NJ
Posts: 3,050
|
Well my wife stole my microphone but I did mange to figure out what the problem probably is. The iDelay is in mili Seconds so 60ms is too quick. The maximum value of iDelay is 10,000 or 10 seconds. So maybe try iDelay at 5000. That should be enough time to respond.
Also do not put spaces in your responses. For example use "Up,Down,Left,Right" do not use "Up, Down, Left, Right" From the HALi manual. AskListContext (sText As String, iDelay As Integer, iRetries As Integer, sList As String) As String Returns the spoken choice from a list of words provided. The method parameters are: Parameter Description iWhich A number representing the ordinal position of the object in HAL. sText A String containing the Text HAL should Speak sContext A String containing the Specified Context. iRetries An Integer containing the number of retries. iDelay An Integer containing the number of mSeconds to wait sList A string containing a comma “,” separated list of words to ask in context. Max of 100 words. Hope that helps.
Jim
__________________
DISCLAIMER: Use my advice at your own risk. If you are not familiar with how to safely accomplish a task HIRE A PROFESSIONAL. Improper use/installation can cause damage to equipment, fire, electrical problems and in some cases death. Last edited by JimMcGowanInlet; 12-16-2009 at 07:24 PM. |
|
|
|
|
|
#9 |
|
Advanced Member
Join Date: Jul 2009
Posts: 157
|
I will give it a try and let everyone know.
Thanks greatly! |
|
|
|
|
|
#10 |
|
Advanced Member
Join Date: Jul 2009
Posts: 157
|
THAT WORKED!!!!!!
Thank you so much. Now I can continue my coding. I did have to put a comma at the end of the list as stated in another post. -- Dim AnsCall as String AnsCall=AxHALi1.TTX.AskListContext("Who?", 3, 5000, "Darrin, Donna,Zachary,") msgbox(AnsCall) -- |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -6. The time now is 08:25 AM.
|
|