Jump to content



Photo

toolbar with slider cube


  • Please log in to reply
14 replies to this topic

#1 sandin

sandin

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 569 posts

Posted 07 August 2008 - 02:34 AM

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
AutoIt         
#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:

Attached Thumbnails

  • square.gif

Attached Files


Edited by sandin, 16 August 2008 - 04:27 PM.






#2 TehWhale

TehWhale

    Whalee..

  • Banned (NOT IN USE)
  • 1,482 posts

Posted 07 August 2008 - 02:39 AM

That's fricken sweet bro! 5 Stars!

Edited by Alienware, 07 August 2008 - 02:39 AM.


#3 sandin

sandin

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 569 posts

Posted 07 August 2008 - 02:44 AM

tnx! :P

#4 TehWhale

TehWhale

    Whalee..

  • Banned (NOT IN USE)
  • 1,482 posts

Posted 07 August 2008 - 03:09 AM

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.

Plain Text         
#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, 07 August 2008 - 03:10 AM.


#5 sandin

sandin

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 569 posts

Posted 07 August 2008 - 03:17 AM

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

#6 rasim

rasim

    Gray Scripter

  • Active Members
  • PipPipPipPipPipPip
  • 1,708 posts

Posted 07 August 2008 - 04:40 AM

sandin
Very nice :P
OS: Windows XP SP3, AutoIt version: 3.3.0.0Posted Image My Projects: Free_Resources | Splitter | wgetGUI | UnRARIt | USBMon | CDROM-Control | Volume Serial Changer | WinTrayPosted Image My UDFs: _ScreenSetting | ListView_Progress | ContextHelp | ToolTip_UDF | UnRAR | Zip32 | BassMod | ShellTreeView | GuiHotKey | 7ZipPosted Image My Examples: TrayIcon_Click | SystemTray_Refresh | _ListView_Sort | CPUmonLike above scripts? Please rate the topic Posted Image

#7 gseller

gseller

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,057 posts

Posted 07 August 2008 - 05:32 AM

I Like!! Thanks for sharing...

#8 Zinthose

Zinthose

    Adventurer

  • Active Members
  • PipPip
  • 131 posts

Posted 07 August 2008 - 01:07 PM

Damn that's Sexy!
You got my vote! Posted Image
:P My head is whirling, I must find a way to use this!
Posted Image

#9 TehWhale

TehWhale

    Whalee..

  • Banned (NOT IN USE)
  • 1,482 posts

Posted 07 August 2008 - 01:15 PM

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.

#10 sandin

sandin

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 569 posts

Posted 07 August 2008 - 01:35 PM

@all: thank you for positive feedback!! :P
@Alienware: I'll gladly accept your offer for help :P

#11 TehWhale

TehWhale

    Whalee..

  • Banned (NOT IN USE)
  • 1,482 posts

Posted 07 August 2008 - 11:49 PM

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

AutoIt         
#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, 08 August 2008 - 12:01 AM.


#12 TehWhale

TehWhale

    Whalee..

  • Banned (NOT IN USE)
  • 1,482 posts

Posted 15 August 2008 - 07:24 PM

Has anyone tried the new version?

#13 Zinthose

Zinthose

    Adventurer

  • Active Members
  • PipPip
  • 131 posts

Posted 15 August 2008 - 09:54 PM

Has anyone tried the new version?


Yep... It's still Sexy!
Posted Image

#14 sandin

sandin

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 569 posts

Posted 16 August 2008 - 04:24 PM

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

#15 TehWhale

TehWhale

    Whalee..

  • Banned (NOT IN USE)
  • 1,482 posts

Posted 16 August 2008 - 08:22 PM

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! ;)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users