Jump to content


Photo
- - - - -

Keeping your scripts organized


  • Please log in to reply
No replies to this topic

#1 lupinglade

lupinglade

    Cocoonut

  • Manufacturers
  • PipPipPipPip
  • 1120 posts
  • Experience:guru
  • Software:Custom
  • Hardware:HAI OmniPro II
  • Tech:UPB, ZigBee, Custom
  • Audio:Nuvo
  • Video:AirPlay
  • CCTV:ip, dvr
  • Phone:Linksys PAP2, Vonage

Posted 11 April 2012 - 04:07 PM

For anyone scripting with HaikuHelper, did you know you can include files into the script?

This allows you to keep your scripts organized by file in the Scripts folder HaikuHelper provides. This way you can break up different scripts/operations into separate files for easier maintenance and even to be able to disable a single part of your scripts easily. You can also more easily share your scripts with other users this way.

HaikuHelper will look for your script file in its Scripts folder, to access this folder use the Script menu in Haiku and select the "Show Scripts Folder…" option. Create your script files in this folder. Then to include them, simply add this code in the Script Editor for each script file you want to include:

helper.include(controller, "Example.js")

Edited by lupinglade, 12 April 2012 - 11:02 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users