Author Topic: Open a Folder using VoiceAttack  (Read 1315 times)

TransDiv

  • Newbie
  • *
  • Posts: 2
Open a Folder using VoiceAttack
« on: July 15, 2023, 11:38:55 PM »
Hi 2 All

I'm a complete VA newbie here; I have a folder that contains approx. 520 subfolders inside, each subfolder contains different files of different types (word, excel, etc...).

It's possible to create a program that hearing the folder name, the program opens a window that shows the subfolder's files inside and let me load any of them using the related application (like windows explorer)?

The idea is that once the document is loaded I can Copy & Paste the contents inside the document I'm currently working (mainly word, excel o powerpoint)

Thx
TransDiv

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Open a Folder using VoiceAttack
« Reply #1 on: July 15, 2023, 11:52:42 PM »
The "Run an Application" action can be used to open a folder, E.G.
Code: [Select]
Run application 'C:\'
Using that action with a given file, should open that file using the default application assigned for that file type in Windows.

E.G.
Code: [Select]
Run application '{VA_DIR}\VoiceAttackHelp.pdf'would open VoiceAttack's documentation (just like pressing F1 while VoiceAttack has focus will)


If the intent is to dynamically use a list of folders and/or files to as (part of) command phrases, that would require an inline function, which can be written in either C# (the most popular option) or VB.NET, if you're familiar with either.

As the "Wait For Spoken Response" action accepts 500 phrases, and you have more folders than that, you'd also need to use an undocumented feature that allows the use of tokens in variable names, which requires reloading the profile in order to re-parse the token(s) and apply any changes.

That would be quite advanced, compared to manually creating the required commands.