¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: MadFox Meeting


Eric Selje
 

¿ªÔÆÌåÓý

Oooh, I have a good one for this.? I did it some time ago and may have even shown you before, but it's been so useful to me that I think it's worth revisiting.
?
If you've ever typed SELE (space) at the command line, you know that you get the syntax for SQL - Select statements.? This is fine sometimes, but what if you really wanted the SELECT [workarea] syntax?? Well, who would really want that, because it's so simple?? Wouldn't it actually be very cool if it presented you with a list of open tables to choose from?? (Believe me, it is).?? And, as an added bonus, if there were no tables open it automatically changes itself to USE so you can open the table you're looking for.
?
Here's what you do to get this:
?
1. Open Intellisense Manager, and change to the "Custom" tab.
2. In the box that says "Replace", type opentables, change the Type to "Script," then click "Add."? This adds a new script record to the FoxCode table.? Click "Script" to edit this script, and paste this code:
?
LPARAMETER oFoxCode
?
LOCAL X, cReturn, nUsed
?
* Create array of open tables
nUsed =AUSED(aTables)
?
IF nUsed? = 0
??* Return a value
?oFoxCode.valueType = 'V'
?cReturn =? 'USE ~'
ELSE
?* Tell IntelliSense that you want a dropdown list to appear
? oFoxCode.valueType = 'L'
?* Build the list using oFoxCode's built in properties
?DIMENSION oFoxcode.Items[m.nUsed,2]
?FOR i = 1 TO m.nUsed
??oFoxcode.Items[m.i,1] = aTables[i, 1]
??oFoxcode.Items[m.i,2] = ""
?ENDFOR
?* Return the prefix for the results of the list
?cReturn = "SELECT"
ENDIF
* Return either USE or SELECT
RETURN cReturn
?
3 . Save that script (Ctrl+W), then add a new record to FoxCode by typing SEL in the Replace box, changing the type to "Command", and click "Add."
?
4. To make it so that SEL invokes our opentables script, click "Edit", and type {opentables}?? in the Cmd field.?
?
5. Click Ok and you should be all set.? Good luck!
?
Even though it ends up being very simple, it actually took me about an hour to figure out how to do this all over again tonight.
?
Enjoy,
?
Eric
?

----- Original Message -----
Sent: 1/19/2004 12:48:03 PM
Subject: RE: [madfox_vfp] MadFox Meeting

One of many items on my sometime when I have time list is customizing Intellisense.? If anyone has added their own commands (or modified the default behaviors), maybe you could demonstrate what youve done.? If nobodys done that, perhaps trying something as a group project would be beneficial.? ?

?


From: PJ Fernandez [mailto:pjfern@...]
Sent: Thursday, August 14, 2003 8:57 AM
To: Madfox_Vfp@Yahoogroups. Com
Subject: [madfox_vfp] MadFox Meeting

?

Hello sleepy heads....

?

It seems the cold weather has kept you busy and industrious.? Hope you enjoyed your holidays.

?

It is time to collect suggestions for the meeting tomorrow.? What should we discuss?? Any suggestions?for the agenda?

?

Thanks,

?

P.J. Fernandez, MCSD

?

?


Yahoo! Groups Links

  • To visit your group on the web, go to:

    ?
  • To unsubscribe from this group, send an email to:
    madfox_vfp-unsubscribe@...
    ?
  • Your use of Yahoo! Groups is subject to the .



Yahoo! Groups Links
  • To visit your group on the web, go to:

    ?
  • To unsubscribe from this group, send an email to:
    madfox_vfp-unsubscribe@...
    ?
  • Your use of Yahoo! Groups is subject to the .

Join [email protected] to automatically receive all group messages.