Re: Pringing PDFs via ShellExecute from VFP
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?qid=85 <https://www.tek-tips.com/viewthread.cfm?qid=85> May need to sort through the output to find what you're looking for. Mike Philip Borkholder wrote: > 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 WO #1 (PDF via ShellExecute) > > etc. > > What I'm running into is sometimes WO#2 prints out before WO#1's PDF prints > from Adobe DC. > > Does anyone have experience in using a Windows API to see if Adobe has > printed the PDF before I can continue printing my next VFP form? > > Thanks > > Philip B > Bison Tech Plus > [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/20210702.085231.245...@webmail03.dca.untd.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: Pringing PDFs via ShellExecute from VFP
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/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 ... you will notice my method on the form agcheckexe("pdftoprinter.exe"), I have included that code as well as this basically loops until any previous instances have finished before it launches again for the next PDF you want to queue up ... && PDF PRINT METHOD LPARAMETERS lcfilename lcfilename=ALLTRIM(TRANSFORM(lcfilename)) declare INTEGER ShellExecute in shell32 INTEGER handle, STRING @ oper, ; STRING @ ifile, STRING @ iparam, STRING @ ipath, INTEGER showcmd lcfile="c:\pdfprinter\pdftoprinter.exe" lcpath="" lcparam=["]+lcfilename+["] DO WHILE thisform.agcheckexe("pdftoprinter.exe") ENDDO shellexecute(0,"open",lcfile,lcparam,lcpath,1) = && AGCHECKEXE METHOD LPARAMETERS tcName, tlTerminate LOCAL loLocator, loWMI, loProcesses, loProcess, llIsRunning loLocator = CREATEOBJECT('WBEMScripting.SWBEMLocator') loWMI = loLocator.ConnectServer() loWMI.Security_.ImpersonationLevel = 3 && Impersonate loProcesses = loWMI.ExecQuery([SELECT * FROM Win32_Process WHERE Name = '] + tcName + [']) llIsRunning = .F. IF loProcesses.Count > 0 FOR EACH loProcess in loProcesses llIsRunning = .T. IF tlTerminate loProcess.Terminate(0) ENDIF ENDFOR ENDIF RETURN llIsRunning Regards Chris -Original Message- From: ProfoxTech On Behalf Of Philip Borkholder Sent: 01 July 2021 20:55 To: profoxt...@leafe.com Subject: Pringing PDFs via ShellExecute from VFP 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 WO #1 (PDF via ShellExecute) etc. What I'm running into is sometimes WO#2 prints out before WO#1's PDF prints from Adobe DC. Does anyone have experience in using a Windows API to see if Adobe has printed the PDF before I can continue printing my next VFP form? Thanks Philip B Bison Tech Plus [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/20210702.085218.245...@webmail03.dca.untd.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: Pringing PDFs via ShellExecute from VFP
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 ... you will notice my method on the form agcheckexe("pdftoprinter.exe"), I have included that code as well as this basically loops until any previous instances have finished before it launches again for the next PDF you want to queue up ... && PDF PRINT METHOD LPARAMETERS lcfilename lcfilename=ALLTRIM(TRANSFORM(lcfilename)) declare INTEGER ShellExecute in shell32 INTEGER handle, STRING @ oper, ; STRING @ ifile, STRING @ iparam, STRING @ ipath, INTEGER showcmd lcfile="c:\pdfprinter\pdftoprinter.exe" lcpath="" lcparam=["]+lcfilename+["] DO WHILE thisform.agcheckexe("pdftoprinter.exe") ENDDO shellexecute(0,"open",lcfile,lcparam,lcpath,1) = && AGCHECKEXE METHOD LPARAMETERS tcName, tlTerminate LOCAL loLocator, loWMI, loProcesses, loProcess, llIsRunning loLocator = CREATEOBJECT('WBEMScripting.SWBEMLocator') loWMI = loLocator.ConnectServer() loWMI.Security_.ImpersonationLevel = 3 && Impersonate loProcesses = loWMI.ExecQuery([SELECT * FROM Win32_Process WHERE Name = '] + tcName + [']) llIsRunning = .F. IF loProcesses.Count > 0 FOR EACH loProcess in loProcesses llIsRunning = .T. IF tlTerminate loProcess.Terminate(0) ENDIF ENDFOR ENDIF RETURN llIsRunning Regards Chris -Original Message- From: ProfoxTech On Behalf Of Philip Borkholder Sent: 01 July 2021 20:55 To: profoxt...@leafe.com Subject: Pringing PDFs via ShellExecute from VFP 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 WO #1 (PDF via ShellExecute) etc. What I'm running into is sometimes WO#2 prints out before WO#1's PDF prints from Adobe DC. Does anyone have experience in using a Windows API to see if Adobe has printed the PDF before I can continue printing my next VFP form? Thanks Philip B Bison Tech Plus [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/loyp123mb3325f2252a0e2d9c4657db7f8f...@loyp123mb3325.gbrp123.prod.outlook.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: Pringing PDFs via ShellExecute from VFP
This seems to be related to your need...at least the input from DSummZZZ. https://www.tek-tips.com/viewthread.cfm?qid=85 <https://www.tek-tips.com/viewthread.cfm?qid=85> May need to sort through the output to find what you're looking for. Mike Philip Borkholder wrote: 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 WO #1 (PDF via ShellExecute) etc. What I'm running into is sometimes WO#2 prints out before WO#1's PDF prints from Adobe DC. Does anyone have experience in using a Windows API to see if Adobe has printed the PDF before I can continue printing my next VFP form? Thanks Philip B Bison Tech Plus [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/46a665a5-4cf2-861c-66e2-85b242095...@ggisoft.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.
Pringing PDFs via ShellExecute from VFP
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 WO #1 (PDF via ShellExecute) etc. What I'm running into is sometimes WO#2 prints out before WO#1's PDF prints from Adobe DC. Does anyone have experience in using a Windows API to see if Adobe has printed the PDF before I can continue printing my next VFP form? Thanks Philip B Bison Tech Plus ___ 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/20210701.155454.1189...@webmail01.dca.untd.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: ShellExecute
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 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 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/67ce1cfb-3fcd-e007-557a-9c98bfe90...@mbsoftwaresolutions.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: ShellExecute
Thanks Alan also found this which seems to work very well ... https://www.berezniker.com/content/pages/visual-foxpro/check-if-exe-running-and-optionally-terminate-it -Original Message- From: ProfoxTech On Behalf Of Alan Bourke Sent: 09 June 2021 11:40 To: profoxt...@leafe.com Subject: 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.nProcessReturnCode = loWshShell.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 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 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/cwlp123mb33162651fe5f6b41decbc3fe8f...@cwlp123mb3316.gbrp123.prod.outlook.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: 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.nProcessReturnCode = loWshShell.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 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 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/06f15e58-d134-435f-b81f-283ca9ab2...@www.fastmail.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: ShellExecute
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? Look at command START /wait: c:> start /? TIA Chris. --- 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/67c8f730-c0bb-7c68-475a-ab9f5a022...@post.cz ** 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.
ShellExecute
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 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/cwlp123mb3316b406efac3e18021770c38f...@cwlp123mb3316.gbrp123.prod.outlook.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: Default application for shellexecute
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 -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Dave Crozier Sent: 28 March 2017 16:54 To: ProFox Email List <profox@leafe.com> Subject: RE: Default application for shellexecute You can do it with the registry approach but it is unreliable is unreliable in Windows 8.1 onwards and you should really use the Win32 API calls to AssocQueryString. Dave -Original Message- From: ProFox [mailto:profox-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~AssocQueryString -- Alan Bourke alanpbourke (at) fastmail (dot) fm [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/by2pr0201mb17977134e2c60fce0a11636ea1...@by2pr0201mb1797.namprd02.prod.outlook.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: Default application for shellexecute
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~AssocQueryString -- Alan Bourke alanpbourke (at) fastmail (dot) fm [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/by2pr0201mb1797a87a43f72caba1854e77a1...@by2pr0201mb1797.namprd02.prod.outlook.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: Default application for shellexecute
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 <profox@leafe.com> Subject: RE: Default application for shellexecute You can do it with the registry approach but it is unreliable is unreliable in Windows 8.1 onwards and you should really use the Win32 API calls to AssocQueryString. Dave -Original Message- From: ProFox [mailto:profox-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~AssocQueryString -- Alan Bourke alanpbourke (at) fastmail (dot) fm [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/18725b8cd2d5d247873a2baf401d4ab2a454b...@ex2010-a-fpl.fpl.LOCAL ** 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: Default application for shellexecute
You can do it with the registry approach but it is unreliable is unreliable in Windows 8.1 onwards and you should really use the Win32 API calls to AssocQueryString. Dave -Original Message- From: ProFox [mailto:profox-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~AssocQueryString -- Alan Bourke alanpbourke (at) fastmail (dot) fm [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/18725b8cd2d5d247873a2baf401d4ab2a454b...@ex2010-a-fpl.fpl.LOCAL ** 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: Default application for shellexecute
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://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/1490715098.100656.926221120.72eda...@webmail.messagingengine.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.
Default application for shellexecute
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 Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/by2pr0201mb1797861b34598bb2417b5d3aa1...@by2pr0201mb1797.namprd02.prod.outlook.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: ShellExecute window size ignored
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 installed. Or it may be CutePDF reader or PDFCreator. Or the VIP reader for the blind. If you're dealing with an in-house app where you control the desktop, or if you ship a reader with your app, you may have more control to get the effect you want. But if you just want to launch "the reader" you might have to depend on the user to set things the way they would prefer. On Mon, Apr 11, 2016 at 8:38 AM, Paul Newton <paul.new...@pegasus.co.uk> wrote: > 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 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:27 GMT+02:00 Paul Newton <paul.new...@pegasus.co.uk>: > >> Thanks but I tried that and it still didn't work - it was another >> developer who wrote the code and assigned a numeric value to >> lcCallingWindow instead of lnCallingWindow >> >> > > > --- 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: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CACW6n4uq=ishmkjhahfzlwdwuvw-hahbq47xqn5w1oz67xm...@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: ShellExecute window size ignored
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 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:27 GMT+02:00 Paul Newton <paul.new...@pegasus.co.uk>: > Thanks but I tried that and it still didn't work - it was another > developer who wrote the code and assigned a numeric value to > lcCallingWindow instead of lnCallingWindow > > --- 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: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/9a8106afb0ef9b44b69045c4448935a20141082...@nlbawexmbx1.infor.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: ShellExecute window size ignored
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:27 GMT+02:00 Paul Newton: > Thanks but I tried that and it still didn't work - it was another > developer who wrote the code and assigned a numeric value to > lcCallingWindow instead of lnCallingWindow > > --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAGQ_JumA=sezxvtkgqps1bcjosm-vtw3nio9uuj_nprmpn1...@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: ShellExecute window size ignored
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 <profox@leafe.com> Subject: RE: ShellExecute window size ignored 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 cDir, ; INTEGER nShowWin cParams="" cFileName = "C:\Program Files (x86)\Foxit Software\Foxit Reader\foxitreader.exe" cAction = "open" *nMode = 1 && Standard Window nMode = 3 && Full screen ShellExecute(0,cAction,cFileName,cParams,"",nMode) -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Paul Newton Sent: 11 April 2016 12:27 To: profox@leafe.com Subject: RE: ShellExecute window size ignored Thanks but I tried that and it still didn't work - it was another developer who wrote the code and assigned a numeric value to lcCallingWindow instead of lnCallingWindow -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Fernando D. Bozzo Sent: 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" <paul.new...@pegasus.co.uk> escribió: > 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 Adobe Reader XI > V11.0.09 and I am running Windows 7. Has anybody else had a similar issue? > > Thanks > > Paul Newton > > [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cagq_jums0wcmhyhonuqvbla-qv4aatcoq-yqcd6dpyexw9x...@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. Report [OT] Abuse: http://leafe.com/reportAbuse/cagq_jums0wcmhyhonuqvbla-qv4aatcoq-yqcd6dpyexw9x...@mail.gmail.com ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/9a8106afb0ef9b44b69045c4448935a20141082...@nlbawexmbx1.infor.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. ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/18725b8cd2d5d247873a2baf401d4ab2852cf...@ex2010-a-fpl.fpl.LOCAL ** 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. ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/18725b8cd2d5d247873a2baf401d4ab2852cf...@ex2010-a-fpl.fpl.LOCAL ** 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: ShellExecute window size ignored
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 cDir, ; INTEGER nShowWin cParams="" cFileName = "C:\Program Files (x86)\Foxit Software\Foxit Reader\foxitreader.exe" cAction = "open" *nMode = 1 && Standard Window nMode = 3 && Full screen ShellExecute(0,cAction,cFileName,cParams,"",nMode) -Original Message- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Paul Newton Sent: 11 April 2016 12:27 To: profox@leafe.com Subject: RE: ShellExecute window size ignored Thanks but I tried that and it still didn't work - it was another developer who wrote the code and assigned a numeric value to lcCallingWindow instead of lnCallingWindow -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Fernando D. Bozzo Sent: 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" <paul.new...@pegasus.co.uk> escribió: > 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 Adobe Reader XI > V11.0.09 and I am running Windows 7. Has anybody else had a similar issue? > > Thanks > > Paul Newton > > [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cagq_jums0wcmhyhonuqvbla-qv4aatcoq-yqcd6dpyexw9x...@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. Report [OT] Abuse: http://leafe.com/reportAbuse/cagq_jums0wcmhyhonuqvbla-qv4aatcoq-yqcd6dpyexw9x...@mail.gmail.com ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/9a8106afb0ef9b44b69045c4448935a20141082...@nlbawexmbx1.infor.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. ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/18725b8cd2d5d247873a2baf401d4ab2852cf...@ex2010-a-fpl.fpl.LOCAL ** 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: ShellExecute window size ignored
Thanks but I tried that and it still didn't work - it was another developer who wrote the code and assigned a numeric value to lcCallingWindow instead of lnCallingWindow -Original Message- From: ProfoxTech [mailto:profoxtech-boun...@leafe.com] On Behalf Of Fernando D. Bozzo Sent: 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" <paul.new...@pegasus.co.uk> escribió: > 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 Adobe Reader XI > V11.0.09 and I am running Windows 7. Has anybody else had a similar issue? > > Thanks > > Paul Newton > > [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cagq_jums0wcmhyhonuqvbla-qv4aatcoq-yqcd6dpyexw9x...@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. Report [OT] Abuse: http://leafe.com/reportAbuse/cagq_jums0wcmhyhonuqvbla-qv4aatcoq-yqcd6dpyexw9x...@mail.gmail.com ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/9a8106afb0ef9b44b69045c4448935a20141082...@nlbawexmbx1.infor.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: 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" <paul.new...@pegasus.co.uk> escribió: > 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 Adobe Reader XI V11.0.09 > and I am running Windows 7. Has anybody else had a similar issue? > > Thanks > > Paul Newton > > [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cagq_jums0wcmhyhonuqvbla-qv4aatcoq-yqcd6dpyexw9x...@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.
ShellExecute window size ignored
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 Adobe Reader XI V11.0.09 and I am running Windows 7. Has anybody else had a similar issue? Thanks Paul Newton ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/9a8106afb0ef9b44b69045c4448935a20141082...@nlbawexmbx1.infor.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.
SHELLEXECUTE()
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 --- Jeff Johnson j...@san-dc.com (623) 582-0323 www.san-dc.com www.arelationshipmanager.com ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/522791b4.5000...@san-dc.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: SHELLEXECUTE() - Solution
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 http://gmaildefault.codeplex.com/ and buzzinga! It all works. http://gmaildefault.codeplex.com/ Jeff --- Jeff Johnson j...@san-dc.com (623) 582-0323 www.san-dc.com www.arelationshipmanager.com On 09/04/2013 01:48 PM, Mike Copeland wrote: Is it by chance a Win7 or 8 or Fista system? If yes, then try setting the default in the Windows setup app to whatever application you're trying to run. Windows will typically be set to use default but by setting the app explicitly the links begin working again. I think it's a bug, but... Mike Copeland Original Message Subject: SHELLEXECUTE() From: Jeff Johnson j...@san-dc.com 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 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 [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/52279fe6.5030...@san-dc.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: SHELLEXECUTE()
Oops. A non-Freudian slip. Original Message Subject: Re: SHELLEXECUTE() From: MB Software Solutions, LLC mbsoftwaresoluti...@mbsoftwaresolutions.com 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.ROFLMAO ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/5227a2eb.6070...@ggisoft.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: SHELLEXECUTE()
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 ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/5227a0f7.4050...@mbsoftwaresolutions.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: SHELLEXECUTE()
Is it by chance a Win7 or 8 or Fista system? If yes, then try setting the default in the Windows setup app to whatever application you're trying to run. Windows will typically be set to use default but by setting the app explicitly the links begin working again. I think it's a bug, but... Mike Copeland Original Message Subject: SHELLEXECUTE() From: Jeff Johnson j...@san-dc.com 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 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 ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/52279caf.8010...@ggisoft.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: SHELLEXECUTE() - Solution
On Wed, Sep 4, 2013 at 5:02 PM, Jeff Johnson j...@san-dc.com 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 above place. I downloaded gmaildefaultmaker at http://gmaildefault.codeplex.**com/ http://gmaildefault.codeplex.com/ and buzzinga! It all works. That's a pretty cool project, Jeff! Thanks for passing on the resolution! -- Ted Roche Ted Roche Associates, LLC http://www.tedroche.com --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CACW6n4v_zjgXMLTEno=r2ez7kvku0gav1ab+g_wcjbrqlcx...@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.
Notepad/ShellExecute
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 parts --- multipart/alternative text/plain (text body -- kept) text/html --- ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cag1nny_thta3d1r6mnjnb5yn_2lgoigdygz4wnzwvhr1p0s...@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: Notepad/ShellExecute
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 handler) 4. Wait a respectable amount of time for Notepad to launch with your preferred font. 5. Restore the registry value to the value you saved in #1. On Thu, Jun 20, 2013 at 4:38 PM, Sytze de Boer sytze.k...@gmail.com wrote: Is there a way to shellexecute and always open a TXT file with Notepad, with a specific Font ? Why not something (this is meta-code, use the reference for syntax) along the lines of: DEFINE WINDOW FRED from 0,0 to 600,800 FONT Courier New, 12 MODIFY FILE MyFile.txt IN WINDOW FRED NOMODIFY NOWAIT -- Ted Roche Ted Roche Associates, LLC http://www.tedroche.com --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cacw6n4ta2f5fvsukjiu373rmropryn-swmkc6tq5x7rxg9k...@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: Problem with OutlookExpress 6 email from VFP9SP1 via ShellExecute launch
Is it supposed to be ?CC or CC Tracy -Original Message- From: MB Software Solutions, LLC Sent: Thursday, October 29, 2009 8:40 AM In our app, we allow the user to click on a label and it launches the email program (...code is below). Problem is that the CC and BCC fields come up unknown in OE6, but not other email programs. My challenge is to find out why it says unknown in OE6 and better yet, find a way for it just to come up blank instead of saying unknown. Ideas? tia! --Mike LOCAL lcMail, lcMailTo, lcCC, lcBCC, lcSubject, lcBody STORE '' TO lcMail, lcMailTo, lcCC, lcBCC, lcSubject, lcBody IF !EMPTY(this.cMailTo) TRY lcMailTo = ALLTRIM(EVALUATE(This.cMailTo)) CATCH lcMailTo = ALLTRIM(This.cMailTo) ENDTRY ENDIF IF !EMPTY(This.cCC) TRY lcCC = ALLTRIM(EVALUATE(This.cCC)) CATCH lcCC = ALLTRIM(This.cCC) ENDTRY ENDIF IF !EMPTY(This.cBCC) TRY lcBCC = ALLTRIM(EVALUATE(This.cBCC)) CATCH lcBCC = ALLTRIM(This.cBCC) ENDTRY ENDIF IF !EMPTY(This.cSubject) TRY lcSubject = ALLTRIM(EVALUATE(This.cSubject)) CATCH lcSubject = This.cSubject ENDTRY ENDIF IF !EMPTY(This.cBody) TRY lcBody = ALLTRIM(EVALUATE(This.cBody)) CATCH lcBody = this.cBody ENDTRY ENDIF IF EMPTY(lcMailTo) MESSAGEBOX(The email address is empty,0+48,'Symplicity') ELSE lcMail = mailto:+lcMailTo+; ?CC= +lcCC+BCC= +lcBCC+Subject= +lcSubject+Body= +lcBody TRY ShellExecute(0,open,lcMail,,,1) CATCH MESSAGEBOX(Symplicity could not launch your email program,16,'Symplicity') ENDTRY ENDIF -- Mike Babcock, MCP MB Software Solutions, LLC President, Chief Software Architect http://mbsoftwaresolutions.com http://fabmate.com http://twitter.com/mbabcock16 ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/000101ca589c$c5837670$508a63...@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: Problem with OutlookExpress 6 email from VFP9SP1 via ShellExecute launch
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 and ?BCC parts only if the variables are populating, skipping them otherwise. -- Mike Babcock, MCP MB Software Solutions, LLC President, Chief Software Architect http://mbsoftwaresolutions.com http://fabmate.com http://twitter.com/mbabcock16 ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/4ae9aec4@mbsoftwaresolutions.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.
VFP9 - Shellexecute
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),tcAction,tcFile,,Sys(2023),1) This doesn't ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023),1) Within a standard prg or form, both work fine I don't understand why -- Regards Sytze de Boer Kiss Systems Hamilton, NZ Ph: 64-7-8391670, Mob:021 937611, www.kiss.co.nz ***Email is a great medium for distributing misunderstandings...*** --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/367498c40910081251w7f2e4819p2510a65c9e5c4...@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: VFP9 - Shellexecute
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 PM Subject: VFP9 - Shellexecute 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),tcAction,tcFile,,Sys(2023),1) This doesn't ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023),1) Within a standard prg or form, both work fine I don't understand why ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/000801ca4855$ccdf80a0$669e81...@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: VFP9 - Shellexecute
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 cFileName,; STRING cParameters,; STRING cDirectory,; INTEGER nShowWindow Declare Integer FindWindow In WIN32API String cNull,String cWinName *Return ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023),1) ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023),1) Catch =Messagebox(It seems there's a problem connecting to the internet..,0,'') Endtry On Fri, Oct 9, 2009 at 9:27 AM, Tracy Pearson tr...@powerchurch.com wrote: 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 PM Subject: VFP9 - Shellexecute 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),tcAction,tcFile,,Sys(2023),1) This doesn't ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023),1) Within a standard prg or form, both work fine I don't understand why [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/367498c40910081336s2381fec0w2431af60a87d7...@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: VFP9 - Shellexecute
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, October 08, 2009 4:36 PM 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 cFileName,; STRING cParameters,; STRING cDirectory,; INTEGER nShowWindow Declare Integer FindWindow In WIN32API String cNull,String cWinName *Return ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023),1) ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023),1) Catch =Messagebox(It seems there's a problem connecting to the internet..,0,'') Endtry On Fri, Oct 9, 2009 at 9:27 AM, Tracy Pearson tr...@powerchurch.com wrote: 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 PM Subject: VFP9 - Shellexecute 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),tcAction,tcFile,,Sys(2023 ),1) This doesn't ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023 ),1) Within a standard prg or form, both work fine I don't understand why [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/000901ca4858$b529d520$1f7d7f...@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: VFP9 - Shellexecute
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 tr...@powerchurch.com wrote: 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, October 08, 2009 4:36 PM 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 cFileName,; STRING cParameters,; STRING cDirectory,; INTEGER nShowWindow Declare Integer FindWindow In WIN32API String cNull,String cWinName *Return ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023),1) ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023),1) Catch =Messagebox(It seems there's a problem connecting to the internet..,0,'') Endtry On Fri, Oct 9, 2009 at 9:27 AM, Tracy Pearson tr...@powerchurch.com wrote: 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 PM Subject: VFP9 - Shellexecute 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),tcAction,tcFile,,Sys(2023 ),1) This doesn't ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023 ),1) Within a standard prg or form, both work fine I don't understand why [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/367498c40910081406j1773bff7u51f060c5a439d...@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: VFP9 - Shellexecute
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 different error. If you could catch the MESSAGE() inside the CATCH, it will help determine why it's a problem on some machines. -Original Message- From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] On Behalf Of Sytze de Boer Sent: Thursday, October 08, 2009 5:06 PM To: profoxt...@leafe.com Subject: Re: VFP9 - Shellexecute 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 tr...@powerchurch.com wrote: 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, October 08, 2009 4:36 PM 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 cFileName,; STRING cParameters,; STRING cDirectory,; INTEGER nShowWindow Declare Integer FindWindow In WIN32API String cNull,String cWinName *Return ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023 ),1) ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023 ),1) Catch =Messagebox(It seems there's a problem connecting to the internet..,0,'') Endtry On Fri, Oct 9, 2009 at 9:27 AM, Tracy Pearson tr...@powerchurch.com wrote: 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 PM Subject: VFP9 - Shellexecute 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),tcAction,tcFile,,Sys(20 23 ),1) This doesn't ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(20 23 ),1) Within a standard prg or form, both work fine I don't understand why [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/000a01ca485f$256799c0$7036cd...@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: VFP9 - Shellexecute
Can you help me please Do you mean something like the following CATCH theproblem=message() =Messagebox(theproblem,0,'') On Fri, Oct 9, 2009 at 10:34 AM, Tracy Pearson tr...@powerchurch.comwrote: 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 different error. If you could catch the MESSAGE() inside the CATCH, it will help determine why it's a problem on some machines. -Original Message- From: profoxtech-boun...@leafe.com [mailto:profoxtech-boun...@leafe.com] On Behalf Of Sytze de Boer Sent: Thursday, October 08, 2009 5:06 PM To: profoxt...@leafe.com Subject: Re: VFP9 - Shellexecute 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 tr...@powerchurch.com wrote: 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, October 08, 2009 4:36 PM 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 cFileName,; STRING cParameters,; STRING cDirectory,; INTEGER nShowWindow Declare Integer FindWindow In WIN32API String cNull,String cWinName *Return ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023 ),1) ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(2023 ),1) Catch =Messagebox(It seems there's a problem connecting to the internet..,0,'') Endtry On Fri, Oct 9, 2009 at 9:27 AM, Tracy Pearson tr...@powerchurch.com wrote: 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 PM Subject: VFP9 - Shellexecute 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),tcAction,tcFile,,Sys(20 23 ),1) This doesn't ShellExecute(FindWindow(0,_Screen.Caption),tcAction,tcFile,,Sys(20 23 ),1) Within a standard prg or form, both work fine I don't understand why [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/367498c40910081447g26d4daf4t2e6e99ad4be66...@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: VFP9 - Shellexecute
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 thing. If an error occurs after returning to the calling program, FoxPro might go back to the Catch that is no longer available causing a C005 error. -Original Message- From: Sytze de Boer Sent: Thursday, October 08, 2009 5:47 PM Can you help me please Do you mean something like the following CATCH theproblem=message() =Messagebox(theproblem,0,'') ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/000b01ca4863$80b94c70$822be5...@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: VFP9 - Shellexecute
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 tr...@powerchurch.comwrote: 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 thing. If an error occurs after returning to the calling program, FoxPro might go back to the Catch that is no longer available causing a C005 error. -Original Message- From: Sytze de Boer Sent: Thursday, October 08, 2009 5:47 PM Can you help me please Do you mean something like the following CATCH theproblem=message() =Messagebox(theproblem,0,'') [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/367498c40910081515s13f05669ife07cb764356c...@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: VFP9 - Shellexecute
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.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/000c01ca4865$f4127eb0$dc377c...@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.
Behaviour of ShellExecute function
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: 7.5.519 / Virus Database: 269.22.11/1368 - Release Date: 09-Apr-08 16:20 ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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: Behaviour of ShellExecute function
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 Filho Sent: Wednesday, April 09, 2008 4:13 PM 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. ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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.
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 looks like this: pseudocode Create text file MyFile.TXT = PrintFile(MyFile.TXT) ERASE(MyFile.TXT) This causes a problem because notepad cannot find the file to print - I need to somehow wait until Notepad finsihes with the file and only then let the ERASE command execute. Any suggestions ? Also is there a way to prevent Notepad printing the file with a (filename) header and (page number) footer ? 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 cDirectory,; INTEGER nShowWindow ShellExec(test.pdf,,c:\temp\) * Procedure ShellExec (exeName, exeParms, exePath) Local nStat, errorDesc * Use the next line to View * nStat = ShellExecute(0,open,exeName,exeParms,exePath,1) * Use the next line to Print nStat = ShellExecute(0,print,exeName,exeParms,exePath,1) * If nStat 32, then it is the Instance Handle * To get a Windows Handle see support.microsoft.com/kb/q242308/ If nStat = 32 errorDesc = Icase(nStat=2,Invalid path or filename, ; nStat=8,Insufficient memory, ; nStat=11,invalid EXE file, ; nStat=31,Invalid action, or no application associated with the specified file, ; Error description not available) Messagebox(Error +Ltrim(Str(nStat))+ ... +errorDesc,16,Program did not start.,2000) Endif Return Dave Crozier ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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: Shellexecute problem
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 Notepad, open File, page setup, and delete the header and footer stuff. I don't think that can be done programatically, though. [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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: Shellexecute problem
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. ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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: Shellexecute problem
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 IN Win32API; INTEGER hwnd, INTEGER dflag Declare INTEGER GetWindowText IN Win32API ; INTEGER hwnd, STRING @lptstr, INTEGER cbmax Declare INTEGER CloseWindow IN Win32API; INTEGER hwnd Declare INTEGER DestroyWindow IN Win32API; INTEGER hwnd Local lnhwnd, lnnext, lldone, lctitle_bar, lcsearchfor,; lntext_len lcsearchfor = UPPER(ALLTRIM(pctitle)) lnhwnd = GetActiveWindow() lnnext = 2 lctitle_bar = Do WHILE lnhwnd # 0 If type('lnhwnd') # 'N' Loop Endif lctitle_bar = SPACE(200) + CHR(0) lntext_len = GetWindowText(lnhwnd, @lctitle_bar, 200) lctitle_bar = UPPER(LEFT(lctitle_bar, lntext_len)) lldone = (lcsearchfor $ lctitle_bar) lp=lnhwnd lnhwnd = iif(lldone, 0, GetWindow(lnhwnd, lnnext)) Enddo Return lldone * * End of Code -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL 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 looks like this: pseudocode Create text file MyFile.TXT = PrintFile(MyFile.TXT) ERASE(MyFile.TXT) This causes a problem because notepad cannot find the file to print - I need to somehow wait until Notepad finsihes with the file and only then let the ERASE command execute. Any suggestions ? Also is there a way to prevent Notepad printing the file with a (filename) header and (page number) footer ? 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 cDirectory,; INTEGER nShowWindow ShellExec(test.pdf,,c:\temp\) * Procedure ShellExec (exeName, exeParms, exePath) Local nStat, errorDesc * Use the next line to View * nStat = ShellExecute(0,open,exeName,exeParms,exePath,1) * Use the next line to Print nStat = ShellExecute(0,print,exeName,exeParms,exePath,1) * If nStat 32, then it is the Instance Handle * To get a Windows Handle see support.microsoft.com/kb/q242308/ If nStat = 32 errorDesc = Icase(nStat=2,Invalid path or filename, ; nStat=8,Insufficient memory, ; nStat=11,invalid EXE file, ; nStat=31,Invalid action, or no application associated with the specified file, ; Error description not available) Messagebox(Error +Ltrim(Str(nStat))+ ... +errorDesc,16,Program did not start.,2000) Endif Return Dave Crozier [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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: Shellexecute problem
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-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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: Shellexecute problem
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 ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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: Shellexecute problem
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: 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. No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.19.2/1223 - Release Date: 13/01/2008 20:23 ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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: Shellexecute problem
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 IN Win32API; INTEGER hwnd, INTEGER dflag Declare INTEGER GetWindowText IN Win32API ; INTEGER hwnd, STRING @lptstr, INTEGER cbmax Declare INTEGER CloseWindow IN Win32API; INTEGER hwnd Declare INTEGER DestroyWindow IN Win32API; INTEGER hwnd Local lnhwnd, lnnext, lldone, lctitle_bar, lcsearchfor,; lntext_len lcsearchfor = UPPER(ALLTRIM(pctitle)) lnhwnd = GetActiveWindow() lnnext = 2 lctitle_bar = Do WHILE lnhwnd # 0 If type('lnhwnd') # 'N' Loop Endif lctitle_bar = SPACE(200) + CHR(0) lntext_len = GetWindowText(lnhwnd, @lctitle_bar, 200) lctitle_bar = UPPER(LEFT(lctitle_bar, lntext_len)) lldone = (lcsearchfor $ lctitle_bar) lp=lnhwnd lnhwnd = iif(lldone, 0, GetWindow(lnhwnd, lnnext)) Enddo Return lldone * * End of Code ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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: Shellexecute problem
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] Subject: Re: Shellexecute problem Paul Newton wrote: Also is there a way to prevent Notepad printing the file with a (filename) header and (page number) footer ? Many thanks Allen Paul Newton ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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: Shellexecute problem
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 in folder - new text document 2. Run the program below Notice it sends keystrokes to the Notepad document and as an aside opens up the Font menu. Hope it helps Dave *** * Start of Code * cWindow_Name=New Plain Text File.txt - Notepad lnMainWind = GetActiveWind() lnHandle = FindWind(cWindow_Name) SetForeWind(lnHandle) If lnHandle # 0 * Start scanning and wait 2 seconds cMessage=Hello There This has been created by VFP For I=1 to Len(cMessage) ? SendKey(Substr(cMessage,I,1)) Endfor Do While FindWind(cWindow_Name) # 0 * Attempt to close the MODI Application SendKey('ALT O') SendKey('F') SendKey('T') Exit * Enddo Endif * Reactivate the calling window SetForeWind(lnMainWind) Return *** * Function to send keystrokes * Eg Sendkey(ALT T) - send Alt/T * Function SendKey (tcChar) Declare keybd_event In user32 ; SHORT bVk, SHORT bScan, ; INTEGER dwFlags, Integer dwExtraInfo Declare SHORT VkKeyScan In user32 Integer ch Local lcChar lcChar = Right(tcChar, 1) Do Case Case 'SHIFT' $ Upper(tcChar) * Shift key keybd_event(0x10, 0, 0, 0) Case 'CTRL' $ Upper(tcChar) * Ctrl key keybd_event(0x11, 0, 0, 0) Case 'ALT' $ Upper(tcChar) * Alt key keybd_event(0x12, 0, 0, 0) Endcase keybd_event(VkKeyScan(Asc(lcChar)), 0, 0, 0) Do Case Case 'SHIFT' $ Upper(tcChar) * Shift key keybd_event(0x10, 0, 2, 0) Case 'CTRL' $ Upper(tcChar) * Ctrl key keybd_event(0x11, 0, 2, 0) Case 'ALT' $ Upper(tcChar) * Alt key keybd_event(0x12, 0, 2, 0) * EndCase * Wait for response Inkey(.01) Return * EndFunc * Establish the foreground window Function SetForeWind(tnHandle) Declare Integer SetForegroundWindow ; IN user32 Integer hWindow Declare Integer FindWindow In user32 ; STRING lpClassName, String lpWindowName SetForegroundWindow(tnHandle) Return EndFunc * Get a specific window reference Function FindWind(tcWindow) Declare Integer FindWindow In user32 ; STRING lpClassName, String lpWindowName Local lnHandle lnHandle = FindWindow(Null, tcWindow) Return (lnHandle) EndFunc * Get reference to the 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: Shellexecute problem 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 IN Win32API; INTEGER hwnd, INTEGER dflag Declare INTEGER GetWindowText IN Win32API ; INTEGER hwnd, STRING @lptstr, INTEGER cbmax Declare INTEGER CloseWindow IN Win32API; INTEGER hwnd Declare INTEGER DestroyWindow IN Win32API; INTEGER hwnd Local lnhwnd, lnnext, lldone, lctitle_bar, lcsearchfor,; lntext_len lcsearchfor = UPPER(ALLTRIM(pctitle)) lnhwnd = GetActiveWindow() lnnext = 2 lctitle_bar = Do WHILE lnhwnd # 0 If type('lnhwnd') # 'N' Loop Endif lctitle_bar = SPACE(200) + CHR(0) lntext_len = GetWindowText(lnhwnd, @lctitle_bar, 200) lctitle_bar = UPPER(LEFT(lctitle_bar, lntext_len)) lldone = (lcsearchfor $ lctitle_bar) lp=lnhwnd lnhwnd = iif(lldone, 0, GetWindow(lnhwnd, lnnext)) Enddo Return lldone * * End of Code [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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: Shellexecute problem
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 in folder - new text document 2. Run the program below Notice it sends keystrokes to the Notepad document and as an aside opens up the Font menu. Hope it helps Dave *** * Start of Code * cWindow_Name=New Plain Text File.txt - Notepad lnMainWind = GetActiveWind() lnHandle = FindWind(cWindow_Name) SetForeWind(lnHandle) If lnHandle # 0 * Start scanning and wait 2 seconds cMessage=Hello There This has been created by VFP For I=1 to Len(cMessage) ? SendKey(Substr(cMessage,I,1)) Endfor Do While FindWind(cWindow_Name) # 0 * Attempt to close the MODI Application SendKey('ALT O') SendKey('F') SendKey('T') Exit * Enddo Endif * Reactivate the calling window SetForeWind(lnMainWind) Return *** * Function to send keystrokes * Eg Sendkey(ALT T) - send Alt/T * Function SendKey (tcChar) Declare keybd_event In user32 ; SHORT bVk, SHORT bScan, ; INTEGER dwFlags, Integer dwExtraInfo Declare SHORT VkKeyScan In user32 Integer ch Local lcChar lcChar = Right(tcChar, 1) Do Case Case 'SHIFT' $ Upper(tcChar) * Shift key keybd_event(0x10, 0, 0, 0) Case 'CTRL' $ Upper(tcChar) * Ctrl key keybd_event(0x11, 0, 0, 0) Case 'ALT' $ Upper(tcChar) * Alt key keybd_event(0x12, 0, 0, 0) Endcase keybd_event(VkKeyScan(Asc(lcChar)), 0, 0, 0) Do Case Case 'SHIFT' $ Upper(tcChar) * Shift key keybd_event(0x10, 0, 2, 0) Case 'CTRL' $ Upper(tcChar) * Ctrl key keybd_event(0x11, 0, 2, 0) Case 'ALT' $ Upper(tcChar) * Alt key keybd_event(0x12, 0, 2, 0) * EndCase * Wait for response Inkey(.01) Return * EndFunc * Establish the foreground window Function SetForeWind(tnHandle) Declare Integer SetForegroundWindow ; IN user32 Integer hWindow Declare Integer FindWindow In user32 ; STRING lpClassName, String lpWindowName SetForegroundWindow(tnHandle) Return EndFunc * Get a specific window reference Function FindWind(tcWindow) Declare Integer FindWindow In user32 ; STRING lpClassName, String lpWindowName Local lnHandle lnHandle = FindWindow(Null, tcWindow) Return (lnHandle) EndFunc * Get reference to the active window Function GetActiveWind Declare Integer GetActiveWindow In user32 Return (GetActiveWindow()) * EndFunc ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** 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.