[help] Possible To Open A Desklet With A Shortcut?

Is there a way to open a desklet or a new instance of a desklet with a shortcut?

The reason I ask is because I would like to have a shortcut to open a new blank sticky note, but it doesn't apear that there is a way to do this. Unless there is a command line switch for this or something???

#199498

Save the following as NewNote.vbs:

  Dim av
 Set av = CreateObject("AveDesk.Application")
 Dim d, i
 For Each i In av.AvailableDesklets
   If i.Name = "Notes Desklet" Then
     Set d = av.RunningDesklets.Add(i, 200, 100)
     d.Visible = True
     Exit For
   End If
 Next

When you double click on it, a Notes Desklet will be added.

If AveDesk is not running while you start the script, AveDesk will

be launched.

Code explained for scripters:

The parameters for Runningdesklets.Add are:

Object of type DeskletInfo, must be pulled from the Availabledesklets collection or by the About property of any running desklet.

[optional] Left position in pixels,

[optional] Top position in pixels,

[optional] Width in pixels,

[optional] Height in pixels.

'Add' returns the newly created desklets wrapper object of type Desklet.

I omitted Width and Height, so that the Notes desklet

will be shown with the default width and height settings as specified

in the "Default Desklet Properties" settings dialog. If you omit Left and Top too,

they'll also be pulled from there.

Note that desklets added this way are invisible first and you need to

'turn them on' after you e.g. added a label text, by calling Desklet.Visible = True.

#199618

Thanks Herd,

This is perfect :D

Do you know what parameters I would need to add to make it open a 192x192 desklet and if possible with no label?

#199892

Originally posted by intensityx@Aug 8 2004, 02:04 AM

Thanks Herd,

This is perfect  :D

Do you know what parameters I would need to add to make it open a 192x192 desklet and if possible with no label?

<{POST_SNAPBACK}>

Replace the line

    Set d = av.RunningDesklets.Add(i, 200, 100)

with

    Set d = av.RunningDesklets.Add(i, 200, 100, 192, 192)

to have it have a defined size. Replace the 200,100 with the position

you want to have it. It's that simple.

At this time being, you can't access all properties of the desklet;

If your default desklet configuration is 'Regular Label' then the newly added

one will have a label. However, you can do this:

instead:

     d.Visible = True

     d.Visible = True
    d.Label = ""
    d.SubLabel = ""

AveDesk won't show a label if the label text has no length.

hth,

herd

#200009

Is there also a way to set the following:

1. Default Font type for the Notes Text (not the label), incl. the rotation, appearance etc.

2. Default Image for the Notes (instead of renaming the image you want to bg.png)

3. Default Bounding Rectangle parameters.

Appreciate the help! Thanks! :)

#200294

Originally posted by herd@Aug 8 2004, 10:48 AM

Replace the line

    Set d = av.RunningDesklets.Add(i, 200, 100)

with

    Set d = av.RunningDesklets.Add(i, 200, 100, 192, 192)

to have it have a defined size. Replace the 200,100 with the position

you want to have it. It's that simple.

At this time being, you can't access all properties of the desklet;

If your default desklet configuration is 'Regular Label' then the newly added

one will have a label. However, you can do this:

instead:

     d.Visible = True

     d.Visible = True
    d.Label = ""
    d.SubLabel = ""

AveDesk won't show a label if the label text has no length.

hth,

herd

<{POST_SNAPBACK}>

Thanks again Herd. B) This is just what I needed

#200320

Originally posted by kamengau@Aug 9 2004, 05:39 AM

Is there also a way to set the following:

1. Default Font type for the Notes Text (not the label), incl. the rotation, appearance etc.

2. Default Image for the Notes (instead of renaming the image you want to bg.png)

3.  Default Bounding Rectangle parameters.

Appreciate the help! Thanks! :)

<{POST_SNAPBACK}>

1. No

2. No

3. No

Generally, you could achieve this by:

Ending AveDesk from script, editing the Theme.ini from script and restarting

AveDesk again. However you can't accurately tell which ini-Entry belongs

to the specific Notes Desklet instance yet.

Gonna look for a desklet independent solution to do this, even without

restarting AveDesk, but not before 1.2.

#200335