Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Macro Advice 1

Status
Not open for further replies.

MAURO23

Technical User
Apr 26, 2005
2
US
In the Wordperfect 12 Macro Language, I cannot seem to find a command that returns the CURRENT directory unless there is an active document on the screen.


I need to be able to dtermine what the current folder is without a active document on the screen or even if there is an active document that does not reside in the current directory.

Can anyone help ?
 
While one would think that ?pathcurrent would do the job, it doesn't. I may seem to at time though.

At wpuniverse.com, there are several responses. We discussed the issues in past threads there.

One quick way is something like:
InhibitInput(On!)
Display(Off!)
InvokeDialog(FileOpenDlg)
Repeat
Until(Applocate("Open File - *")<>0)
dir=RegionGetWindowText(RegionGetFocus())
dir=dir-"Open File - "
SendKeys("{ESC}")
MessageBox(;;dir)
 
Wow !

It seems to work !

It the only of many "alleged" solutions that actually does !


Thank you very much

Mauro
 
The one that gpremo posted at wpu, works without flashing. It needs a little cleaning up though. The advantage to that method is that the screen will not flicker since no FileOpenDlg() is opened.

I may post a simple example at wpu's code snippet forum sometime. The macro that gpremo posted was derived from work done by Klaus, lemoto (Roy Lewis) and Martin at wpu primarily.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top