KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: ShellExecute flashes a little command window when executing a command
Topic Summary: A cmd window flashes when Dragon ShellExecute runs my console app .exe file
Created On: 02/27/2018 03:40 PM
Status: Post and Reply
Linear : Threading : Single : Branch
Keyword
 02/27/2018 03:40 PM
User is offline View Users Profile Print this message

Author Icon
kkkwj
Top-Tier Member

Posts: 943
Joined: 11/05/2015

Hi, I wrote a little console application that I can run from the command line in a command prompt window. It lives in a directory on the system PATH. When ShellExecute runs it as part of a Dragon script, I see a command prompt window flash (about 3 inches square on my screen) while my console app runs and completes.

 

Is there any way to prevent the window from flashing? It's not for long, but it bothers me. I didn't see anything obvious in the command line arguments for the ShellExecute command. Thank you



-------------------------

Win10/11/x64, AMD Ryzen 7 3700X/3950X, 64/128GB RAM, Dragon 15.3, SP 7 Standard, SpeechStart, Office 365, KB 2017, Dragon Capture, Samson Meteor USB Desk Mic, Amazon YUWAKAYI headset, Klim and JUKSTG earbuds with microphones, 3 BenQ 2560x1440 monitors, Microsoft Sculpt Keyboard and fat mouse

 02/27/2018 04:31 PM
User is offline View Users Profile Print this message

Author Icon
PG LTU
Top-Tier Member

Posts: 2210
Joined: 03/21/2007

Look at the help.
https://www.nuance.com/products/help/dragon/dragon-for-pc/scriptref/Content/scrptref/shellexecute.htm

and use the "6."

It is explained more here: http://www.knowbrainer.com/forums/forum/messageview.cfm?catid=4&threadid=26875&discTab=true&messid=148889&parentid=148876&FTVAR_FORUMVIEWTMP=Single

Hth,



-------------------------




PG





Remember folks, my comments and this forum are for entertainment value only, please, no wagering or other reliance on the contents herein.  I permit no commercial use of my ideas (whether expressions or embodiments) without my written consent.



 02/27/2018 08:56 PM
User is offline View Users Profile Print this message

Author Icon
kkkwj
Top-Tier Member

Posts: 943
Joined: 11/05/2015

Hi, thank you for your reply. It helped, partially. Of course, the documentation was the first place that I went to look. The numbers for shall execute map onto the Win32 API settings for the show window status. Usually, they apply to the application that is being launched, and not to the intermediate command prompt window, which is why I never tested #6. (I did test 1,5,9, and some others). So, I tried 6, and it partially worked. I do not get the 3 in.² command prompt window, but the title bar of the foreground window (my browser) rapidly flashes two or three times instead. Is it an improvement? Hard to say whether one big square flashes worse than three or four other ones on the title bar. I will just have to live with it - no more time on this issue. Thank you again for your help.

 

Update: after testing a variety of numbers, I concluded that 7 worked the best because it produced the minimum amount of flicker.



-------------------------

Win10/11/x64, AMD Ryzen 7 3700X/3950X, 64/128GB RAM, Dragon 15.3, SP 7 Standard, SpeechStart, Office 365, KB 2017, Dragon Capture, Samson Meteor USB Desk Mic, Amazon YUWAKAYI headset, Klim and JUKSTG earbuds with microphones, 3 BenQ 2560x1440 monitors, Microsoft Sculpt Keyboard and fat mouse



 02/27/2018 11:01 PM
User is offline View Users Profile Print this message

Author Icon
PG LTU
Top-Tier Member

Posts: 2210
Joined: 03/21/2007

You are using the "/Q /c" command line parameters, right, and the console app has no output? I don't get it, unless you have the accessibility option to substitute a flash for a beep or something like that turned on. I do what you say you are doing often and can't recall that behavior (and I do have an accessibility option to flash my desktop on beeps).

-------------------------




PG





Remember folks, my comments and this forum are for entertainment value only, please, no wagering or other reliance on the contents herein.  I permit no commercial use of my ideas (whether expressions or embodiments) without my written consent.

Statistics
32324 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 0 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 355 guests browsing this forum, which makes a total of 355 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.