Re: Pringing PDFs via ShellExecute from VFP

2021-07-02 Thread Philip Borkholder
Thanks Mike! -- Original Message -- From: Mike To: profoxt...@leafe.com Subject: Re: Pringing PDFs via ShellExecute from VFP Date: Thu, 1 Jul 2021 17:19:55 -0500 This seems to be related to your need...at least the input from DSummZZZ. https://www.tek-tips.com/viewthread.cfm

RE: Pringing PDFs via ShellExecute from VFP

2021-07-02 Thread Philip Borkholder
Thanks Chris! -- Original Message -- From: Chris Davis To: profoxt...@leafe.com Subject: RE: Pringing PDFs via ShellExecute from VFP Date: Fri, 2 Jul 2021 09:43:35 + Hi Philip I had the same problem recently and switched with success to http://www.columbia.edu/~em36

RE: Pringing PDFs via ShellExecute from VFP

2021-07-02 Thread Chris Davis
Hi Philip I had the same problem recently and switched with success to http://www.columbia.edu/~em36/pdftoprinter.html as sometimes we found adobe would leave itself open so any checks to see if it was still running couldn't be relied on. Then using the following ShellExecute code ..

Re: Pringing PDFs via ShellExecute from VFP

2021-07-01 Thread Mike
Hi all, I am currently printing VFP reports in sequence, then using ShellExecute to print PDFs via their default program (Adobe DC). I am trying to keep each print job in sequence so they come out in the tray together: Example: WO #1 Drawings for WO #1 (PDF via ShellExecute) WO #2 Drawings for

Pringing PDFs via ShellExecute from VFP

2021-07-01 Thread Philip Borkholder
Hi all, I am currently printing VFP reports in sequence, then using ShellExecute to print PDFs via their default program (Adobe DC). I am trying to keep each print job in sequence so they come out in the tray together: Example: WO #1 Drawings for WO #1 (PDF via ShellExecute) WO #2 Drawings

Re: ShellExecute

2021-06-10 Thread MB Software Solutions, LLC
Sounds like the Task Scheduler would suit you.  It has an option to not run if there's an existing run in progress. On 6/9/2021 5:33 AM, Chris Davis wrote: Hi All I want to ShellExecute a program repeatedly but not until the previous instance has finished, what's the best appro

RE: ShellExecute

2021-06-09 Thread Chris Davis
: Re: ShellExecute * -- https://docs.microsoft.com/en-us/previous-versions//d5fk67ky(v=vs.85) Function RunUsingWSH(lcExe, lcCommandLine) as Integer Local loWshShell loWshShell = CreateObject("WScript.Shell") this.nProcess

Re: ShellExecute

2021-06-09 Thread Alan Bourke
.Run(lcExe + " " + lcCommandLine, 1, .t.) && Wait for result. Endfunc -- Alan Bourke alanpbourke (at) fastmail (dot) fm On Wed, 9 Jun 2021, at 10:33 AM, Chris Davis wrote: > Hi All > > I want to ShellExecute a program repeatedly b

Re: ShellExecute

2021-06-09 Thread Jan Bucek
Dne 9.6.2021 v 11:33 Chris Davis napsal(a): Hi All I want to ShellExecute a program repeatedly but not until the previous instance has finished, what's the best approach? So I effectively want to wait in a loop until the previous instance exits and then run it again. Ideas? Lo

ShellExecute

2021-06-09 Thread Chris Davis
Hi All I want to ShellExecute a program repeatedly but not until the previous instance has finished, what's the best approach? So I effectively want to wait in a loop until the previous instance exits and then run it again. Ideas? TIA Chris. --- StripMime Report -- processed MIME

RE: Default application for shellexecute

2017-03-28 Thread Paul Newton
Thanks anyway Dave -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Dave Crozier Sent: 28 March 2017 16:55 To: profoxt...@leafe.com Subject: RE: Default application for shellexecute Oops! Just seen that Alan has pre-emptied my post! Sorry Dave

RE: Default application for shellexecute

2017-03-28 Thread Paul Newton
Brilliant - exactly what I wanted - Thanks Alan -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Alan Bourke Sent: 28 March 2017 16:32 To: profoxt...@leafe.com Subject: Re: Default application for shellexecute http://fox.wikis.com/wc.dll?Wiki

RE: Default application for shellexecute

2017-03-28 Thread Dave Crozier
Oops! Just seen that Alan has pre-emptied my post! Sorry Dave -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Dave Crozier Sent: 28 March 2017 16:54 To: ProFox Email List Subject: RE: Default application for shellexecute You can do it with the registry

RE: Default application for shellexecute

2017-03-28 Thread Dave Crozier
:32 To: profoxt...@leafe.com Subject: Re: Default application for shellexecute http://fox.wikis.com/wc.dll?Wiki~AssocQueryString -- Alan Bourke alanpbourke (at) fastmail (dot) fm [excessive quoting removed by server] ___ Post Messages to: ProFox

Re: Default application for shellexecute

2017-03-28 Thread Alan Bourke
http://fox.wikis.com/wc.dll?Wiki~AssocQueryString -- Alan Bourke alanpbourke (at) fastmail (dot) fm ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http:

Default application for shellexecute

2017-03-28 Thread Paul Newton
Hi all I want to find out in advance what application shellexecute will invoke for a given file type (e.g.TXT, XLS, DOC) etc. or indeed if there is no default application for the file type in question. Any ideas ? Many thanks Paul Newton ___ Post

Re: ShellExecute window size ignored

2016-04-11 Thread Ted Roche
Another point of view to consider here is that, in using ShellExecute, you're yielding to Windows to open the PDF in the registered application. It may be the default Reader in some OS. It may be FoxIt, as someone's already mentioned. It may be the full Adobe Suite, if someone has that

RE: ShellExecute window size ignored

2016-04-11 Thread Paul Newton
Thank you Fernando -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Fernando D. Bozzo Sent: 11 April 2016 13:35 To: profoxt...@leafe.com Subject: Re: ShellExecute window size ignored Hi Paul: The problem is that Adobe Reader is not a normal

Re: ShellExecute window size ignored

2016-04-11 Thread Fernando D. Bozzo
Hi Paul: The problem is that Adobe Reader is not a normal application, and do not respect normal messages. I've found an awful hack, but seem to work: http://superuser.com/questions/640174/how-to-start-adobe-reader-with-window-maximized?newreg=e8665170ca67456285b056122e43653d 2016-04-11 13:2

RE: ShellExecute window size ignored

2016-04-11 Thread Dave Crozier
Oh, and the hndWin parameter is numeric Dave -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Dave Crozier Sent: 11 April 2016 13:27 To: ProFox Email List Subject: RE: ShellExecute window size ignored Paul, I don't use Adobe it is a pain but the equiv

RE: ShellExecute window size ignored

2016-04-11 Thread Dave Crozier
Paul, I don't use Adobe it is a pain but the equivalent runs with FoxitReader PDF reader. Set up cParams to be path to the PDF to open. DECLARE INTEGER ShellExecute IN shell32.dll ; INTEGER hndWin, ; STRING cAction, ; STRING cFileName, ; STRING cParams, ; STRING

RE: ShellExecute window size ignored

2016-04-11 Thread Paul Newton
t: 11 April 2016 12:04 To: profoxt...@leafe.com Subject: Re: ShellExecute window size ignored Hi Paul: lcCallingWindow should be numeric, and normally is 0. Try if this makes any difference El 11/4/2016 11:49 a. m., "Paul Newton" escribió: > Hi all > > I am trying to view a P

Re: ShellExecute window size ignored

2016-04-11 Thread Fernando D. Bozzo
Hi Paul: lcCallingWindow should be numeric, and normally is 0. Try if this makes any difference El 11/4/2016 11:49 a. m., "Paul Newton" escribió: > Hi all > > I am trying to view a PDF in a maximized window > > ShellExecute(lcCallingWindow, "Open",

ShellExecute window size ignored

2016-04-11 Thread Paul Newton
Hi all I am trying to view a PDF in a maximized window ShellExecute(lcCallingWindow, "Open", lcFileName, "", "", 3) The last parameter _should_ force the application window to be maximized but it doesn't :( The default application for PDFs on my system is

Re: SHELLEXECUTE() - Solution

2013-09-04 Thread Ted Roche
On Wed, Sep 4, 2013 at 5:02 PM, Jeff Johnson wrote: > I had two problems, shellexecute for emails and urls. In Windows 7 you go > into Control Panel / Programs and Set Default Programs. This worked for > the browser. I wanted to use GMail and couldn't get rid of Outlook in the

Re: SHELLEXECUTE()

2013-09-04 Thread Mike Copeland
it's a bug, but... Mike Copeland Original Message Subject: SHELLEXECUTE() From: Jeff Johnson To: profoxt...@leafe.com Date: 9/4/2013 3:01 PM I have an application that uses shellexecute() to access web pages. It works everywhere it is installed except for one computer. I

Re: SHELLEXECUTE()

2013-09-04 Thread MB Software Solutions, LLC
On 9/4/2013 4:48 PM, Mike Copeland wrote: Is it by chance a Win7 or 8 or Fista system? "Fista".ROFLMAO -- Mike Babcock, MCP MB Software Solutions, LLC President, Chief Software Architect http://mbsoftwaresolutions.com http://fabmate.com http://twitter.com/mbabcock16

Re: SHELLEXECUTE()

2013-09-04 Thread Mike Copeland
Oops. A non-Freudian slip. Original Message Subject: Re: SHELLEXECUTE() From: MB Software Solutions, LLC To: profoxt...@leafe.com Date: 9/4/2013 4:07 PM On 9/4/2013 4:48 PM, Mike Copeland wrote: Is it by chance a Win7 or 8 or Fista system? "Fista"..

Re: SHELLEXECUTE() - Solution

2013-09-04 Thread Jeff Johnson
I had two problems, shellexecute for emails and urls. In Windows 7 you go into Control Panel / Programs and Set Default Programs. This worked for the browser. I wanted to use GMail and couldn't get rid of Outlook in the above place. I downloaded gmaildefaultmaker at

SHELLEXECUTE()

2013-09-04 Thread Jeff Johnson
I have an application that uses shellexecute() to access web pages. It works everywhere it is installed except for one computer. I get an error 31 no application associated with this request. IE is what I want to call and it is set as the default browser. Wassup? TIA -- Jeff

Re: Notepad/ShellExecute

2013-06-20 Thread Ted Roche
Yes, but that would be wrong. 1. Query the registry for the current notepad font, and save it. 2. Modify the registry to use the font you prefer. 3. Launch notepad MyFile.txt using the RUN command (no need to shellexecute if you're not depending on the shell to match the filetype to the ha

Notepad/ShellExecute

2013-06-20 Thread Sytze de Boer
Is there a way to shellexecute and always open a TXT file with Notepad, with a specific Font ? i.e. In one of my systems, I use Notepad to open a TXT file I want it to always default to Courier New font -- Kind regards Sytze de Boer Kiss Software --- StripMime Report -- processed MIME

Re: Problem with OutlookExpress 6 email from VFP9SP1 via ShellExecute launch

2009-10-29 Thread MB Software Solutions, LLC
Tracy Pearson wrote: > Is it supposed to be ?CC or &CC In the command line that's built, it's to be ?CC, but we're using &CC in our code to insert the value from the property. It works with Outlook and Thunderbird...that's what's goofy about this. My only idea is to conditionally add the ?CC

RE: Problem with OutlookExpress 6 email from VFP9SP1 via ShellExecute launch

2009-10-29 Thread Tracy Pearson
MPTY(lcMailTo) MESSAGEBOX("The email address is empty",0+48,'Symplicity') ELSE lcMail = "mailto:"+lcMailTo+; "?CC= "+lcCC+"&BCC= "+lcBCC+"&Subject= "+lcSubject+"&Body= "+lcBody T

RE: VFP9 - Shellexecute

2009-10-08 Thread Tracy Pearson
You're welcome. -Original Message- From: Sytze de Boer Sent: Thursday, October 08, 2009 6:16 PM Tracy, there are a number of **refer Tracy/Profox in my system(s) THANK you once again for your patience S ___ Post Messages to: ProFox@leafe

Re: VFP9 - Shellexecute

2009-10-08 Thread Sytze de Boer
Tracy, there are a number of **refer Tracy/Profox in my system(s) THANK you once again for your patience S On Fri, Oct 9, 2009 at 11:05 AM, Tracy Pearson wrote: > Yes. This will give the reason there is an error. From that we could > expand. > > Possibly even this to narrow things down to the

RE: VFP9 - Shellexecute

2009-10-08 Thread Tracy Pearson
Yes. This will give the reason there is an error. From that we could expand. Possibly even this to narrow things down to the problem line. Catch to oException Theproblem = oException.Message + " on line: " + Transform(oException.LineNo) Returning out of a Try/EndTry construct is a bad t

Re: VFP9 - Shellexecute

2009-10-08 Thread Sytze de Boer
lid path causing an error. I didn't think ShellExecute > actually throws an error though, it returns a number from 0 to 32 as an > error. > > If the declaration isn't found, it's possible to get a different error. If > you could catch the MESSAGE() inside the CATCH,

RE: VFP9 - Shellexecute

2009-10-08 Thread Tracy Pearson
The only other thought I have regarding the error, the SYS(2023) might be returning an invalid path causing an error. I didn't think ShellExecute actually throws an error though, it returns a number from 0 to 32 as an error. If the declaration isn't found, it's possible to get a

Re: VFP9 - Shellexecute

2009-10-08 Thread Sytze de Boer
Hi Tracy I'll try your suggestion. Yes, it's word wrap issues. Note the * before return Many thanks Tracy On Fri, Oct 9, 2009 at 9:48 AM, Tracy Pearson wrote: > Since you are using Try/Catch, you can drop the use of FindWindow and use > _VFP.hWnd. > > ShellExec

RE: VFP9 - Shellexecute

2009-10-08 Thread Tracy Pearson
Since you are using Try/Catch, you can drop the use of FindWindow and use _VFP.hWnd. ShellExecute(_VFP.hWnd,tcAction,tcFile,"",Sys(2023),1) Are you really calling the ShellExecute twice, or is that just word wrap isses? -Original Message- From: Sytze de Boer Sent: Thursday,

Re: VFP9 - Shellexecute

2009-10-08 Thread Sytze de Boer
Here is the full routine Try tcAction='OPEN' tcFile="http://kingcashbook.com"; Wait Window Nowait 'Opening '+tcFile Declare Integer ShellExecute ; IN SHELL32.Dll ; INTEGER nWinHandle,; STRING cOperation,; STRING cFileN

RE: VFP9 - Shellexecute

2009-10-08 Thread Tracy Pearson
What message() is in the catch? Are you directly returning the value of ShellExecute to the calling code? Depending on your declaration it might be expecting a logical and the declaring returns a numeric. -Original Message- >From Sytze de Boer Sent: Thursday, October 08, 2009 3:52

VFP9 - Shellexecute

2009-10-08 Thread Sytze de Boer
Some clients were reporting issues with a specific module in my system So, I thought I would try something with Try/Endtry Within the try/endtry routine, this returns an error and goes to Catch tcFile="http://kingcashbook.com"; Return ShellExecute(FindWindow(0,_Screen.Caption),tcAct

RE: Behaviour of ShellExecute function

2008-04-09 Thread Tracy Pearson
>From what I've determined, ShellExecute launches in the Windows System folder in XP. In Vista it launches as the current user using the current environment. ShellExecute returns immediately which in some scenarios is a drawback. Tracy -Original Message- From: Eurico Chagas Fi

Behaviour of ShellExecute function

2008-04-09 Thread Eurico Chagas Filho
Hi I am using VFP9 SP2. When I execute a ShellExecute() from an .exe in the c: drive, executing an .exe in the E: drive, SYS(5) gives c: in a computer with WinXP SP2 OS, but gives E: in a computer with Vista. Nice hum ? E. No virus found in this outgoing message. Checked by AVG. Version

Re: Shellexecute problem

2008-01-14 Thread Paul Newton
Dave What can I say ... ? Many thanks Or as (Somebody) would write ... maNy thAnKs Reading his code is *painful* ... Paul Dave Crozier wrote: > Paul, > Also here is a program to take an open window opened with notepad and send > keystrokes to it. > > 1. Open a new Notepad File (right click i

RE: Shellexecute problem

2008-01-14 Thread Dave Crozier
e active window Function GetActiveWind Declare Integer GetActiveWindow In user32 Return (GetActiveWindow()) * EndFunc -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Newton Sent: 14 January 2008 17:12 To: profox@leafe.com Subject: Re: Shellexecu

Re: Shellexecute problem

2008-01-14 Thread Paul Newton
Allen wrote: > They seem to be in the regitry > HKEY_CURRENT_USER\Software\Microsoft\Notepad\ > Allen > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Vince Teachout > Sent: 14 January 2008 17:16 > To: [EMAIL PROTECTED]

Re: Shellexecute problem

2008-01-14 Thread Paul Newton
Many thanks Dave Paul Dave Crozier wrote: > Paul, > Use this to see if Notepad is running > > Dave Crozier > > *** > * Start of Code > * > ? IsRunning("Notepad") > > Function IsRunning > Lparameter pctitle > > Declare INTEGER GetActiveWindow IN Win32API > Declare INTEGER GetWindow

RE: Shellexecute problem

2008-01-14 Thread Allen
They seem to be in the regitry HKEY_CURRENT_USER\Software\Microsoft\Notepad\ Allen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vince Teachout Sent: 14 January 2008 17:16 To: [EMAIL PROTECTED] Subject: Re: Shellexecute problem Paul Newton wrote

Re: Shellexecute problem

2008-01-14 Thread Vince Teachout
Paul Newton wrote: > Vince > > That reminds me of the one about "miracles and impossibilities" :-) > Don't know that one. Share, please. :) ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT

RE: Shellexecute problem

2008-01-14 Thread Dave Crozier
MAIL PROTECTED] On Behalf Of Paul Newton Sent: 14 January 2008 16:10 To: profox@leafe.com Subject: Shellexecute problem Hi all I placed Dave's code in a PRG called PrintFile.PRG which accepts as a parameter the full path and name of the file to print. Elsewhere I have some code that l

RE: Shellexecute problem

2008-01-14 Thread Eurico Chagas Filho
Hi If all you want is to print the file, you could use a procedure called SendToPrint() posted by Michael. HTH, E. No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.0/1216 - Release Date: 09-Jan-08 10:16 _

Re: Shellexecute problem

2008-01-14 Thread Paul Newton
Vince That reminds me of the one about "miracles and impossibilities" :-) Paul Newton Vince Teachout wrote: > Paul Newton wrote: > >> Also is there a way to prevent Notepad printing the file with a >> (filename) header and (page number) footer ? >> > > I can help with the easy part. In

Re: Shellexecute problem

2008-01-14 Thread Vince Teachout
Paul Newton wrote: > Also is there a way to prevent Notepad printing the file with a > (filename) header and (page number) footer ? I can help with the easy part. In Notepad, open File, page setup, and delete the header and footer stuff. I don't think that can be done programatically, though.

Shellexecute problem

2008-01-14 Thread Paul Newton
Many thanks Paul Newton Dave Crozier wrote: > * API Call to print out or OPEN a document > > Declare Integer ShellExecute In Shell32.Dll ; > INTEGER nWinHandle,; > STRING cOperation,; > STRING cFileName,; > STRING cParameters,; > STRING cDire