Print Page | Close Window

External program execution - suspend terminal

Printed From: Rocket Software
Category: AccuTerm Knowledge Base (read only)
Forum Name: Scripting & Automation
Forum Description: Customize and control AccuTerm using scripts and automation
URL: https://forum.asent.com/forum_posts.asp?TID=2749
Printed Date: January 30 2023 at 7:41am
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: External program execution - suspend terminal
Posted By: joshgallant
Subject: External program execution - suspend terminal
Date Posted: September 15 2021 at 9:17am
When attempting to execute a client side application like calculator or notepad I can successfully make the program suspend and wait for the program to terminate using this example from the manual:

EQU ESC TO CHAR(27), STX TO CHAR(2), CR TO CHAR(13) CMD = "notepad.exe"
PRINT ESC:STX:'>':CMD:CR:
PRINT ESC:STX:'I':

INPUT JUNK


What I really want to do is launch a browser to open a URL with this same process but I can't seem to get the process to suspend and wait.  It always returns right away.  I've tried on multiple browsers and OS versions.

Has anyone figured out a solution for this?

- Josh



Replies:
Posted By: PSchellenbach
Date Posted: September 20 2021 at 10:02am
Hi Josh -

The above technique usually works, but browsers are strange applications that don't always follow the normal rules. AccuTerm is able to monitor the status of an external program by checking the status of the process running the external program. Some browsers (maybe all of them?) start multiple processes to render tabs and (at least Firefox) close the original process after launching the URL from the command line. This causes AccuTerm to believe the browser was closed, and the next statement runs as if the user closed the app. You might experiment with different browsers and their command-line switches to see if you can find one that will run in a single process.

Thanks, Pete




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net