I agree, I also think that Thom got with ScriptName.

 

I want to thank everyone for their informative replies.

 

Alan Gersh 

Systems Analyst, Information Technology Department

Martin Memorial Health Systems, Inc.

Phone: 772.223.5945 ext: 4825

Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Neal Quinn
Sent: Wednesday, January 16, 2008 4:45 PM
To: [email protected]
Subject: Re: [Talk] Visual Basic App.Path Work Around

 

Rich,

 

I agree that it can work; it's just that it will work differently,
depending upon how the file is opened.  I opened BWS (in the root of C),
and then fetched the script.  When I debug.print curdir, it gave me C:\,
not the path to the script.  I haven't tried to open a script with a
shortcut, but I think the result will be the same.

 

Thanks for the digression, though.  I think that Thom got it with
ScriptName.

 

Neal

        ----- Original Message ----- 

        From: Rich McNeil <mailto:[EMAIL PROTECTED]>  

        To: [email protected] 

        Sent: Wednesday, January 16, 2008 3:33 PM

        Subject: RE: [Talk] Visual Basic App.Path Work Around

         

        Gee, it seems to be working for me...the main difference between
CurDir and App.Path is that CurDir is a VBA property that returns the
"current open directory" which is kind of an old C++ construct that's
reset by VBA whenever a new script is opened to the directory of that
script (others things might set it as well).  App.Path, on the other
hand, is a VB6 property that's set to the directory of the current
executable (or the project's settings (vbp) file in interpreted mode).

         

        Rich McNeil

        Boston Software Systems

        866 653 5105 x 813

        www.bostonworkstation.com

         

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Neal Quinn
        Sent: Wednesday, January 16, 2008 2:27 PM
        To: [email protected]
        Subject: Re: [Talk] Visual Basic App.Path Work Around

         

        CurDir is not reliable:  if one opens BWS and then access a
script, CurDir will not 'follow' the directory, inasmuch as the open
directory has not changed.  Also, if one executes a shortcut, then
unless the directory is specifically changed, CurDir also will not
'follow.'

         

        Neal Quinn

        Montefiore Medical Center

                ----- Original Message ----- 

                From: Rich McNeil <mailto:[EMAIL PROTECTED]>  

                To: [email protected] 

                Sent: Wednesday, January 16, 2008 1:57 PM

                Subject: RE: [Talk] Visual Basic App.Path Work Around

                 

                Try: 

                 

                CurDir 

                 

                for the current script's directory

                 

                Rich McNeil

                Boston Software Systems

                866 653 5105 x 813

                www.bostonworkstation.com

                 

                From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thom C. Blackwell
                Sent: Wednesday, January 16, 2008 1:08 PM
                To: [email protected]
                Subject: RE: [Talk] Visual Basic App.Path Work Around

                 

                Greetings,

                LOL neat way to do this J

                You can also use the ScriptName property

                Debug.print ScriptName will give you the text in the
"titlebar" - which is the path / and name of the currently loaded
project.

                 

                Regards,

                Thom

                 

                Thom C. Blackwell

                Product Manager

                Boston Software Systems

                (866) 653-5105 ex 807

                www.bossoft.com <http://www.bossoft.com/> 

                 

                Sign up for my weekly webinar!
<http://www.bostonworkstation.com/customer_center/special_events.aspx> 

                 

                LEGAL NOTICE Unless expressly stated otherwise, this
message is confidential and may be privileged. It is intended for the
addressee(s) only. Access to this E-mail by anyone else is unauthorized.
If you are not an addressee, any disclosure or copying of the contents
of this E-mail or any action taken (or not taken) in reliance on it is
unauthorized and may be unlawful. If you are not an addressee, please
inform the sender immediately, then delete this message and empty from
your trash.

                 

                From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Neal Quinn
                Sent: Wednesday, January 16, 2008 12:30 PM
                To: [email protected]
                Subject: Re: [Talk] Visual Basic App.Path Work Around

                 

                If you use 'GetForegroundCaption" before you open any
other windows (assuming that BWS is the topmost window), or force BWS to
come to the front, you can retrieve the path of your executable.  Just
filter out the 'Boston WorkStation - " that preceeds the full path.

                 

                Neal Quinn

                Montefiore Medical Center

                        ----- Original Message ----- 

                        From: Brian Van Grinsven
<mailto:[EMAIL PROTECTED]>  

                        To: [email protected] 

                        Sent: Wednesday, January 16, 2008 11:33 AM

                        Subject: RE: [Talk] Visual Basic App.Path Work
Around

                         

                        
                        app.path = the directory where the application
was run 
                        
                        eg. my app is located in 
                        C:\MYAPPPATH\myapp.exe 
                        
                        app.path will equal "C:\MYAPPPATH\" 
                        ...................................
                        Brian Van Grinsven
                        Integrated Systems Specialist
                        Medbuy Corporation
                        mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 
                        http://www.medbuy.ca <http://www.medbuy.ca> 
                        T: 519.652.1688 ext. 114
                        F: 519.652.2788
                        
                        Technical Support:
                        ext. 199 or [EMAIL PROTECTED]
                        
                        Building Partnerships in Healthcare 

"Brian Stevenson" <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED] 

01/16/2008 11:30 AM 

Please respond to
[email protected]

To

<[email protected]> 

cc

        
Subject

RE: [Talk] Visual Basic App.Path Work Around

 

                

                        
                        
                        
                        What does the app.path tell you or what
information is stored there? 
                          
                        Brian Stevenson - Systems Administrator 
                        University Health System - Business Information
Systems 
                        Office: (210) 358 - 9282 
                        Pager: (210) 756 - 0582 
                        Fax: (210) 358 - 9287 
                          

________________________________

                        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> ] On Behalf Of Gersh, Alan
                        Sent: Wednesday, January 16, 2008 10:27 AM
                        To: [email protected]
                        Subject: [Talk] Visual Basic App.Path Work
Around
                        
                        Hello, 
                          
                        I have recently join the Boston Workstation
family of customers. I am working on converting our current Meditech
scripts to the Boston Workstation environment and have run into a small
snag. Some of our current scripting code uses the visual basic App.Path
property. I have been informed that Boston Workstations VBA environment
does not support the App object and does not have a equivalent to the
App.Path property. Has anyone found or develop a work around?   
                          
                        Alan Gersh 
                        Systems Analyst, Information Technology
Department 
                        Martin Memorial Health Systems, Inc. 
                        Phone: 772.223.5945 ext: 4825 
                        Email: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>  

        
**********************************************************************
                        This e-mail and any attachments may contain
confidential and 
                        privileged information. If you are not the
intended recipient, please 
                        notify the sender immediately by return e-mail,
delete this e-mail and 
                        destroy any copies. Any dissemination or use of
this information by a 
                        person other than the intended recipient is
unauthorized and may be 
                        illegal.
        
**********************************************************************

Reply via email to