First of all what are gadgets? Gadgets are lightweight HTML and script-based applications which can present information or provide functionality from a variety of sources such as websites or services. To make a gadget you need to know the basic of HTML.
In this tutorial I am going to show you how to make a simple windows 7 gadget. A basic gadget needs an XML file named exactly gadget.xml and an HTML file with the gadget name. Also you can include any pictures needed in the gadget. In this tutorial I am going to show you how to make a simple demo clock gadget which would display time in a simple way. Just follow the steps given and if you know basic HTML you will find it easy to understand.
Step 1: First of all make a new folder on your desktop and rename it anything you want.
Step 2: Put the html file which would be your gadget into the folder and rename the file as the name of the gadget. In this case the name would be NXClock.html. The demo code for the html is given below.
Step 3: Now save the following code as gadget.xml EXACTLY into the folder you created earlier. Do not name it anything else or the gadget will not work. You must replace the NXClock.html in the code with the name of the html file if you are making your own gadget. And you can change the title too.
Step 4: Add the NXClock.html and gadget.xml to a zip file. Be careful to add the files to the zip file, NOT the folder containing them.
Step 5: Now change the extension of the zip file to .gadget. You can either do this by going to folder options > View and disabling the Hide extensions for known file types and then changing the extension. Or else you can do it using command prompt.
Step 6: Now you will have ended with a windows gadget file. Open it and click install and if all went right a new gadget would appear on your desktop!
Good!!
ReplyDeletePls, post a script that whenever user opens it,it goes to a specific webpage eg A script that opens www.google.com
Will post is this month. Stay tuned :)
DeleteThanks.. its really a nice article..
ReplyDeletecan you write an article/tutorial about xml and its uses...
I have got a new info from this...
i thought xml is only used in web apps..
I am new to this things .. :)
Thanks for your comment. I will try to post it in a month.
Deleteit shows an error can u help me guys .....
ReplyDeleteIf you followed the steps exactly you will get it correct. Please clarify your error ;-)
Delete