Skip to main content
Topic: Spider Monkey Panel (foo_spider_monkey_panel) (Read 20089 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #201
Ok thanks!

I have 2 more questions, sorry to be a nuicense.  O:)
1. Is it possible to draw text right aligned?
2. Is it possible to draw an external image, a PNG for example.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #202

Not sure it helps, but here is an adaptation of the script I wrote for my config. It was not meant to work in a component-like fashion, so you might have to edit the code here and there (no window properties, sorry). My coding is much more naive than marc2003's or Br3tt's, but perhaps this makes it easier to grasp and modify.
For reasons I don't understand, it only works with columns ui, maybe some more advanced coder can figure out why,
I still didn't find the time to handle the typing animation when the text's length exceeds that of the width of the panel, so make sure the panel is wide enough for your average search strings.
Search results are displayed in a playlist called "Search results [your search string]", which is overwritten at every new search.

Thank you! Very much appreciated :)
Decalicatan Decalicatan


Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #204
Don't bother ask if you need help understanding the script or indications on which variables must be edited to change the appearance.

Thanks for the offer ^^ ....

Maybe you can help me for a more generic question then:
Where can I find character codes if I wanted to change the search icon in the line "var icon = String.fromCharCode(57492);").
(I already managed to change the font / color / other stuffs)

Thanks in advance.. and thanks once again to profide me the script,, even I you prefer not to answer, which I can undersand.
Decalicatan Decalicatan

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #205

Maybe you can help me for a more generic question then:
Where can I find character codes if I wanted to change the search icon in the line "var icon = String.fromCharCode(57492);").
(I already managed to change the font / color / other stuffs)

Well, I guess it depends on the new font you chose. You can look it up in the windows character map application where it is shown as UTF-8 code, you than have to convert it to decimal in order to use it in the fromCharCode method (I use online converters for this purpose).
I'm late

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #206
1. Is it possible to draw text right aligned?
See documentation for `GdiDrawText` method, specifically `format` argument.

2. Is it possible to draw an external image, a PNG for example.
See docs for `LoadImageAsync`/`LoadImageAsyncV2`, `DrawImage`/`GdiDrawBitmap` methods and basic `LoadImageAsync.js`/`LoadImageAsyncV2.js` samples.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #207
Well, I guess it depends on the new font you chose. You can look it up in the windows character map application where it is shown as UTF-8 code, you than have to convert it to decimal in order to use it in the fromCharCode method (I use online converters for this purpose).

Thank you. The hex to decimal conversion part was what I missed. Now it's working.
Decalicatan Decalicatan

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #208
1. Is it possible to draw text right aligned?
See documentation for `GdiDrawText` method, specifically `format` argument.

2. Is it possible to draw an external image, a PNG for example.
See docs for `LoadImageAsync`/`LoadImageAsyncV2`, `DrawImage`/`GdiDrawBitmap` methods and basic `LoadImageAsync.js`/`LoadImageAsyncV2.js` samples.

God thank you! I found those documentation files, didn't even know they were there. Finally I put together my panel and it's perfect. =)

Thank you TheQwertiest for an awesome plugin and all the support! This plugin must give endless possibilities for you guys who really know how to script. Keep up the good work!

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #209
I found those documentation files, didn't even know they were there. Finally I put together my panel and it's perfect.

FYI, there is a JS version and HTML version of the docs. You want the HTML version, which is accessible via `Context Menu`>`Configure Panel`>`Help`>`View Help`.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #210
1. Is it possible to draw text right aligned?
See documentation for `GdiDrawText` method, specifically `format` argument.

2. Is it possible to draw an external image, a PNG for example.
See docs for `LoadImageAsync`/`LoadImageAsyncV2`, `DrawImage`/`GdiDrawBitmap` methods and basic `LoadImageAsync.js`/`LoadImageAsyncV2.js` samples.

Is it possible to load an image directly from an url ?

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #211
Is it possible to load an image directly from an url ?
Nope, you'll have to download it manually: SMP does not provide any direct means to work with the Web, you have to use a suitable COM object via `ActiveObjectX` interface (e.g. `ActiveObjectX("MSXML2.XMLHTTP")`.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #212
Is it possible to load an image directly from an url ?
Nope, you'll have to download it manually: SMP does not provide any direct means to work with the Web, you have to use a suitable COM object via `ActiveObjectX` interface (e.g. `ActiveObjectX("MSXML2.XMLHTTP")`.
I have created a code using XMLHttpRequest that can download binary stream of file under Chrome, but it does not work inside a SMP panel (using a the ActiveX component instead of XMLHttpRequest object), and then I don't find anyway to save the stream to filesystem.
Any clue appreciated.

Re: Spider Monkey Panel (foo_spider_monkey_panel)

Reply #213
It's not an easy problem. You can try to look at the code of the Biography script by Wilb, there, it calls a VBScript in order to download images (well his VBScript can actually download any kind of file).

 
SimplePortal 1.0.0 RC1 © 2008-2019