![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | |||
lucasn
Newbie
Joined: September 02 2016 Status: Offline Points: 17 |
Post Options
Thanks(0)
Quote Reply
Topic: How to include double-quotes in Shell command?Posted: October 10 2016 at 4:31pm |
||
|
I'm attempting to use ImageMagick's "identify" command to programmatically determine the dimensions of an image file for use in positioning / scaling / centering within an AccuTerm GUI Picture control. The identify command -format requires some parameters to be enclosed in double quotes.
A command such as the following works in a regular DOS command box:
I am able to get things to work with a straight-forward command execution in a BASIC program:
"forum.asent.com/topic1618.html" indicates the above method won't eliminate the DOS box that pops up, so I was wondering if there is a way to use Shell function in scripting instead? I tried this, but it doesn't seem to produce the desired output file "xxyz.txt":
What am I doing wrong here? I haven't done a whole lot of VBA scripting or AccuTerm scripting yet. Any help would be appreciated. Thanks, Lucas |
|||
![]() |
|||
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: October 11 2016 at 6:26pm |
||
|
Hi Lucas -
You may need to create a .BAT (or powershell?) file to run your command. One problem is that the VBA Shell function does not provide redirection, which you are using to capture the results of the command. A .BAT file is executed by the command processor (cmd.exe) which provides the redirection. The Shell function has an optional WindowType argument you can set to vbHide which should run the command in a hidden DOS box. If you don't mind the DOS box, you could re-write your command line using cmd.exe /C ... Look near the end of this thread for an example: http://forum.asent.com/using-ft_topic477.html Thanks, Pete |
|||
![]() |
|||
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |