|
Scripting tutorial #1 - Creating and authorizing a local HTML pageDisclaimerWhen purchasing a DreamLover Labs device, you are purchasing a hardware device, and not software development services, or a guarantee that such services will be extended, or a commitment to extend such services at a specific price. There is no guarantee, either implicit or explicit, that you will be able to implement a specific new feature using the Javascript API, to extend functionality beyond what is described in the User's Guide. DreamLover Labs are under no obligation to provide any programming assistance beyond the tutorials on this site. In particular, we are unable to offer assistance to non-programmers trying to create their own scripts. Do not expect to be able to use the API if you have never programmed in Javascript. Programmers trying to code scripts are normally aided by pointing them to the relevant functions if the need arises. We do not normally take on programming/software development tasks on behalf of our users. If a quote for such a project is ever given on an exceptional basis, it will likely be substantially higher than market rates, due to this kind of service being outside of our line of business. If your choice to own a device is conditional to the possibility of realizing a specific feature, please consult with us first. Please understand that while we can tell you whether a specific new mode of operation is possible or not with our API, we absolutely cannot guarantee that you will be able to accomplish the relative programming tasks. Additionally, should you have difficulties in the attempt, we will not be able to come to the rescue and do the programming work necessary. Therefore by purchasing a device you agree to being entirely responsible for carrying out or outsourcing the programming work relative to whatever new features you will wish to create. We do not accept returns past the review period stated on the terms of sale, and your inability to program or hire someone to program some vital feature that makes the device useful to you does not constitute an exception to this rule. This is the first of a series of tutorials on scripting the DreamLover Labs products.
IntroductionYou can script DreamLover 2000 and ChronoVault behavior by running a Javascript script inside the DL Browser. The DL Browser is the browser included with the DL Uplink application. To run a script,
you simply open an HTML page which contains the script. The HTML file can be somewhere on the web, or stored on your PC.
Create a test scriptLet's create a simple HTML page so we can add its location to the authorized list and begin working on the script. An HTML page can be created by opening Notepad, adding the following code, and saving the file. Find the page's full pathWe want to authorize this script so that the DL Browser will allow us to load it and execute whatever commands we will decide to add. To do that, we must first find out the complete file name, including its path on your hard drive.
The easiest way to get this is by opening a regular browser (not the DL Browser, but any other browser, like Explorer or Firefox) and dragging and dropping our test script
on the browser window. Authorize the test scriptThese instructions are for DreamLover Labs device owners only. If you wish to practice scripting for our products but you do not own a device (or you don't have it on hand right now), skip to the bottom of the page
(the heading "Testing without a connected device"). Test the script in the DL BrowserThe HTML file has been authorized, so your DL Browser is now able to open it. Let's try it. Open the DL Uplink, and click on "DL Browser".
Testing without a connected deviceIt is possible to open the test page without any connected devices. The advantage is that any URL can be opened without authorizing it first.
However, any commands executed by the script will not be delivered. This is the DL Browser's "demo mode". Demo mode is useful for developers, because although no hardware interaction is possible, commands are still displayed
as they are executed. |
|
Contact us | General terms | Refund/return policy | Warranty | Privacy | Security | Shipping | Fraud policy | Fraudulent disputes and chargeback policy (C) 2008-2023 DreamLover Laboratories - all rights reserved |