Re: Passing parameters to an external program run from fox

2023-05-05 Thread Eric Selje


[image: image.png]

(From the Win32 API App on VFPx)

On Fri, May 5, 2023 at 1:12 AM Joe Yoder  wrote:

> I'm pretty sure I have done this before but now I can't figure out the
> syntax to make this happen.  I finally substituted a batch file to display
> the parameters passed in and to pause to allow reading time.  The batch
> file reports parameters passed in from the command linre but none from VFP.
>
> Can someone help me out?
>
> Thanks in advance,
>
> Joe
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>   text/plain (text body -- kept)
>   text/html
> ---
>
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/CAAwxvUk9EV1_HNbkmOTOrniCJJFw3rW6sroTr=qmeunpdxo...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

RE: Passing parameters to an external program run from fox

2023-05-05 Thread Tracy Pearson
Hi Joe,

If you don't mind a command window opening you can use the ! or RUN.
!c:\temp\params.cmd def abc

I wrote a cmd file that has the following
echo %1, %2
pause

I have these procedures I have used as well
Procedure StartExplorer1
   *-- Start a Windows Explorer window in the current path
   Local oShell As wScript.Shell
   oShell = Createobject("wScript.Shell")
   *-- If the folder list is prefered use "Explorer /e,"
*   oShell.Run("Explorer " + Fullpath(""))
   oShell.Exec("Explorer " + Fullpath(""))
   Release oShell
ENDPROC

PROCEDURE StartExplorer
   DECLARE INTEGER ShellExecute IN Shell32.DLL ;
  INTEGER nWinHandle, ;
  STRING  cOperation, ;
  STRING  cFileName,  ;
  STRING  cParameters, ;
  STRING  cDirectory,  ;
  INTEGER nShowWindow
   LOCAL lcExec, lnRet
   lcExec = ADDBS(GETENV("windir")) + "system32\explorer.exe"
   lnRet = ShellExecute(_Screen.HWnd, "open", SYS(5)+SYS(2003), "",
SYS(5)+SYS(2003), 1)
   *MESSAGEBOX(lcExec + CHR(13) + TRANSFORM(lnRet))
ENDPROC

HTH,
Tracy

-Original Message-
From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Joe
Yoder
Sent: Friday, May 05, 2023 2:13 AM
To: profoxt...@leafe.com
Subject: Passing parameters to an external program run from fox

I'm pretty sure I have done this before but now I can't figure out the
syntax to make this happen.  I finally substituted a batch file to display
the parameters passed in and to pause to allow reading time.  The batch
file reports parameters passed in from the command linre but none from VFP.

Can someone help me out?

Thanks in advance,

Joe


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/01f101d97f59$4654a6b0$d2fdf410$@powerchurch.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Passing parameters to an external program run from fox

2023-05-05 Thread Joe Yoder
I'm pretty sure I have done this before but now I can't figure out the
syntax to make this happen.  I finally substituted a batch file to display
the parameters passed in and to pause to allow reading time.  The batch
file reports parameters passed in from the command linre but none from VFP.

Can someone help me out?

Thanks in advance,

Joe


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/CABQeDnWeGCz6C=s7m0kupjvuo13xn9k5vmnw409cwoyqtd4...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.