Zumasys Homepage
Forum Home Forum Home > AccuTerm > Scripting & Automation
  New Posts New Posts RSS Feed - External program execution - suspend terminal
  FAQ FAQ  Forum Search   Register Register  Login Login

External program execution - suspend terminal

 Post Reply Post Reply
Author
Message
joshgallant View Drop Down
Newbie
Newbie


Joined: September 15 2021
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote joshgallant Quote  Post ReplyReply Direct Link To This Post Topic: External program execution - suspend terminal
    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
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2149
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.