ShellExecute() set as wait run
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
ShellExecute() set as wait run
Hi!
prg:
ShellExecute(...)
msginfo("2")
Msginfo() will be run before shellexecute closed , how to set shellexecute, after it is closed, then run msginfo() ?
TKS!
Shuming Wang
prg:
ShellExecute(...)
msginfo("2")
Msginfo() will be run before shellexecute closed , how to set shellexecute, after it is closed, then run msginfo() ?
TKS!
Shuming Wang
Re: ShellExecute() set as wait run
I think you should use WAITRUN(...)
WaitRun("notepad.exe ERROR.TXT")
WaitRun("notepad.exe ERROR.TXT")
Re: ShellExecute() set as wait run
Hi;
MsgRun( "MsgRun() Run Wait", "From FWH 17.05", { || ShellExecute(...), MsgInfo( "2" ) }, oWnd )
MsgRun( "MsgRun() Run Wait", "From FWH 17.05", { || ShellExecute(...), MsgInfo( "2" ) }, oWnd )
Mario Antonio González Osal
Venezuela
m a g 0 7 1 @ g m a i l. c o m
Venezuela
m a g 0 7 1 @ g m a i l. c o m
- richard-service
- Posts: 583
- Joined: Tue Oct 16, 2007 8:57 am
- Location: New Taipei City, Taiwan
- Contact:
Re: ShellExecute() set as wait run
Hi Mr.Wang
I lose my WeChat account. so my new WeChat ID is fivetech_taiwan. please add it.
I have your TMySQL question.
Thanks a lot.
I lose my WeChat account. so my new WeChat ID is fivetech_taiwan. please add it.
I have your TMySQL question.
Thanks a lot.
Regards,
Richard
Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
Richard
Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
Re: ShellExecute() set as wait run
wairun() do not execute paraments as " mysqldump --host 192.168.1.200 -u root -p -C mydatabase>d:\back\mysqldatebas0001"
msgrun still run msginfo() before shellexecute() closed.
Thanks all!
Regards!
Shuming Wang
msgrun still run msginfo() before shellexecute() closed.
Thanks all!
Regards!
Shuming Wang
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: ShellExecute() set as wait run
Yes, it does:ShumingWang wrote:wairun() do not execute paraments as " mysqldump --host 192.168.1.200 -u root -p -C mydatabase>d:\back\mysqldatebas0001"
Code: Select all
WaitRun( "mysqldump --host 192.168.1.200 -u root -p -C mydatabase>d:\back\mysqldatebas0001" )
EMG
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
Re: ShellExecute() set as wait run
With aitrun() not success , seems immediatley closed.
Shuming Wang
Shuming Wang
-
- Posts: 5
- Joined: Tue Sep 23, 2014 5:22 am
- Location: Kochi, India
Re: ShellExecute() set as wait run
Try this,
Code: Select all
MsgWait("Mysql database backup","Backup",Winexec( "c:\mysql\mysqldump --host 192.168.1.200 -u root -p -C mydatabase>d:\back\mysqldatebas0001"))
-
- Posts: 454
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
Re: ShellExecute() set as wait run
Still not success , after input mysql password, seems immediatley closed.
Shuming Wang
Shuming Wang
Re: ShellExecute() set as wait run
Try this,
cArquivoBAT := 'filebat.bat'
cComando := 'mysqldump --host 192.168.1.200 -u root -p -C mydatabase > "d:\back\mysqldatebas0001" '
MsgRun( 'Aguarde...',, { || ExecutaComando( cArquivoBAT, cComando ) )
/******************************************************************************/
static procedure ExecutaComando( cArquivoBAT, cComando )
/*
*/
if !CriaArquivoBatLocal( cArquivoBAT, cComando )
MsgStop('Não foi possível criar o arquivo !', 'Atenção!')
else
WaitRun(cArquivoBAT,.f.)
endif
Ferase(cArquivoBAT)
return
/******************************************************************************/
function CriaArquivoBatLocal( cArquivo, cComando )
/*
*/
local oArquivo
Ferase(cArquivo)
oArquivo := TTxtFile():Create( cArquivo )
if !oArquivo:Open()
return .f.
endif
oArquivo:add('@echo off:')
oArquivo:add(cComando)
oArquivo:Close()
return .t.
cArquivoBAT := 'filebat.bat'
cComando := 'mysqldump --host 192.168.1.200 -u root -p -C mydatabase > "d:\back\mysqldatebas0001" '
MsgRun( 'Aguarde...',, { || ExecutaComando( cArquivoBAT, cComando ) )
/******************************************************************************/
static procedure ExecutaComando( cArquivoBAT, cComando )
/*
*/
if !CriaArquivoBatLocal( cArquivoBAT, cComando )
MsgStop('Não foi possível criar o arquivo !', 'Atenção!')
else
WaitRun(cArquivoBAT,.f.)
endif
Ferase(cArquivoBAT)
return
/******************************************************************************/
function CriaArquivoBatLocal( cArquivo, cComando )
/*
*/
local oArquivo
Ferase(cArquivo)
oArquivo := TTxtFile():Create( cArquivo )
if !oArquivo:Open()
return .f.
endif
oArquivo:add('@echo off:')
oArquivo:add(cComando)
oArquivo:Close()
return .t.