Topic: exe file run

hello dears. how to Run Another Exe file in mvd using click button...

2 (edited by derek 2018-08-08 08:28:33)

Re: exe file run

Hi There,

In a script, you could use something like this:

procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
begin
  openfile('C:\Documents and Settings\user\Desktop\blackpearl\red\red.exe');       //*** calls another MVD program (called red.exe)
end;

procedure Form1_Button2_OnClick (Sender: TObject; var Cancel: boolean);   
begin
  openfile('notepad.exe');                                                                                    //*** calls notepad.exe (no file specified)
end;

procedure Form1_Button3_OnClick (Sender: TObject; var Cancel: boolean);   
begin
  openurl('www.myvisualdatabase.com');                                                        //*** calls the specified website using your default browser
end;

begin
end.

Regards,
Derek.

Re: exe file run

thanks... derek
very usefull

4 (edited by blackpearl8534 2018-08-09 18:09:24)

Re: exe file run

any script to close exe file??/

and how to start and stop service using script???

Re: exe file run

blackpearl8534 wrote:

any script to close exe file??/

Please download latest beta version
https://www.dropbox.com/s/wutj7mnux7f3a … a.zip?dl=0

I have added new function PostMessage, example how to close another app

procedure Form1_Button6_OnClick (Sender: TObject; var Cancel: boolean);
var
    h: Integer;
begin
  h:= FindWindow(nil, 'Calculator');// find window by caption
  PostMessage(h, WM_QUIT, 0, 0);
end;

But not all applications allows to close self in this way.


blackpearl8534 wrote:

and how to start and stop service using script???

    OpenFile('start servicename', 'net');
    OpenFile('stop servicename', 'net');

But you must run your project like "Run as administrator"

Dmitry.

6 (edited by blackpearl8534 2018-08-11 11:59:42)

Re: exe file run

procedure Form1_Button6_OnClick (Sender: TObject; var Cancel: boolean);
var
    h: Integer;
begin
  h:= FindWindow(nil, 'Calculator');// find window by caption
  PostMessage(h, WM_QUIT, 0, 0);
end;

Not working

another script like TASKKILL.

Re: exe file run

Please download latest beta version:
https://www.dropbox.com/s/wutj7mnux7f3a … a.zip?dl=0


I have added new function to kill task, example:

KillTask('notepad.exe');
Dmitry.

Re: exe file run

blackpearl8534 wrote:

thanks sir. I think its usefull for All.
are you palning sql server feature in future????

Unfortunately no.

Dmitry.