Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto find
Message
 
À
02/11/2015 00:11:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01626820
Message ID:
01626878
Vues:
99
thanks Al. it would have to be contained soley in VFP environment. Using editbox in this case not quite the path I wanted but partly because I hadn't even thought of it - dragan baled me out on this one - which is approach I was using BEFORE the word search so it aligned with the process. thanks as always your input - greatly appreciated.

k

>>Is there a way to open a text document and right away place cursor next to a 'keyword'.
>>That is, is there a way to bypass the right click 'find' after the document is open.
>
>It depends on exactly what you want to do or are trying to do.
>
>If you want to open the text document within VFP you can do something like
>
>- put an Editbox on a form
>- set lcMyVar = FILETOSTR( yourtextfile )
>- use AT( ) to locate your key word
>- set .EditBox.Value = lcMyVar
>- set .EditBox.SelStart = { value you got from AT( ), if found }
>
>You might also open the text file with some program that supports automation, such as Microsoft Word. You can then use COM automation to find your keyword and move the cursor to the correct location.
>
>Opening it with a program that can't be automated (e.g. Notepad.exe) might be tricky to impossible. This would involve invoking Notepad with ShellExecute( ) or similar, then feeding keystrokes to Notepad via Windows API calls. I believe feeding keystrokes is possible but I think it's frowned on in general because that's the sort of activity viruses and malware would love to do if allowed to do so.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform