Jump to content











Photo

API commands in Magic Wand


  • Please log in to reply
No replies to this topic

#1 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 17 January 2009 - 02:57 PM

Some projects use an API which makes app scripts exchangable between projects.

For projects working with an API, the developer / user of a project can see the API commands in the magic wand, after some preparation, to be done once for each project.

In Script.Project [Variables]
  • The line %API%=<ApiScript> already exists if the project already uses the API
  • Cut all the lines in script.project [Variables] which define API calls, and paste them into Api.script in a new created section [<ApiVar>]
  • In Api.Script generate a new section [<API>] containing the syntax of the API commands how it should appear in the magic wand.
    Sample:
    Require_Version=Require_Version,Filename,Version,Section
  • In Api.Script generate a new section [<Title>] containing the syntax of the submenu API commands how it should appear in the magic wand.
  • In script.project, add in [Process]
    AddVariables,%API%,<ApiVar>,GLOBAL
  • In script.project, add the [Variables]
  • %APIVAR%=<ApiVar>
  • %APIDEF%=<API>
  • %APISUBDEF%=<Title>[,<Title>[, ...]]
Here is
  • <ApiScript> the full page to the Api.Script file, maybe with variables like %ProjectDir%
  • <API> a user defined string which will appear in the magic wand as menu item, preferably "API"
  • <ApiVar> a user defined string for the name of the new api variable definition section in api.script, preferably "ApiVar"
  • <Title> a user defined string which will appear in the magic wand as sub menu titel, e.g. Shortcuts
Working this way, the API commands will be fully integrated in the magic wand.
And
  • Build Project
  • Build Single Script
  • Run Codebox
run as before without additional tuning.

This will work with WinBuilder 075 beta 6 b and later.

New commands in API.script can be used and added to the magic wand menu w/o any changes in script project, just by delivering the new Api.script

Peter

Edited by psc, 18 January 2009 - 11:19 AM.
Adding of sub menus





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users