Sign in to follow this  
Followers 0
sandin

toolbar with slider cube

15 posts in this topic

#1 ·  Posted (edited)

EDIT: try alienware's script (it doesn't require gif image :P) here

toolbar with movable "square" to the icons when you move your mouse to them.

Posted Image

#include <GUIConstants.au3>
#include <Misc.au3>
Global $timer_toolbar
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 500, 200)
$Edit1 = GUICtrlCreateEdit("", 0, 40, 500, 160)
;~ GUICtrlSetData(-1, "Edit1")
$line1 = GUICtrlCreateGraphic(5, 30, 490, 1, 0x08)
$icon1 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 5, 5, 16, 16)
$icon2 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 30, 5, 16, 16)
$icon3 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 55, 5, 16, 16)
$icon4 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 80, 5, 16, 16)
$icon5 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 105, 5, 16, 16)
$icon6 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 130, 5, 16, 16)
$icon7 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 155, 5, 16, 16)
$icon8 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 180, 5, 16, 16)
$icon9 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 205, 5, 16, 16)
$icon10 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 230, 5, 16, 16)
$icon11 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 255, 5, 16, 16)
$icon12 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 280, 5, 16, 16)

GUISetState(@SW_SHOW, $Form1)
$form2 = guicreate("", 23, 23, 1+50, 1, 0x80000000, BitOR(0x00080000 , 0x00000040), $Form1)
GUICtrlCreatePic(@ScriptDir & "\square.gif", 0, 0, 0, 0)
GUISetState(@SW_HIDE, $Form2)
#EndRegion ### END Koda GUI section ###

While 1
    if TimerDiff($timer_toolbar) >= 500 Then
        GUISetState(@SW_HIDE, $Form2)
    EndIf
    Local $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    Local $c = GUIGetCursorInfo($Form1)
    Switch $c[4]
        case $icon1[0]
            _dont_edit_this_function($icon1, "function_name")
        case $icon2[0]
            _dont_edit_this_function($icon2, "function_name")
        case $icon3[0]
            _dont_edit_this_function($icon3, "function_name")
        case $icon4[0]
            _dont_edit_this_function($icon4, "function_name")
        case $icon5[0]
            _dont_edit_this_function($icon5, "function_name")
        case $icon6[0]
            _dont_edit_this_function($icon6, "function_name")
        case $icon7[0]
            _dont_edit_this_function($icon7, "function_name")
        case $icon8[0]
            _dont_edit_this_function($icon8, "function_name")
        case $icon9[0]
            _dont_edit_this_function($icon9, "function_name")
        case $icon10[0]
            _dont_edit_this_function($icon10, "function_name")
        case $icon11[0]
            _dont_edit_this_function($icon11, "function_name")
        case $icon12[0]
            _dont_edit_this_function($icon12, "function_name")
    EndSwitch
WEnd

func function_name()
    MsgBox(0, "ok", "ok")
EndFunc

;----------- odavde pa na dole ne treba nista dirati -----------------------
func _dont_edit_this_function($Control_handle, $function_name)
    Local $get_control_position = ControlGetPos($Form1, "", $Control_handle[0])
    Local $get_window_position = WinGetPos($form1)
    Local $get_client_size = WinGetClientSize($Form1)
    Local $mali_border = ($get_window_position[2]-$get_client_size[0])/2
    Local $veliki_border = $get_window_position[3]-$get_client_size[1]-$mali_border
    Local $x_koordinata = $get_window_position[0]+$mali_border+$get_control_position[0]-4
    Local $y_koordinata = $get_window_position[1]+$veliki_border+1
    GUICtrlSetState( $Control_handle[1], $GUI_SHOW)
    GUICtrlSetState( $Control_handle[0], $GUI_HIDE)
;~  WinMove($form2, "", $x_koordinata, $y_koordinata)
    if WinGetState($form2) > 5 Then
        Local $box_position = WinGetPos($Form2)
        if $box_position[0] > $x_koordinata then
            for $i = $box_position[0] to $x_koordinata+20 Step -15
                WinMove($form2, "", $i, $y_koordinata)
                Sleep(1)
            Next
            for $i = $x_koordinata+20 to $x_koordinata+8 Step -5
                WinMove($form2, "", $i, $y_koordinata)
                Sleep(1)
            Next
            for $i = $x_koordinata+8 to $x_koordinata Step -1
                WinMove($form2, "", $i, $y_koordinata)
                Sleep(1)
            Next
            ;WinMove($form2, "", $x_koordinata, $y_koordinata)
        ElseIf $box_position[0] < $x_koordinata Then
            for $i = $box_position[0] to $x_koordinata-20 Step 15
                WinMove($form2, "", $i, $y_koordinata)
                Sleep(1)
            Next
            for $i = $x_koordinata-20 to $x_koordinata-8 Step 5
                WinMove($form2, "", $i, $y_koordinata)
                Sleep(1)
            Next
            for $i = $x_koordinata-8 to $x_koordinata Step 1
                WinMove($form2, "", $i, $y_koordinata)
                Sleep(1)
            Next
            ;WinMove($form2, "", $x_koordinata, $y_koordinata)
        EndIf
;~      WinMove($form2, "", $x_koordinata, $y_koordinata)
    Else
        WinMove($form2, "", $x_koordinata, $y_koordinata)
        GUISetState(@SW_SHOWNOACTIVATE, $Form2)
    EndIf
    Local $a = GUIGetCursorInfo($Form1)
        While $a[4] = $Control_handle[1]
            if GUIGetMsg() = $Control_handle[1] then
                if _IsPressed(01) Then
                Do
                Until NOT _IsPressed(01)
                Call($function_name)
                EndIf
            EndIf
            $a = GUIGetCursorInfo($Form1)
        WEnd
        $timer_toolbar = TimerInit()
    GUICtrlSetState( $Control_handle[1], $GUI_HIDE)
    GUICtrlSetState( $Control_handle[0], $GUI_SHOW)
;~  GUISetState(@SW_HIDE, $Form2)
EndFunc

func _create_toolbar_item($location, $icon_name, $x_coordinate, $y_coordinate, $toolbar_item_width, $toolbar_item_height)
    Local $toolbar_item_local[2]
    $toolbar_item_local[0] = GUICtrlCreateIcon($location, $icon_name, $x_coordinate, $y_coordinate, $toolbar_item_width, $toolbar_item_height)
        GUICtrlSetState(-1, $GUI_DISABLE)
    $toolbar_item_local[1] = GUICtrlCreateIcon($location, $icon_name, $x_coordinate, $y_coordinate, $toolbar_item_width, $toolbar_item_height)
        GUICtrlSetState(-1,$GUI_HIDE)
    Return $toolbar_item_local
EndFunc

script requires gif image, gif image below:

post-21187-1218076426_thumb.gif

Script_Gif.ZIP

Edited by sandin

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

That's fricken sweet bro! 5 Stars!

Edited by Alienware

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You should make this into a UDF. I tried, with no success. I was trying to use your 'dont edit...' and stuff, like this sort of. But it didn't work.

Heres my unsuccessful version.

#include <GUIConstants.au3>
#include <Misc.au3>
Global $timer_toolbar
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 500, 200)
$Edit1 = GUICtrlCreateEdit("", 0, 40, 500, 160)
;~ GUICtrlSetData(-1, "Edit1")
$line1 = GUICtrlCreateGraphic(5, 30, 490, 1, 0x08)
$icon1 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 5, 5, 16, 16)
$icon2 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 30, 5, 16, 16)
$icon3 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 55, 5, 16, 16)
$icon4 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 80, 5, 16, 16)
$icon5 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 105, 5, 16, 16)
$icon6 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 130, 5, 16, 16)
$icon7 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 155, 5, 16, 16)
$icon8 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 180, 5, 16, 16)
$icon9 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 205, 5, 16, 16)
$icon10 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 230, 5, 16, 16)
$icon11 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 255, 5, 16, 16)
$icon12 = _create_toolbar_item("Shell32.dll", -(Random(1, 239)), 280, 5, 16, 16)

GUISetState(@SW_SHOW, $Form1)
$Hwnd1 = _ToolBar_Init()
#EndRegion ### END Koda GUI section ###

While 1
    _Toolbar_Reset($Hwnd1)
    Local $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    _Toolbar_Event($Form1, $icon1[0], "TestFunc")
WEnd

Func TestFunc()
    MsgBox(0, "", "d")
EndFunc

Func _ToolBar_Init()
    $form2 = GUICreate("", 23, 23, 1 + 50, 1, 0x80000000, BitOR(0x00080000, 0x00000040), $Form1)
    GUICtrlCreatePic(@ScriptDir & "\square.gif", 0, 0, 0, 0)
    GUISetState(@SW_HIDE, $form2)
    Return $form2
EndFunc

Func _Toolbar_Reset($Hwnd2)
    If TimerDiff($timer_toolbar) >= 500 Then
        GUISetState(@SW_HIDE, $Hwnd2)
    EndIf
EndFunc
Func _Toolbar_Event($a_WinHwnd, $a_Hwnd, $a_Function)
    If Not IsHWnd($a_WinHwnd) Then Return SetError(1, 0, 0)
    Local $a_C_Info = GUIGetCursorInfo($a_WinHwnd)
    If $a_C_Info[4] = $a_Hwnd Then _Toolbar_Event_Handler($a_Hwnd, $a_Function)
EndFunc

;----------- odavde pa na dole ne treba nista dirati -----------------------
Func _Toolbar_Event_Handler($Control_handle, $function_name)
    Local $get_control_position = ControlGetPos($Form1, "", $Control_handle[0])
    Local $get_window_position = WinGetPos($Form1)
    Local $get_client_size = WinGetClientSize($Form1)
    Local $mali_border = ($get_window_position[2] - $get_client_size[0]) / 2
    Local $veliki_border = $get_window_position[3] - $get_client_size[1] - $mali_border
    Local $x_koordinata = $get_window_position[0] + $mali_border + $get_control_position[0] - 4
    Local $y_koordinata = $get_window_position[1] + $veliki_border + 1
    GUICtrlSetState($Control_handle[1], $GUI_SHOW)
    GUICtrlSetState($Control_handle[0], $GUI_HIDE)
;~  WinMove($form2, "", $x_koordinata, $y_koordinata)
    If WinGetState($form2) > 5 Then
        Local $box_position = WinGetPos($form2)
        Local $pomeranje = Abs($x_koordinata - $box_position[0])
        If $box_position[0] > $x_koordinata Then
            For $i = $box_position[0] To $x_koordinata + 20 Step -15
                WinMove($form2, "", $i, $y_koordinata)
                Sleep(1)
            Next
            For $i = $x_koordinata + 20 To $x_koordinata + 8 Step -5
                WinMove($form2, "", $i, $y_koordinata)
                Sleep(1)
            Next
            For $i = $x_koordinata + 8 To $x_koordinata Step -1
                WinMove($form2, "", $i, $y_koordinata)
                Sleep(1)
            Next
            WinMove($form2, "", $x_koordinata, $y_koordinata)
        ElseIf $box_position[0] < $x_koordinata Then
            For $i = $box_position[0] To $x_koordinata - 20 Step 15
                WinMove($form2, "", $i, $y_koordinata)
                Sleep(1)
            Next
            For $i = $x_koordinata - 20 To $x_koordinata - 8 Step 5
                WinMove($form2, "", $i, $y_koordinata)
                Sleep(1)
            Next
            For $i = $x_koordinata - 8 To $x_koordinata Step 1
                WinMove($form2, "", $i, $y_koordinata)
                Sleep(1)
            Next
            WinMove($form2, "", $x_koordinata, $y_koordinata)
        EndIf
;~      WinMove($form2, "", $x_koordinata, $y_koordinata)
    Else
        WinMove($form2, "", $x_koordinata, $y_koordinata)
        GUISetState(@SW_SHOWNOACTIVATE, $form2)
    EndIf
    Local $a = GUIGetCursorInfo($Form1)
    While $a[4] = $Control_handle[1]
        If GUIGetMsg() = $Control_handle[1] Then
            If _IsPressed(01) Then
                Do
                Until Not _IsPressed(01)
                Call($function_name)
            EndIf
        EndIf
        $a = GUIGetCursorInfo($Form1)
    WEnd
    $timer_toolbar = TimerInit()
    GUICtrlSetState($Control_handle[1], $GUI_HIDE)
    GUICtrlSetState($Control_handle[0], $GUI_SHOW)
;~  GUISetState(@SW_HIDE, $Form2)
EndFunc ;==>_dont_edit_this_function

Func _create_toolbar_item($location, $icon_name, $x_coordinate, $y_coordinate, $toolbar_item_width, $toolbar_item_height)
    Local $toolbar_item_local[2]
    $toolbar_item_local[0] = GUICtrlCreateIcon($location, $icon_name, $x_coordinate, $y_coordinate, $toolbar_item_width, $toolbar_item_height)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $toolbar_item_local[1] = GUICtrlCreateIcon($location, $icon_name, $x_coordinate, $y_coordinate, $toolbar_item_width, $toolbar_item_height)
    GUICtrlSetState(-1, $GUI_HIDE)
    Return $toolbar_item_local
EndFunc ;==>_create_toolbar_item
Edited by Alienware

Share this post


Link to post
Share on other sites

sandin

Very nice :P

Share this post


Link to post
Share on other sites

I Like!! Thanks for sharing...

Share this post


Link to post
Share on other sites

Damn that's Sexy!

You got my vote! Posted Image

:P My head is whirling, I must find a way to use this!


--- TTFN

Share this post


Link to post
Share on other sites

tnx for the idea, though, I would need some help with that, I'm not much of a expert in making UDFs, I'm still learning :P

Basically, your just making a function, like I did, that works (obviously) that sums up a bunch of your 'ideas' in your script here. Like I did _Toolbar_Event() to capture that, not exactly sure though. I'll keep working on this, and if you need some help PM me.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

This new script does not require the picture anymore. Just run the program!

#include <GUIConstants.au3>
#include <Misc.au3>


$Form1 = GUICreate("Form1", 500, 200) ;Create teh form
$Edit1 = GUICtrlCreateEdit("", 0, 40, 500, 160) ;Create an edit box :D
GUICtrlSetData(-1, "Edit1") ;Set the editbox data to: "Edit1"
$line1 = GUICtrlCreateGraphic(5, 30, 490, 1, 0x08) ;Create the pretty line under all these Toolbar items

$icon1 = _Toolbar_Create("Shell32.dll", -(Random(1, 239)), 5, 5, 16, 16) ;Create 12 toolbar items :D
$icon2 = _Toolbar_Create("Shell32.dll", -(Random(1, 239)), 30, 5, 16, 16)
$icon3 = _Toolbar_Create("Shell32.dll", -(Random(1, 239)), 55, 5, 16, 16)
$icon4 = _Toolbar_Create("Shell32.dll", -(Random(1, 239)), 80, 5, 16, 16)
$icon5 = _Toolbar_Create("Shell32.dll", -(Random(1, 239)), 105, 5, 16, 16)
$icon6 = _Toolbar_Create("Shell32.dll", -(Random(1, 239)), 130, 5, 16, 16)
$icon7 = _Toolbar_Create("Shell32.dll", -(Random(1, 239)), 155, 5, 16, 16)
$icon8 = _Toolbar_Create("Shell32.dll", -(Random(1, 239)), 180, 5, 16, 16)
$icon9 = _Toolbar_Create("Shell32.dll", -(Random(1, 239)), 205, 5, 16, 16)
$icon10 = _Toolbar_Create("Shell32.dll", -(Random(1, 239)), 230, 5, 16, 16)
$icon11 = _Toolbar_Create("Shell32.dll", -(Random(1, 239)), 255, 5, 16, 16)
$icon12 = _Toolbar_Create("Shell32.dll", -(Random(1, 239)), 280, 5, 16, 16)

GUISetState() ;Show the form

$Init = _Toolbar_Init();Init the toolbar functionality

While 1
    Local $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    
    ; ^^^^^^^^^^^^^^^^^^^^^^^^^ Regular loop
    
    
    _Toolbar_Event($Form1, $Init, $icon1, "function_name") ;Toolbar item events. Must call these even if you dont want to 'click' the button
    _Toolbar_Event($Form1, $Init, $icon2, "function_name")
    _Toolbar_Event($Form1, $Init, $icon3, "function_name")
    _Toolbar_Event($Form1, $Init, $icon4, "function_name")
    _Toolbar_Event($Form1, $Init, $icon5, "function_name")
    _Toolbar_Event($Form1, $Init, $icon6, "function_name")
    _Toolbar_Event($Form1, $Init, $icon7, "function_name")
    _Toolbar_Event($Form1, $Init, $icon8, "function_name")
    _Toolbar_Event($Form1, $Init, $icon9, "function_name")
    _Toolbar_Event($Form1, $Init, $icon10, "function_name")
    _Toolbar_Event($Form1, $Init, $icon11, "function_name")
    _Toolbar_Event($Form1, $Init, $icon12, "function_name")
    
    
    _Toolbar_Reset($Init);Resets the toolbar if your mouse is not on it for a half of a second
WEnd

Func _Toolbar_Reset($_Toolbar_Init)
    If Not IsDeclared("timer_toolbar") Then $timer_toolbar = ""
    If TimerDiff($timer_toolbar) >= 500 Then
        GUISetState(@SW_HIDE, $_Toolbar_Init)
    EndIf
EndFunc   ;==>_Toolbar_Reset

Func _Toolbar_Init()
    Global $timer_toolbar
    $_ReturnBox = GUICreate("", 23, 23, 1 + 50, 1, 0x80000000, BitOR(0x00080000, 0x00000040), $Form1)
    If Not FileExists(@TempDir & "\square.gif") Then
        $a__a_Handle = FileOpen(@TempDir & "\square.gif", 18)
        FileWrite($a__a_Handle, "0x47494638396117001700F72A00000000FFFFFF7B91B42B4F822D508" & _
                "22E51832F51835F7CA82D518345668F4768904B6C934E6D93527196A8B7CA4B6C92547396F5E8A1F4" & _
                "E49CF3DE96F1D78EEFCF86EDC77CEDC77DEBBF73EBBE73E9B568E8B569E7AC5EE4A354E7AB5EE29A4" & _
                "AE5A254DE8A38E09141E09242DB7E2BDD8331DC8331DE8A39DA7926DB7D2B00000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000000000000000000000000000000000000" & _
                "000000000000000000000000000000000000000000000000021F9040100002A002C00000000170017" & _
                "000008A20055081C48B0A0C1810E201418C0B0A1C38703103C70A08281800818336ADC98510003150" & _
                "6221C1C39308201150444921C1981004A092B474A70496042CC83136852B8699002CD0A3C0B56A079" & _
                "2128410B3433181D8881A686A502373885AA422A4A0F5439D00441B503CD0F543FD014417504CD135" & _
                "443D02C41D5044D125453B83480822A8A93090EA0D8CBB7AF5FBE0714A870D0C00081C388132B2650" & _
                "60818380003B")
        FileClose($a__a_Handle)
    EndIf
    GUICtrlCreatePic(@TempDir & "\square.gif", 0, 0, 0, 0)
    GUISetState(@SW_HIDE, $_ReturnBox)
    Return $_ReturnBox
EndFunc   ;==>_Toolbar_Init

Func _Toolbar_Event($WinHwnd, $ToolbarInit, $ToolbarHwnd, $Function = "", $Jump = False)
    Local $c = GUIGetCursorInfo($WinHwnd)
    If $c[4] = $ToolbarHwnd[0] Then _Toolbar_Event_Handler($WinHwnd, $ToolbarInit, $ToolbarHwnd, $Function, $Jump)
EndFunc   ;==>_Toolbar_Event


Func _Toolbar_Event_Handler($WinHwnd, $Toolbar_Init_Func, $Control_handle, $function_name, $Jump)
    Local $get_control_position = ControlGetPos($WinHwnd, "", $Control_handle[0])
    Local $get_window_position = WinGetPos($WinHwnd)
    Local $get_client_size = WinGetClientSize($WinHwnd)
    Local $mali_border = ($get_window_position[2] - $get_client_size[0]) / 2
    Local $veliki_border = $get_window_position[3] - $get_client_size[1] - $mali_border
    Local $x_koordinata = $get_window_position[0] + $mali_border + $get_control_position[0] - 4
    Local $y_koordinata = $get_window_position[1] + $veliki_border + 1
    GUICtrlSetState($Control_handle[1], $GUI_SHOW)
    GUICtrlSetState($Control_handle[0], $GUI_HIDE)
    If $Jump = True Then WinMove($Toolbar_Init_Func, "", $x_koordinata, $y_koordinata)
    If WinGetState($Toolbar_Init_Func) > 5 Then
        Local $box_position = WinGetPos($Toolbar_Init_Func)
        Local $pomeranje = Abs($x_koordinata - $box_position[0])
        If $box_position[0] > $x_koordinata Then
            For $i = $box_position[0] To $x_koordinata + 20 Step -15
                WinMove($Toolbar_Init_Func, "", $i, $y_koordinata)
                Sleep(1)
            Next
            For $i = $x_koordinata + 20 To $x_koordinata + 8 Step -5
                WinMove($Toolbar_Init_Func, "", $i, $y_koordinata)
                Sleep(1)
            Next
            For $i = $x_koordinata + 8 To $x_koordinata Step -1
                WinMove($Toolbar_Init_Func, "", $i, $y_koordinata)
                Sleep(1)
            Next
            WinMove($Toolbar_Init_Func, "", $x_koordinata, $y_koordinata)
        ElseIf $box_position[0] < $x_koordinata Then
            For $i = $box_position[0] To $x_koordinata - 20 Step 15
                WinMove($Toolbar_Init_Func, "", $i, $y_koordinata)
                Sleep(1)
            Next
            For $i = $x_koordinata - 20 To $x_koordinata - 8 Step 5
                WinMove($Toolbar_Init_Func, "", $i, $y_koordinata)
                Sleep(1)
            Next
            For $i = $x_koordinata - 8 To $x_koordinata Step 1
                WinMove($Toolbar_Init_Func, "", $i, $y_koordinata)
                Sleep(1)
            Next
            WinMove($Toolbar_Init_Func, "", $x_koordinata, $y_koordinata)
        EndIf
        If $Jump = True Then WinMove($Toolbar_Init_Func, "", $x_koordinata, $y_koordinata)
    Else
        WinMove($Toolbar_Init_Func, "", $x_koordinata, $y_koordinata)
        GUISetState(@SW_SHOWNOACTIVATE, $Toolbar_Init_Func)
    EndIf
    Local $a = GUIGetCursorInfo($WinHwnd)
    While $a[4] = $Control_handle[1]
        If GUIGetMsg() = $Control_handle[1] Then
            If _IsPressed(01) Then
                Do
                Until Not _IsPressed(01)
                Call($function_name)
            EndIf
        EndIf
        $a = GUIGetCursorInfo($WinHwnd)
    WEnd
    $timer_toolbar = TimerInit()
    GUICtrlSetState($Control_handle[1], $GUI_HIDE)
    GUICtrlSetState($Control_handle[0], $GUI_SHOW)
    If $Jump = True Then GUISetState(@SW_HIDE, $Toolbar_Init_Func)
EndFunc   ;==>_Toolbar_Event_Handler

Func _Toolbar_Create($location, $icon_name, $x_coordinate, $y_coordinate, $toolbar_item_width, $toolbar_item_height)
    Local $toolbar_item_local[2]
    $toolbar_item_local[0] = GUICtrlCreateIcon($location, $icon_name, $x_coordinate, $y_coordinate, $toolbar_item_width, $toolbar_item_height)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $toolbar_item_local[1] = GUICtrlCreateIcon($location, $icon_name, $x_coordinate, $y_coordinate, $toolbar_item_width, $toolbar_item_height)
    GUICtrlSetState(-1, $GUI_HIDE)
    Return $toolbar_item_local
EndFunc   ;==>_Toolbar_Create

If you use GUICtrlSetTip(), for the Ctrl ID, you must use -1, if it's right under it. OR you must use $CtrlID[1]

Edited by Alienware

Share this post


Link to post
Share on other sites

Has anyone tried the new version?

Share this post


Link to post
Share on other sites

Has anyone tried the new version?

Yep... It's still Sexy!


--- TTFN

Share this post


Link to post
Share on other sites

great job alienware ;) sorry, I was out of town, and I didn't had net access, so I couldn't test it sooner. It works gr8 :D

Thanks! ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0