Your full service technology partner! 
-Collapse +Expand
Search Paradox Group:

-Collapse +Expand Paradox To/From
-Collapse +Expand Paradox Store

Prestwood eMagazine

September Edition
Subscribe now! It's Free!
Enter your email:

   ► KBDesktop Data...Paradox & Ob...ObjectPAL Co...OPAL: Langua...   Print This     
  From the July 2013 Issue of Prestwood eMag
Paradox OPAL: Language Details:
Using Execute in Paradox's ObjectPAL
Posted 14 years ago on 2/18/2006 and updated 2/18/2006
Take Away: Using execute() in ObjectPAL.


The following demonstrates how to launch an application using the execute() command. It also demonstrates a technique for checking if the application is already running before launching it. This is particularly handy when working with DDE and OLE.

Using execute()

To launch an application in Paradox is easy. For example, the following code from the pushButton event of a button launches Notepad.

method pushButton(var eventInfo Event)
  execute("NOTEPAD.EXE", No, ExeShowNormal)
Checking if the application is already open first

To check if an application is running, you can use the enumWinowNames method to list all the running applications within a table. Then use a scan loop with locatePattern to check if the application is running. To make sure the temporary table is not in conflict with other users in a multi-user situation, create the table in each users private folder.

For example:

Clean Up

To automate the cleanup of the temporary table in your private folder, name the table starting with two underscores. Paradox automatically deletes all files in your private folder that start with two underscores whenever Paradox exits.

For example:

Complete Example

The following code from the pushButton event of a button checks if Microsoft Word is already running and if it is NOT, then launches it. If Word is running, Word is not launched.

method pushButton(var eventInfo Event)
  sTable 		String
  tcApps		TCursor
  lWordOpen	Logical


  sTable = ":priv:__apps.db"

  lWordOpen = False
  scan tcApps 
   for tcApps.locatePattern("WindowName", 
    "..Microsoft Word.."):
    lWordOpen = True

  if not lWordOpen then
  execute("D:\\Program Files\\Microsoft Office" +
   + "\\Office\\WINWORD.EXE", 
      No, ExeShowNormal)

Finding WindowNames

You can use a technique similar to the above code to find the window name to search for during your scan loop. For example, the following code from the pushButton event of a button displays a table of all Windows. Just make sure the application you want to search for is running prior to executing this code.

method pushButton(var eventInfo Event)
 sTable String
 tvApps TableView ; Used to find app names.

  sTable = ":priv:__apps.db"
  enumWindowNames(sTable) ; Used to find app names.

Linked Message Board Threads

 launching audio files from opal in ObjectPAL MB Topic (13 replies)


Share a thought or comment...
First Comment
Comment 1 of 11

Checking to see if the application is open first works great but not if Lync is open.  Running with Office 2013, Paradox will hang up waiting for a response from Lync when looking to see if Outlook is open.  Close Lync and the code proceeds normally.  I had to give up on checking to see if Outlook was open and just start using "/recycle" on the execute command line so it won't open additional sessions if one if already running.


Posted 6 years ago

Comment 2 of 11

I all around agree and influencing forward for more data and this subject has colossally satisfied me. Jaipur Escorts Service  Appreciative to you for making an article that has overwhelming substance and is completely circumnavigated and even I am restored by your kept style other than.

Posted 11 months ago

Comment 3 of 11

I am very admirer of your made work and the inspiration driving square concerning your offer flabbergasting to any character in your piece, at any rate, Call Girls in Jaipur  I discovered some minor syntactic fight in your affected work with the target that you to can resolve from coursework writing in clearly versatile time.

Posted 11 months ago

Comment 4 of 11

I am unendingly looking web for articles that can interface with me and this is one of them. This is spreading in that most remote raise controlled blog. The entire article is astoundingly confounding and intentionally made.

Jaipur Escorts Service

 Jaipur Call Girls

Posted 9 months ago

Comment 5 of 11

I am genuinely getting a charge out of looking brilliantly made articles. Presumably, you spend a ton of exertion and time on your blog. I have bookmarked it and I am anticipating inquiring about new articles. Keep doing stunning. 

 Jaipur Call Girls
 Call Girls in Jaipur
Jaipur Escorts 

Posted 9 months ago

Comment 6 of 11

I beginning late ran before long your blog and have been investigating along. I figured I would leave my first remark. I don‘t have the foggiest idea what to state with the exception of that I have gotten a kick out of the experience of looking. Magnificent to explore the blog. I will continue visiting this blog reliably. 

 Call Girls in Jaipur 
 Jaipur Escorts 
 Escorts in Jaipur 

Posted 9 months ago

Comment 7 of 11

A duty of thankfulness is all together for spinning around these subtleties. I in a general sense wish to uncover to you that I on a fundamental level examine your site and moreover I find it truly hypnotizing and essential.

Jaipur Escorts 
 Escorts in Jaipur 
Jaipur Escorts Service 

Posted 9 months ago

Comment 8 of 11

Your substance is really mind-blowing and drawing in information here, so thank you for sharing this amazing data for everybody. 

Escorts in Jaipur
Jaipur Escorts Service
 Jaipur Call Girls

Posted 9 months ago

Comment 9 of 11

Thank you so much for sharing this amazing information, please keep sharing…

the impossible quiz

Posted 9 months ago

Comment 10 of 11

Tell about your ants and allow our Delhi escort to sprinkle some sizzling particles on the same. Escort service Delhi

escort in Delhi

Independent escorts in delhi

Posted 7 months ago

Latest Comment
Comment 11 of 11

This article gives the light in which we can observe the reality. London Escorts Agency This is very nice one and gives indepth information. Thanks for this nice article. 

Posted 89 days ago
Write a Comment...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1267A1
Enter key:
KB Post Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #100310 Counter
Since 4/2/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site:

©1995-2020 Prestwood IT Solutions.   [Security & Privacy]