The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.2.34 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieve text from the hidden command-line window
#1
https://www.quickmacros.com/forum/showth...6#pid36746

I want to add the following features using the code from the link above (on Line11 before):

`frpc.exe` comes from an open-source project(https://github.com/fatedier/frp/releases/tag/v0.59.0).
Issue 1: Unable to execute the command-line program `frpc.exe`, the following error occurs as shown in the image below.
https://i.ibb.co/3kmg08n/A.jpg
I can manually start `frpc.exe` using the following command-line code.
start frpc.exe -c frpc.toml

Additionally, the three features I need are described in detail in the comments within the code below.

I'm not sure if these features can be implemented, thank you in advance.
Code:
Copy      Help
process.terminate("frpc.exe");
string frpc = folders.ThisApp + @"\frpc.exe"; print.it(frpc);
string cl = "-c frpc.toml";

//Issue1: Unable to execute the command-line program frpc.exe
run.it(frpc, cl, dirEtc: new() { CurrentDirectory = folders.ThisApp /*, WindowState = ProcessWindowStyle.Hidden*/ }); //In actual use: the window is hidden.

//Todo1:
//Retrieve the text from the hidden `frpc` command-line window, save it to the variable `s`, and print it.
//string s = getFrpcLogText(); print.it(s);

//Todo2:
//Continuously monitor the text in the hidden frpc command-line window.
//When the specified text (e.g., "start proxy success") appears, a dialog box should pop up displaying the message: "Connection successful!"


600.s(); //In actual use: here is HTTP server code Line 11 ....(https://www.libreautomate.com/forum/showthread.php?tid=7468&pid=36746#pid36746)

//Todo3:
//Ensure that the frpc.exe program always terminates when the "End Task" option is clicked from the context menu of the program's taskbar icon (or when the program encounters an unexpected error).
//process.terminate("frpc.exe");



Messages In This Thread
Retrieve text from the hidden command-line window - by Davider - 08-15-2024, 05:06 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)