Automatic DesktopX Menu Backgrounds Drop Layer?

Need a little help here on theme..

http://cid-354ca46fe39955d1.skydrive.live.com/self.aspx/System%20Images/1-1%20Glass%20Menu%20Graphics%20Green.jpg

Hi again folks;

I have come up with another idea that I need a little help on.

The Externak link will show two small images I am using in my Menu system. I need to know if there is a way to automatically set the mouse away image background for software links that are droped in a menu layer.

The images can be stored into the linked image section of the object and use the mouse away image "1-1 Glass Menu GraphicsBase.jpg" as the basic image background when a user drops their linked image onto the layer. Then on the mouse over I need to automatically set "1-1 Glass Menu Graphics Green.jpg" as the background for their software image background.

I have seen this somewhere before and I want this theme to be able to automatically set these images with the users software.

It might have to be scripted into the main menu page layer so that when the drop a shortcut on to the main layer it sets these images automatic?

Any one have a direction I can go on this?

Please look at both images ad I think yu willl see that if I can place the mouse away and the mouse over settings with these images it will make it easier for the user to drop links and already have the theme backgrounds set. if DesktioX will do that.

Thanks folks...

Automan

 

 

9,958 views 9 replies
Reply #1 Top

Object.States("name").Picture

This allows you to get/set the picture of an object or state.
Example:

Object.Picture = “image01.png”
Object.States(“Mouse away”).Picture = “C:\images\image01.png”
Object.Picture = http://www.something.com/pic.png

or

DesktopX.Object("nameofobject").states("Mouse away").Picture = "myimage.png"

Example2:

Sub Object_OnDropFiles(files)
Object.picture = files
End Sub

Reply #2 Top

i dont know how it handles things that are "dropped" into a folder.. not done a lot with that.. sorry im no help.

Reply #3 Top

I think i might be able to shed a little light on this

First create an object and attach this script to it; this will be the parent object

Dim strname
Dim i
Const link = "link"
Sub Object_OnDropFiles(File)
  i=0
  Do
    i = i+1
    strname = link & i
  Loop until DesktopX.IsObject(strname)=False
Object.SetTimer 33, 100
End Sub

Sub Object_OnTimer33
Object.Killtimer 33
For Each elem In Object.Children
    If elem.name = "" Then
    Set fso = CreateObject("Scripting.FileSystemObject")
   
DesktopX.object(link&(i-1)).Clone strname,  DesktopX.object(link&(i-1)).left, _
        DesktopX.object(link&(i-1)).bottom+2
            DesktopX.Object(strname).Picture = elem.picture
            DesktopX.Object(strname).Command = elem.Command
            DesktopX.Object(strname).TooltipText = fso.getbasename(DesktopX.Object(strname).command)
            DesktopX.Object(strname).width = elem.width*1.5
            DesktopX.Object(strname).height = elem.height*1.5
            DesktopX.Object(strname).Opacity = 70
            elem.delete
            If Desktopx.IsObject(link&(i-1))=True And (i-1) > 0 Then
       
              If (Desktopx.Object(link&(i-1)).Right + 10) + DesktopX.Object(strname).width < (Object.Width) Then
                    DesktopX.Object(strname).Left = Desktopx.Object(link&(i-1)).Right + 10
                    DesktopX.Object(strname).bottom = Desktopx.Object(link&(i-1)).Bottom
                Else
                    If (Desktopx.Object(link&(i-1)).Bottom + 5) + DesktopX.Object(strname).height < (Object.Height) Then
                        DesktopX.Object(strname).left = 15
                        DesktopX.Object(strname).top = Desktopx.Object(link&(i-1)).Bottom + 5
                    Else
                        Msgbox "List is full! Delete an old link and try again!"
                        DesktopX.Object(strname).delete
                    End If
               
                End If
            Else
                DesktopX.Object(strname).left = 15
                DesktopX.Object(strname).top = 15
            End If
    End If
Next
End Sub

 

Now, create another object but make sure that it has no image attached to it. Attach the following script to said object

Dim i
Dim templeft
Dim temptop
Const link = "link"
Const Parent = "internet_list"
Function Object_OnRButtonUpEx(obj, x, y, dragged)
  If Not dragged Then
     DeleteIconMenu(obj)
    Object_OnRButtonUpEx = True
    End If
End Function

Sub DeleteIconMenu(obj)
         Set mainmenu = nothing
     Set mainmenu = DesktopX.CreatePopupMenu    
     mainmenu.AppendMenu 0, 1, "Delete" 
     mainmenu.AppendMenu 0, 2, "Cancel" 
     result = mainmenu.TrackPopupMenu(0, System.CursorX, System.CursorY)
    Select Case result
      Case 1
             i=0
                  Do
                    i = i+1
                    strname = link & i
                  Loop until strname = Object.Name
                  
                 templeft = Object.Left
                 temptop = Object.Top
                 Object.delete
                For x = i To DesktopX.Object(Parent).Children.count
                    If DesktopX.IsObject(link & x+1) = True Then
                        Desktopx.Object(link & x+1).name = link & x
                        If Desktopx.Object(link & x).Top = temptop Then
                            temp = Desktopx.Object(link & x).left
                            Desktopx.Object(link & x).Left = templeft
                            templeft = temp
                        Else
                            temp = Desktopx.Object(link & x).Top
                            Desktopx.Object(link & x).Top = temptop
                            temptop = temp
                            temp = Desktopx.Object(link & x).Left   
                            Desktopx.Object(link & x).Left = templeft
                            templeft = temp
                        End If
                    End If
                Next
            Case 2
           
    End Select
End Sub

Sub Object_OnMouseEnterEx(Obj)
Object.Opacity = 100
End Sub
Sub Object_OnMouseLeaveEx(Obj)
Object.Opacity = 70
End Sub


and that provides an interface where the user can drag and drop a program onto the parent object and the image, name as well as command will be copied into a new object

Make sure to look over the code as I simply copied and pasted this from my desktop so you'll have to customize it for yourself. Feel free to ask me for help though :)

Reply #4 Top

Hi homer1324;

Good to type at you and I appreciate the help...!

A little brief on what I am trying to do here to release this theme which seems like everyone is really wanting pretty bad. I have been building this for about a year works fine for me, but I need to make a menu system chage that will help the layer shortcut dripping easier for other users. That said here goes.

1. Here is the screen shots of the backgrounds that I am using in Photoshop to build my mmenu items. There is a menu set ot toggle pop-up buttons at the top right on the bar I created that when clicked pops up a background layer located in the middle of the screen ad then the short cuts to my software that I mainly use is dropped onto tha layer image. All of the short cuts that I create have two background images that need to show 1st one shows behins the short cut image and the second on mouse over. So I will name them "ShortAway" for the onethat shows on all the shortcuts when the menu is toggled and the like say Graphics menu is toggled and the second shortcut background we will call "ShortOver" which will show when the mouse goes over the shortcut itself. This leaves the image png or icon file free from these backgrounds so that the real shortcut image or icon can be scripted if need with "mouse away" and "mouse over". I have a script the increases the shortcut png or icon image itself at "Mouse away" is one size like 64 or 72 pixels then on "Mouse over" it increases the image or icon size smoothly to like 92 pixels. really cool effect. The shortcuts can't be set to being a "child" because it messes up the label for the name of the shortcut for some  reason, I don't even place them in a group so as I can move them although that doesn't matter really.

The link below will show the two shortcut background images and also shows then with a shortcut image of DVDCloner being used:

Link: http://cid-354ca46fe39955d1.skydrive.live.com/browse.aspx/System%20Images/Buttom%20Backgrounds

Now i found out that you can place images into the theme directory and place the names into the object-properties summary - Custome Files and call them from a script. Cool!. If I can make it so that the blank looking shortcut image can be shown right when a user places a new shortcut on this menu by scripting the pop-up background layer that shows all the short cuts for the Graphics menu then on their mouse over it automatically hows the "shortover" image I have it working all the way all the user has to do is make the shortcut and both backgrounds are in business and the "Mouse away" and Mouse over for the real shortcut image or icon hasen't even been used ad the png or icom can be scripted on it's own...What do you think?

Here is a link to a posted screenshot on WinCustomize that got a lot of users excited about when the theme would be ready. And frankly I don't think anyone else has done this with DesktopX:

https://www.wincustomize.com/skins.aspx?skinid=24943&libid=13

This shows the toggle menu and the background used for the shortcuts that I have and it hasen't had the new backgrounds applied to them yet it's just using the "mouse away" background withe the shortcut images.

o do you think this is do-able, I can beta test it here and it really is a cool idea just using 2 images for the background on the shortcut and then scripting the real shortcut image to expand in size on the "mouse over"

Let me know if you need more info or have any questions. I really appreciate you taking a look at this!!

Thanks

Col. Larry Hutcheson
aka Automan

 

Reply #5 Top

Hi Automan,

I have seen your post and am giving it some thought right now; I'll post my reply later tonight hopefully!

 

EDIT:

 

Ok, so I read over your post but i'm not quite sure what you're trying to do but maybe you can help me to understand;

So are you trying to make a... widget of sorts, which AUTOMATICALLY creates shortcut objects which lead to certain program that a user uses most?

Or are you trying to make it such that a user can simply drop his program into the object and it updates then?

 

Also, as for your idea about making the objects have a background image for mouse away and background image for mouseover, have you tried setting the images backwards?

meaning, for the image that you want to show when you're moused away, set its image for the state "mouse away" and set NO IMAGE for the state "Hide" . then attach a script to that image with an Object_OnMouseEnterEx(Obj) subroutine which hides the "shortaway" image and then shows the short over image.

you should then attach another script to the short over image with the subroutine Object_OnMouseLeaveEx(Obj) which hides the short over object and shows the short away object.

 

Now i'm not sure if that helps but I hope it does...

 

PS. Maybe a video demo of what you're trying to do would help me understand it better :)

 

Reply #6 Top

homer1324; Thanks I really appreciate it... Hope you come on board, some of this stuff is bleeding edge..

Automan

Reply #7 Top

Hi Homer1234

Or are you trying to make it such that a user can simply drop his program into the object and it updates then?

Yes The Menu system wether Graphics or Media, etc., will allow the user to drop the software link into the object like in the following link:

Graphics Menu opened by Graphics Menu tab on the Bar at top center/right side of the date: https://www.wincustomize.com/zoom.aspx?skinid=24943&libid=13

You can see the software dropped shortcuts on top of the "Graphics Menu Back", but you can also see the let's say "MenuBackShortCut1" as a rectangle behind and around the software links, it's really just the first background object used behind the real "Dropped Shortcuts", like the Adobe Media player right side middle way down the toggled Graphic's menu background object, making it look as if we have an mouse away shortcut, butt really there is the  "MenuBackShortCut1", and the shortcut image on top of it with the 'shortcut image name at the bottom of it all.

The scripting is placed into the Larger toggled "Graphic's Menu Image", with Graphics as a label at the bottom and has the gold coloring in the image.

Everytime the user drops a new shortcut object onto the "Graphic's Menu", it places the first "MenuBackShortCut1", png file behind the new shortcut. Then when the use wants to launch a shortcut the "MenuBackShortCut1",  will on "DesktopX.Object -- Short cut name" event change the image behine the short cut to "MenuBackShortCut2" and then they click the image and launch the application.

Hope this helps, I will do an image of the Graphics Menu and show the 1st and 2nd shortcut images in use and then all I have to do is figureout how to get the vbscript right.

The really COOL part of this menu system is that you can drag and drop a shortcut to the Graphics Background layer and have 1 shortcut background image on the actual "Mouse away" state and then use another shortcut background image show behind the shortcut in the actual "Mouse away" with out scripting the shortcut itself at all just the main Graphics Background. That frees you to actually do this  and make the realy top shortcut zoom in and out with it's script area.

Hope this helps and will get a note off to yu when I get the illistratution up showing process...

Thanks a million again...

Automan

Reply #8 Top

Automan,

Is this anything like what you're trying to do --- DOWNLOAD TEMPLATE OBJECT

This is a modification of my drag and drop template. The script is in the object called "2". In it, there are a few variables you can adjust, namely maxZoom, minZoom, IconSize, BGsize, and TextMargin (the amount of space between the label and the shortcut.) Those are listed at the top.

To use your background images, open the object list, find the "bgimage2" object, then change its mouse away & mouse over images. To change the label text style, find the "textobj" object and change its properties.

It does not accept folders, and, due to a DX bug, it won't work as a widget.

Reply #9 Top

Hey there Homer1234 and sViz;

I think that I have created a really good representation of my Graphics Meny toggled visible and have placed all images used on the actual toggled popup menu background with explanations of the so called workings of "Back1.png" and "Back2.png" as the events of the actual shortcut's state changes from "Mouse away" to "Mouse over" monitored by the pop-up Menu Background itself.

The shortcut when dropped onto the main toggled background would have to use the "Shortcuts label:" or what ever item to place the same name by script into the Summary Tabs "Object ID" for the scripts referencing for the background change on the object's state to reference the correct shortcut and change the background of the object to "Back2.png". At least thats the only way I can think of automatically naming the Object ID. Also the Parent owner is unassigned " at least mine are, ran into weird DesktopX alignments when I tried to make the parent the actua l"Graphics Back", the same happened with all of the menu system sections. I have the main Graphics Background Parent/owner the Toggle button name that makes the pop-up or toggle of the Graphics background work.

I have set in DesktopX Settings the label settings to color white for both mouse away and mouse over no color change, also set the font dor Verdana 8pt. Bold which looks good and most folks will have the Verdanafont installed with Vista and XP.

Below is the link to all of the graphics mentioned and I hope that the one that actually shows the Graphics toggled background with the images on it and the explanations there also will help narrow down what I am trying to do.

http://cid-354ca46fe39955d1.skydrive.live.com/browse.aspx/System%20Images/Buttom%20Backgrounds?uc=5&isFromRichUpload=1

You can click each image a couple of times to bring up a larger view.

OK well guess I have bent you folks eyeballs enough...for right now.

Please let e know what you think, I just know that there has to be a way of doing this. and sViz I will definettly take a look at the link you have me on the one you built.

I appreciate all of this a lot, which I had spent as much time getting back into programming as I have with the Graphic's.

Till then...

Automan