randallc Posted June 24, 2006 Share Posted June 24, 2006 Hi, See my example in post #56 this thread; change this line; $hwnd2 = GUICreate("Sliding Launcher", 603, 160+160, 588, -1, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))to this;$hwnd2 = GUICreate("Sliding Launcher", 603, 160+160, 415, -1, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))Best, Randall [415] ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Simucal Posted June 24, 2006 Author Share Posted June 24, 2006 And what also would be nice is to make it easy to choose that it will be on the left side or the right side of your monitor.I have tried changing some values, but some x-y values are not the same as in Window Info tool. At least wich i could find.How do you mean? I have made it so you can drag it toward either side and it will snap to the closest one? What more do you want than that? AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
Iznogoud Posted June 24, 2006 Share Posted June 24, 2006 How do you mean? I have made it so you can drag it toward either side and it will snap to the closest one? What more do you want than that?If i drag it to my right side the > button when slided in is off my screen. I have Dual screen and still see the button on my second screen. But i read about it that you are trying to fix that, so i will wait Link to comment Share on other sites More sharing options...
AzKay Posted August 5, 2006 Share Posted August 5, 2006 (edited) I keep getting:C:\Documents and Settings\Asus\Desktop\toolbar_king.au3 (50) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: GUICtrlSetImage(-1, $Launch_name[8][1]) GUICtrlSetImage(-1, ^ ERROR +>AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 1.334And, is there a version, the same as this one? but, doubled again, so 28 instead of 14? Yeah, I got alot of programs Even better, when you run the `toolbar.exe` see how big it is? takes 1/4 of the screens side, how about, 4 in 1? So, instead of having 4 open at the same time, have them in one. So, 56 instead of 14 EDIT::Great. Now the errors back D=C:\Documents and Settings\Asus\Desktop\toolbar_king.au3 (50) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: GUICtrlSetImage(-1, $Launch_name[8][1]) GUICtrlSetImage(-1, ^ ERROR +>AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 1.334EDIT::Works again Oo Edited August 5, 2006 by AzKay # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
ivan Posted August 5, 2006 Share Posted August 5, 2006 @Simucal: Amazing... You did request ideas, and I was pretty impressed by the sliding bars of Google search. I've got it running on my pc and it's an excellent little tool. I don't work for them, so this is not advertising. Anyway, back to thoughts on sliding bars, a floating sliding bar pane would be quite useful if one wants to provide desktop visibility control to the user. Think of it like if you don't want the sliding bar in a certain position because it covers your script in scite, you could move it at the bottom where the debugger is located, or elsewhere on your desktop. And it's not that complicated with $GUI_WS_EX_PARENTDRAG constant on the gui definition. Other thought for gui animation are transparency control for the user. IVAN Think out of the boxGrabber: Yet another WinInfo tool_CSVLib (still alpha)Dynamic html in au3 Link to comment Share on other sites More sharing options...
AzKay Posted August 6, 2006 Share Posted August 6, 2006 I keep getting: C:\Documents and Settings\Asus\Desktop\toolbar_king.au3 (50) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: GUICtrlSetImage(-1, $Launch_name[8][1]) GUICtrlSetImage(-1, ^ ERROR +>AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 1.334 And, is there a version, the same as this one? but, doubled again, so 28 instead of 14? Yeah, I got alot of programs Even better, when you run the `toolbar.exe` see how big it is? takes 1/4 of the screens side, how about, 4 in 1? So, instead of having 4 open at the same time, have them in one. So, 56 instead of 14 EDIT:: Great. Now the errors back D= C:\Documents and Settings\Asus\Desktop\toolbar_king.au3 (50) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: GUICtrlSetImage(-1, $Launch_name[8][1]) GUICtrlSetImage(-1, ^ ERROR +>AutoIT3.exe ended.rc:0 >Exit code: 0 Time: 1.334 EDIT:: Works again Oo # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Valuater Posted August 6, 2006 Share Posted August 6, 2006 ......Anyway, back to thoughts on sliding bars, a floating sliding bar pane would be quite useful if one wants to provide desktop visibility control to the user. Think of it like if you don't want the sliding bar in a certain position because it covers your script in scite, you could move it at the bottom where the debugger is located, or elsewhere on your desktop.And it's not that complicated with $GUI_WS_EX_PARENTDRAG constant on the gui definition.Other thought for gui animation are transparency control for the user.IVANBoth location and transparency are accomplished in the second script on page #18) Link to comment Share on other sites More sharing options...
DaLiMan Posted August 23, 2006 Share Posted August 23, 2006 This is a great tool, thanx for all the hard work on this one.It will come in very handy!!!! I also have a question: Can it be made so I can select Files or ExplorerMaps with it and use it as shortcuts ?Somewhat like my program here...PS: In AutoItKing's example toolbar there should be a little change, 'cause it's not creating the INI file correctly. It was numbered from 1 to 7 twice......Here's the little change:Func Create_ini() IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 1, @ProgramFilesDir & "\Internet Explorer\iexplore.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 2, @SystemDir & "\osk.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 3, @ProgramFilesDir & "\Windows Media Player\wmplayer.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 4, @SystemDir & "\notepad.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 5, @SystemDir & "\calc.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 6, @SystemDir & "\mstsc.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 7, @SystemDir & "\cleanmgr.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 1, "IE Explorer") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 2, "Keyboard") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 3, "Media Player") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 4, "Notepad") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 5, "Calculator") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 6, "Net Service") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 7, "Clean Mngr") IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 8, @ProgramFilesDir & "\Internet Explorer\iexplore.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 9, @SystemDir & "\osk.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 10, @ProgramFilesDir & "\Windows Media Player\wmplayer.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 11, @SystemDir & "\notepad.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 12, @SystemDir & "\calc.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 13, @SystemDir & "\mstsc.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Launch", 14, @SystemDir & "\cleanmgr.exe") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 8, "IE Explorer") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 9, "Keyboard") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 10, "Media Player") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 11, "Notepad") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 12, "Calculator") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 13, "Net Service") IniWrite(@ScriptDir & "\toolbar.ini", "Label", 14, "Clean Mngr") EndFunc ;==>Create_ini Link to comment Share on other sites More sharing options...
jzn2 Posted September 23, 2006 Share Posted September 23, 2006 (edited) Hey, wouldnt it be great if you added Hotkey support for each button? either user defined or hard codedI aslo agree with floating toolbar maybe something in config that would allow a toggle between docked and floating?I found a Problem with V2_VAl... Once i clicked on the button it auto hid and would not unhide...Maybe you could add a minimise to system tray feature?http://www.autoitscript.com/forum/index.php?showtopic=26581#NoTrayIcon #include <GuiConstants.au3> #include <Constants.au3> Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1) TraySetOnEvent($TRAY_EVENT_PRIMARYUP,"SpecialEvent") ;TraySetState(2) ; hide --> not needed GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_MINIMIZE GuiSetState(@SW_HIDE) TraySetState(1) ; show TraySetToolTip ("My app - click here to restore") Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Func SpecialEvent() GuiSetState(@SW_Show) TraySetState(2) ; hide EndFunc Great work on all of it! Edited September 23, 2006 by jzn2 Link to comment Share on other sites More sharing options...
LasombraQ Posted April 19, 2007 Share Posted April 19, 2007 I liked the idea with the slide bar but i am a completely n00b to make all these or even edit yours. Is there any way possible you can edit your own Slidebar into only 3 buttons? I am asking because i have to make a launcher with 3 proggies to work. Link to comment Share on other sites More sharing options...
JohnBailey Posted August 23, 2007 Share Posted August 23, 2007 NICE JOB!! A decision is a powerful thing Link to comment Share on other sites More sharing options...
toxicvn Posted December 22, 2008 Share Posted December 22, 2008 toolbar_king.au3 (54) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: GUICtrlSetImage(-1, $Launch_name[8][1]) GUICtrlSetImage(-1, ^ ERROR >Exit code: 1 Time: 0.337 Link to comment Share on other sites More sharing options...
Valuater Posted December 22, 2008 Share Posted December 22, 2008 toolbar_king.au3 (54) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: GUICtrlSetImage(-1, $Launch_name[8][1]) GUICtrlSetImage(-1, ^ ERROR >Exit code: 1 Time: 0.337 King hasn't been around much, try the one by me 8) Link to comment Share on other sites More sharing options...
Bradness Posted December 24, 2008 Share Posted December 24, 2008 Umm, I have an issue. With the second script, the icons do not display. Any help? My Programs:Rock Paper ScissorsMy UDFs:NONE Link to comment Share on other sites More sharing options...
RomanK Posted December 24, 2008 Share Posted December 24, 2008 Wow, this is great!!! [font="Courier New"]http://RomanK.hondadesigns.com[/font] Link to comment Share on other sites More sharing options...
Valuater Posted December 24, 2008 Share Posted December 24, 2008 Umm, I have an issue. With the second script, the icons do not display. Any help?I updated the code...See post #2 ( first page )http://www.autoitscript.com/forum/index.ph...st&p=1816058) Link to comment Share on other sites More sharing options...
FireFox Posted December 25, 2008 Share Posted December 25, 2008 (edited) Hi, Ive done my own slider for make functions in SciTE thanks to Simucal for a part of window slider script expandcollapse popup#Region Ads Opt("GuiOnEventMode", 1) #include <GUIConstants.au3> #include <WindowsConstants.au3> #EndRegion Ads #Region Global Global $hide_state = 0, $btn_state = 0, $side = "left" Global $Button_[9], $Label_[9] Global $trans = 180 #EndRegion Global #Region Tray Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 1) TrayCreateItem("Slider") TrayItemSetOnEvent(-1, "_SliderSHOW") TrayCreateItem("") TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "_Exit") TraySetOnEvent(-13, "_SliderSHOW") TraySetToolTip("SciTE Creator <d3montools>") #EndRegion Tray #Region SciTE Dim $hMutex = DllCall("kernel32.dll", "hwnd", "OpenMutex", "int", 0x1F0001, "int", False, "str", "SciTE Creator") If $hMutex[0] Then Exit MsgBox(48, "SciTE Creator", "SciTE Creator is already running!" & @CRLF & "Exiting...", 2) DllCall("kernel32.dll", "hwnd", "CreateMutex", "int", 0, "int", False, "str", "SciTE Creator") If WinExists('[CLASS:SciTEWindow]', '') Then $SciTE = WinGetHandle('[CLASS:SciTEWindow]', '') Else MsgBox(48, "SciTE Error", "SciTE window doesn't exists !" & @CRLF & "Exiting...", 2) Exit EndIf #EndRegion SciTE #Region $hwnd $hwnd = GUICreate("Sliding SciTE toolbar <d3montools>", 695, 85, -674, -1, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW), $SciTE) GUISetOnEvent($GUI_EVENT_CLOSE, "_SliderHIDE") $Show = GUICtrlCreateButton(">", 675, 8, 17, 70) GUICtrlSetOnEvent($Show, "Slide_in") $author = GUICtrlCreateLabel("d3mon Corporation. All rights reserved", 35, 20, 600, 85) GUICtrlSetFont(-1, 24, 700) GUISetState(@SW_HIDE, $hwnd) #EndRegion $hwnd #Region $hwnd2 $hwnd2 = GUICreate("Sliding SciTE toolbar <d3montools>", 695, 85, 0, -1, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW), $SciTE) GUISetOnEvent($GUI_EVENT_CLOSE, "_SliderHIDE") $Label_[1] = GUICtrlCreateLabel("Function", 45, 6, 60, 17) $Button_[1] = GUICtrlCreateButton("Create", 30, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function1") $Label_[2] = GUICtrlCreateLabel("GUI", 136, 6, 60, 17) $Button_[2] = GUICtrlCreateButton("Create", 110, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function2") $Label_[3] = GUICtrlCreateLabel("While 1", 210, 6, 43, 17) $Button_[3] = GUICtrlCreateButton("Create", 190, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function3") $Label_[4] = GUICtrlCreateLabel("Button", 290, 6, 75, 17) $Button_[4] = GUICtrlCreateButton("Create", 270, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function4") $Label_[5] = GUICtrlCreateLabel("Msgbox", 366, 6, 75, 17) $Button_[5] = GUICtrlCreateButton("Create", 350, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function5") $Label_[6] = GUICtrlCreateLabel("Opt Event", 442, 6, 75, 17) $Button_[6] = GUICtrlCreateButton("Create", 430, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function6") $Label_[7] = GUICtrlCreateLabel("Untitled", 526, 6, 40, 17) $Button_[7] = GUICtrlCreateButton("Save", 510, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function7") $Label_[8] = GUICtrlCreateLabel("Include", 605, 6, 60, 17) $Button_[8] = GUICtrlCreateButton("browse", 590, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function8") $Hide = GUICtrlCreateButton("<", 675, 8, 17, 70) GUICtrlSetOnEvent($Hide, "Slide_out") GUISetState(@SW_SHOW, $hwnd2) Slide_out() For $i = 1 To 8 GUICtrlSetCursor($Button_[$i], 0) Next #EndRegion $hwnd2 #Region Exit Func _Exit() GUISetState(@SW_HIDE, $hwnd) If $side = "left" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 200, "long", 0x00050002) If $side = "right" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 200, "long", 0x00050001) Exit EndFunc ;==>_Exit #EndRegion Exit #Region While While 1 Sleep(250) If Not ProcessExists('SciTE.exe') Then _Exit() EndIf #Region Transparent If WinActive('[CLASS:SciTEWindow]', '') Then If $trans <> 255 Then WinSetTrans($hwnd, '', 255) WinSetTrans($hwnd2, '', 255) Global $trans = 255 EndIf Else If WinActive($hwnd) Or WinActive($hwnd2) Then If $trans <> 255 Then WinSetTrans($hwnd, '', 255) WinSetTrans($hwnd2, '', 255) EndIf Else If $trans <> 150 Then WinSetTrans($hwnd, '', 150) WinSetTrans($hwnd2, '', 150) Global $trans = 150 EndIf EndIf EndIf #EndRegion $a_pos = WinGetPos($hwnd2) $a_pos2 = WinGetPos($hwnd) If $side = "left" Then If $a_pos[0] + 306 < (@DesktopWidth / 2) Then If $a_pos[0] <> 0 And $hide_state = 0 And $a_pos[0] Then WinMove($hwnd2, "", 0, $a_pos[1]) WinMove($hwnd, "", -674, $a_pos[1]) EndIf If $a_pos2[0] <> -674 And $hide_state = 1 Then WinMove($hwnd, "", -674, $a_pos2[1]) WinMove($hwnd2, "", 0, $a_pos2[1]) EndIf Else SideSwitch() EndIf EndIf If $side = "right" Then If $a_pos[0] + 306 > (@DesktopWidth / 2) Then If $a_pos[0] <> @DesktopWidth - 674 And $hide_state = 0 Then WinMove($hwnd2, "", (@DesktopWidth - 700), $a_pos[1]) WinMove($hwnd, "", (@DesktopWidth - 350), $a_pos[1]) ;<<< d3mon Corp EndIf If $a_pos2[0] <> (@DesktopWidth - 22) And $hide_state = 1 Then WinMove($hwnd, "", (@DesktopWidth - 26), $a_pos2[1]) ; Right button WinMove($hwnd2, "", (@DesktopWidth - 674), $a_pos2[1]) EndIf Else SideSwitch() EndIf EndIf If $hide_state = 0 Then $a_mpos = GUIGetCursorInfo($hwnd2) If IsArray($a_mpos) = 1 Then For $b = 1 To 8 If $a_mpos[4] = $Button_[$b] Then If $b = 1 Then $left = 25 If $b > 1 Then $left = (($b - 1) * 80) + 25 GUICtrlSetPos($Button_[$b], $left, 30, 83, 46) GUICtrlSetColor($Label_[$b], 0xff0000) GUICtrlSetFont($Button_[$b], 8, 400, 4, "MS Sans Serif") While $a_mpos[4] = $Button_[$b] $msg = GUIGetMsg() If $msg = $Button_[$b] Then Call("Function" & $B) ExitLoop EndIf $a_mpos = GUIGetCursorInfo($hwnd2) If IsArray($a_mpos) <> 1 Then ExitLoop WEnd $left = $left + 5 GUICtrlSetPos($Button_[$b], $left, 35, 73, 41) GUICtrlSetColor($Label_[$b], 0x000000) GUICtrlSetFont($Button_[$b], 8, 400, -1, "MS Sans Serif") EndIf Next EndIf EndIf WEnd #EndRegion While #Region Slide Func Slide_in() $hide_state = 0 GUISetState(@SW_HIDE, $hwnd) If $side = "left" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 400, "long", 0x00040001);slide in from left If $side = "right" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 400, "long", 0x00040002);slide in from right WinActivate($hwnd2) WinWaitActive($hwnd2) EndFunc ;==>Slide_in Func Slide_out() $hide_state = 1 If $side = "left" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 200, "long", 0x00050002);slide out to left If $side = "right" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 200, "long", 0x00050001);slide out to right GUISetState(@SW_SHOW, $hwnd) WinActivate($hwnd) WinWaitActive($hwnd) EndFunc ;==>Slide_out #EndRegion Slide #Region Functions Func SideSwitch() If $side = "left" Then $side = "right" GUICtrlSetPos($Hide, 3, 8) GUICtrlSetData($Hide, ">") GUICtrlSetPos($Show, 3, 8) GUICtrlSetData($Show, "<") Else $side = "left" GUICtrlSetPos($Hide, 675, 8) GUICtrlSetData($Hide, "<") GUICtrlSetPos($Show, 675, 8) GUICtrlSetData($Show, ">") EndIf EndFunc ;==>SideSwitch Func _SliderSHOW() GUISetState(@SW_SHOW, $hwnd) GUISetState(@SW_SHOW, $hwnd2) Slide_out() EndFunc ;==>_SliderSHOW Func _SliderHIDE() GUISetState(@SW_HIDE, $hwnd) GUISetState(@SW_HIDE, $hwnd2) EndFunc ;==>_SliderHIDE Func Function1() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'Func _Func()') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF & @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, '{BACKSPACE}') ControlSend('[CLASS:SciTEWindow]', '', 350, 'EndFunc') ControlSend('[CLASS:SciTEWindow]', '', 350, '{RIGHT}') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function1 Func Function2() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, '$win = GUICreate(' & '"GUI <d3montools>"' & ', 300, 300, -1, -1, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'GuiSetOnEvent($GUI_EVENT_CLOSE, "_Exit")') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'GuiSetState(@SW_SHOW, $win)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function2 Func Function3() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'While 1') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'Sleep(250)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF & @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, '{BACKSPACE}') ControlSend('[CLASS:SciTEWindow]', '', 350, 'WEnd') ControlSend('[CLASS:SciTEWindow]', '', 350, '{RIGHT}') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function3 Func Function4() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'GuiCtrlCreateButton("",5,5,50,20)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'GuiCtrlSetOnEvent(-1,"_Func")') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function4 Func Function5() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'MsgBox(64,"","")') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function5 Func Function6() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'Opt("GuiOnEventMode",1)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'Opt("TrayOnEventMode",1)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'Opt("TrayMenuMode",1)') ControlSend('[CLASS:SciTEWindow]', '', 350, '{RIGHT}') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function6 Func Function7() Slide_out() WinActivate('[CLASS:SciTEWindow]', '') WinWaitActive('[CLASS:SciTEWindow]', '', 3) Send("^+s") WinWait('Save File', '', 3) ControlSetText('Save File', '', 1148, @DesktopDir & '\Nouveau AutoIt v3 Script.au3') Send('{ENTER}') EndFunc ;==>Function7 Func Function8() Slide_out() ShellExecute(_DirAutoIt('Prod') & '\Include') EndFunc ;==>Function8 ; Locate Autoit/Beta Directory ; Author - MHz (Modified by FireFox) Func _DirAutoIt($version = 'Prod') Switch $version Case 'Prod' Switch True Case FileExists(@ProgramFilesDir & '\AutoIt3') Return @ProgramFilesDir & '\AutoIt3' Case RegRead('HKLM\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') Return RegRead('HKLM\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') EndSwitch EndSwitch If $version = 'Prod' Then $version = 'Public Release' Return FileSelectFolder('Locate AutoIt Directory (' & $version & ' version)', @HomeDrive) EndFunc ;==>_DirAutoIt #EndRegion Functions Edit : with onevent mode you can sleep whereas in case mode you can't because the window take long time to slide or for click on button and you get low cpu usage Enjoy ! Merry xmas, FireFox Edited December 25, 2008 by FireFox Link to comment Share on other sites More sharing options...
Valuater Posted December 25, 2008 Share Posted December 25, 2008 Maybe this should be a new thread ... see how you like this one... 8) expandcollapse popup#Region Ads Opt("GuiOnEventMode", 1) #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <file.au3> #EndRegion Ads #Region Global Global $hide_state = 0, $btn_state = 0, $side = "left" Global $Button_[9], $Label_[9] Global $trans = 180 Global $win, $TutorItList, $TutorItEdit #EndRegion Global #Region Tray Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 1) TrayCreateItem("Slider") TrayItemSetOnEvent(-1, "_SliderSHOW") TrayCreateItem("") TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "_Exit") TraySetOnEvent(-13, "_SliderSHOW") TraySetToolTip("SciTE Creator <d3montools>") #EndRegion Tray #Region SciTE Dim $hMutex = DllCall("kernel32.dll", "hwnd", "OpenMutex", "int", 0x1F0001, "int", False, "str", "SciTE Creator") If $hMutex[0] Then Exit MsgBox(48, "SciTE Creator", "SciTE Creator is already running!" & @CRLF & "Exiting...", 2) DllCall("kernel32.dll", "hwnd", "CreateMutex", "int", 0, "int", False, "str", "SciTE Creator") If WinExists('[CLASS:SciTEWindow]', '') Then $SciTE = WinGetHandle('[CLASS:SciTEWindow]', '') Else MsgBox(48, "SciTE Error", "SciTE window doesn't exists !" & @CRLF & "Exiting...", 2) Exit EndIf #EndRegion SciTE #Region $hwnd $hwnd = GUICreate("Sliding SciTE toolbar <d3montools>", 695, 85, -674, -1, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW), $SciTE) GUISetOnEvent($GUI_EVENT_CLOSE, "_SliderHIDE") $Show = GUICtrlCreateButton(">", 675, 8, 17, 70) GUICtrlSetOnEvent($Show, "Slide_in") $author = GUICtrlCreateLabel("d3mon Corporation. All rights reserved", 35, 20, 600, 85) GUICtrlSetFont(-1, 24, 700) GUISetState(@SW_HIDE, $hwnd) #EndRegion $hwnd #Region $hwnd2 $hwnd2 = GUICreate("Sliding SciTE toolbar <d3montools>", 695, 85, 0, -1, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW), $SciTE) GUISetOnEvent($GUI_EVENT_CLOSE, "_SliderHIDE") $Label_[1] = GUICtrlCreateLabel("Function", 45, 6, 60, 17) $Button_[1] = GUICtrlCreateButton("Create", 30, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function1") $Label_[2] = GUICtrlCreateLabel("GUI", 136, 6, 60, 17) $Button_[2] = GUICtrlCreateButton("Create", 110, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function2") $Label_[3] = GUICtrlCreateLabel("While 1", 210, 6, 43, 17) $Button_[3] = GUICtrlCreateButton("Create", 190, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function3") $Label_[4] = GUICtrlCreateLabel("Button", 290, 6, 75, 17) $Button_[4] = GUICtrlCreateButton("Create", 270, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function4") $Label_[5] = GUICtrlCreateLabel("Msgbox", 366, 6, 75, 17) $Button_[5] = GUICtrlCreateButton("Create", 350, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function5") $Label_[6] = GUICtrlCreateLabel("Opt Event", 442, 6, 75, 17) $Button_[6] = GUICtrlCreateButton("Create", 430, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function6") $Label_[7] = GUICtrlCreateLabel("Untitled", 526, 6, 40, 17) $Button_[7] = GUICtrlCreateButton("Save", 510, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function7") $Label_[8] = GUICtrlCreateLabel("Include", 605, 6, 60, 17) $Button_[8] = GUICtrlCreateButton("browse", 590, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function8") $Hide = GUICtrlCreateButton("<", 675, 8, 17, 70) GUICtrlSetOnEvent($Hide, "Slide_out") GUISetState(@SW_SHOW, $hwnd2) Slide_out() For $i = 1 To 8 GUICtrlSetCursor($Button_[$i], 0) Next #EndRegion $hwnd2 #Region Exit Func _Exit() GUISetState(@SW_HIDE, $hwnd) If $side = "left" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 200, "long", 0x00050002) If $side = "right" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 200, "long", 0x00050001) Exit EndFunc ;==>_Exit #EndRegion Exit #Region While While 1 Sleep(250) If Not ProcessExists('SciTE.exe') Then _Exit() EndIf #Region Transparent If WinActive('[CLASS:SciTEWindow]', '') Then If $trans <> 255 Then WinSetTrans($hwnd, '', 255) WinSetTrans($hwnd2, '', 255) $trans = 255 EndIf Else If WinActive($hwnd) Or WinActive($hwnd2) Then If $trans <> 255 Then WinSetTrans($hwnd, '', 255) WinSetTrans($hwnd2, '', 255) $trans = 255 EndIf Else If $trans <> 150 Then WinSetTrans($hwnd, '', 150) WinSetTrans($hwnd2, '', 150) $trans = 150 EndIf EndIf EndIf #EndRegion Transparent $a_pos = WinGetPos($hwnd2) $a_pos2 = WinGetPos($hwnd) If $side = "left" Then If $a_pos[0] + 306 < (@DesktopWidth / 2) Then If $a_pos[0] <> 0 And $hide_state = 0 And $a_pos[0] Then WinMove($hwnd2, "", 0, $a_pos[1]) WinMove($hwnd, "", -674, $a_pos[1]) EndIf If $a_pos2[0] <> -674 And $hide_state = 1 Then WinMove($hwnd, "", -674, $a_pos2[1]) WinMove($hwnd2, "", 0, $a_pos2[1]) EndIf Else SideSwitch() EndIf EndIf If $side = "right" Then If $a_pos[0] + 306 > (@DesktopWidth / 2) Then If $a_pos[0] <> @DesktopWidth - 674 And $hide_state = 0 Then WinMove($hwnd2, "", (@DesktopWidth - 700), $a_pos[1]) WinMove($hwnd, "", (@DesktopWidth - 350), $a_pos[1]) ;<<< d3mon Corp EndIf If $a_pos2[0] <> (@DesktopWidth - 22) And $hide_state = 1 Then WinMove($hwnd, "", (@DesktopWidth - 26), $a_pos2[1]) ; Right button WinMove($hwnd2, "", (@DesktopWidth - 674), $a_pos2[1]) EndIf Else SideSwitch() EndIf EndIf If $hide_state = 0 Then $a_mpos = GUIGetCursorInfo($hwnd2) If IsArray($a_mpos) = 1 Then For $b = 1 To 8 If $a_mpos[4] = $Button_[$b] Then If $b = 1 Then $left = 25 If $b > 1 Then $left = (($b - 1) * 80) + 25 GUICtrlSetPos($Button_[$b], $left, 30, 83, 46) GUICtrlSetColor($Label_[$b], 0xff0000) GUICtrlSetFont($Button_[$b], 8, 400, 4, "MS Sans Serif") While $a_mpos[4] = $Button_[$b] $msg = GUIGetMsg() If $msg = $Button_[$b] Then Call("Function" & $b) ExitLoop EndIf $a_mpos = GUIGetCursorInfo($hwnd2) If IsArray($a_mpos) <> 1 Then ExitLoop WEnd $left = $left + 5 GUICtrlSetPos($Button_[$b], $left, 35, 73, 41) GUICtrlSetColor($Label_[$b], 0x000000) GUICtrlSetFont($Button_[$b], 8, 400, -1, "MS Sans Serif") EndIf Next EndIf EndIf WEnd #EndRegion Transparent #Region Slide Func Slide_in() $hide_state = 0 GUISetState(@SW_HIDE, $hwnd) If $side = "left" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 400, "long", 0x00040001);slide in from left If $side = "right" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 400, "long", 0x00040002);slide in from right WinActivate($hwnd2) WinWaitActive($hwnd2) EndFunc ;==>Slide_in Func Slide_out() $hide_state = 1 If $side = "left" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 200, "long", 0x00050002);slide out to left If $side = "right" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 200, "long", 0x00050001);slide out to right GUISetState(@SW_SHOW, $hwnd) WinActivate($hwnd) WinWaitActive($hwnd) EndFunc ;==>Slide_out #EndRegion Slide #Region Functions Func SideSwitch() If $side = "left" Then $side = "right" GUICtrlSetPos($Hide, 3, 8) GUICtrlSetData($Hide, ">") GUICtrlSetPos($Show, 3, 8) GUICtrlSetData($Show, "<") Else $side = "left" GUICtrlSetPos($Hide, 675, 8) GUICtrlSetData($Hide, "<") GUICtrlSetPos($Show, 675, 8) GUICtrlSetData($Show, ">") EndIf EndFunc ;==>SideSwitch Func _SliderSHOW() GUISetState(@SW_SHOW, $hwnd) GUISetState(@SW_SHOW, $hwnd2) Slide_out() EndFunc ;==>_SliderSHOW Func _SliderHIDE() _Close_GUI() GUISetState(@SW_HIDE, $hwnd) GUISetState(@SW_HIDE, $hwnd2) EndFunc ;==>_SliderHIDE Func Function1() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'Func _Func()') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF & @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, '{BACKSPACE}') ControlSend('[CLASS:SciTEWindow]', '', 350, 'EndFunc') ControlSend('[CLASS:SciTEWindow]', '', 350, '{RIGHT}') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function1 Func Function2() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, '$win = GUICreate(' & '"GUI <d3montools>"' & ', 300, 300, -1, -1, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'GuiSetOnEvent($GUI_EVENT_CLOSE, "_Exit")') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'GuiSetState(@SW_SHOW, $win)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function2 Func Function3() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'While 1') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'Sleep(250)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF & @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, '{BACKSPACE}') ControlSend('[CLASS:SciTEWindow]', '', 350, 'WEnd') ControlSend('[CLASS:SciTEWindow]', '', 350, '{RIGHT}') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function3 Func Function4() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'GuiCtrlCreateButton("",5,5,50,20)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'GuiCtrlSetOnEvent(-1,"_Func")') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function4 Func Function5() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'MsgBox(64,"","")') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function5 Func Function6() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'Opt("GuiOnEventMode",1)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'Opt("TrayOnEventMode",1)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'Opt("TrayMenuMode",1)') ControlSend('[CLASS:SciTEWindow]', '', 350, '{RIGHT}') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function6 Func Function7() Slide_out() WinActivate('[CLASS:SciTEWindow]', '') WinWaitActive('[CLASS:SciTEWindow]', '', 3) Send("^+s") WinWait('Save File', '', 3) ControlSetText('Save File', '', 1148, @DesktopDir & '\Nouveau AutoIt v3 Script.au3') Send('{ENTER}') EndFunc ;==>Function7 Func Function8() Slide_out() _Show_Includes() EndFunc ;==>Function8 Func _Show_Includes() GUICtrlSetState($Show, $GUI_DISABLE) $win = GUICreate("Click on the Includes you want", 614, 370, -1, -1, $WS_CAPTION, -1, $hwnd) GUISetFont(9, 400, -1, "MS Sans Serif") $btnList = GUICtrlCreateButton("&View File", 10, 330, 75, 25) GUICtrlSetOnEvent(-1, "Set_View_List") $btnView = GUICtrlCreateButton("&Close", 85, 330, 75, 25) GUICtrlSetOnEvent(-1, "_Close_GUI") $TutorItList = GUICtrlCreateList("", 10, 10, 150, 330) GUICtrlSetOnEvent(-1, "_Set_Include") $TutorItEdit = GUICtrlCreateEdit("Please select an Include from the list to your left.", 175, 10, 420, 345, $ES_AUTOVSCROLL + $ES_READONLY + $ES_MULTILINE + $WS_VSCROLL) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlSetColor(-1, 0x000000) GUICtrlSetState($TutorItList, $GUI_FOCUS) GUISetState(@SW_SHOW, $win) Set_List() EndFunc ;==>_Show_Includes Func Set_List($location = "", $type = "*.au3") If $location = "" Then $location = _DirAutoIt() & '\Include\' If Not StringRight($location, 1) = "\" Then $location &= "\" $TutList = _FileListToArray($location, $type, 1) ; list files to an array. If (Not IsArray($TutList)) Or (@error = 1) Then MsgBox(262208, "Tutor Error", "No Files\Folders Found. ", 5) Return EndIf GUICtrlSetData($TutorItList, "") ; set list to empty. For $x = 1 To $TutList[0] ; for loop to place the files in the list. GUICtrlSetData($TutorItList, (StringTrimRight($TutList[$x], 4)) & "|", 1) ; string trim the last 4 characters ( .au3 ) Next EndFunc ;==>Set_List Func Set_View_List(); I had to do this??? View_List() EndFunc ;==>Set_View_List Func View_List($location2 = "", $type = ".au3") If $location2 = "" Then $location2 = _DirAutoIt() & '\Include\' If Not StringRight($location2, 1) = "\" Then $location2 &= "\" $s_text = GUICtrlRead($TutorItList) ; read the selected file to a variable. If $s_text = "" Then Return $s_text = $location2 & $s_text & $type ; set the location of the file. Dim $Tut_text If Not _FileReadToArray($s_text, $Tut_text) Then ; read the file to an array. MsgBox(4096, "Tutor Error", " Error reading log to Array error:" & @error) Return EndIf GUICtrlSetData($TutorItEdit, "") ; set the edit to empty. For $x = 1 To $Tut_text[0] ; for loop to place the read file into the edit. GUICtrlSetData($TutorItEdit, $Tut_text[$x] & @CRLF, 1) Next EndFunc ;==>View_List Func _Set_Include() $Info = GUICtrlRead($TutorItList) ControlSend('[CLASS:SciTEWindow]', '', 350, "#include <") ControlSend('[CLASS:SciTEWindow]', '', 350, "{BACKSPACE 19}") ControlSend('[CLASS:SciTEWindow]', '', 350, $Info & ".au3>" & @CRLF) EndFunc ;==>_Set_Include Func _Close_GUI() GUIDelete($win) GUICtrlSetState($Show, $GUI_ENABLE) EndFunc ;==>_Close_GUI ; Locate Autoit/Beta Directory ; Author - MHz (Modified by FireFox) Func _DirAutoIt($version = 'Prod') Switch $version Case 'Prod' Switch True Case FileExists(@ProgramFilesDir & '\AutoIt3') Return @ProgramFilesDir & '\AutoIt3' Case RegRead('HKLM\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') Return RegRead('HKLM\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') EndSwitch EndSwitch If $version = 'Prod' Then $version = 'Public Release' Return FileSelectFolder('Locate AutoIt Directory (' & $version & ' version)', @HomeDrive) EndFunc ;==>_DirAutoIt #EndRegion Functions 8) Link to comment Share on other sites More sharing options...
FireFox Posted December 25, 2008 Share Posted December 25, 2008 @Valuater Thanks for your adds Link to comment Share on other sites More sharing options...
FireFox Posted December 26, 2008 Share Posted December 26, 2008 (edited) SciTE Creator (Slider SciTE functions) expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=SciTE.ico #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_UseAnsi=y #AutoIt3Wrapper_Res_Description=d3mon Corporation #AutoIt3Wrapper_Res_Fileversion=1.0 #AutoIt3Wrapper_Res_LegalCopyright=d3mon Corporation. All rights reserved. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #Region Ads Opt("GuiOnEventMode", 1) #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <file.au3> #EndRegion Ads #Region Global Global $hide_state = 0, $btn_state = 0, $side = "right" Global $Button_[9], $Label_[9] Global $trans = 000 Global $win, $TutorItList, $TutorItEdit #EndRegion Global #Region Tray Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 1) TrayCreateItem("Slider") TrayItemSetOnEvent(-1, "_SliderSHOW") TrayCreateItem("") TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "_Exit") TraySetOnEvent(-13, "_SliderSHOW") TraySetToolTip("SciTE Creator <d3montools>") #EndRegion Tray #Region SciTE Dim $hMutex = DllCall("kernel32.dll", "hwnd", "OpenMutex", "int", 0x1F0001, "int", False, "str", "SciTE Creator") If $hMutex[0] Then Exit MsgBox(48, "SciTE Creator", "SciTE Creator is already running!" & @CRLF & "Exiting...", 2) DllCall("kernel32.dll", "hwnd", "CreateMutex", "int", 0, "int", False, "str", "SciTE Creator") If WinExists('[CLASS:SciTEWindow]', '') Then $SciTE = WinGetHandle('[CLASS:SciTEWindow]', '') Else MsgBox(48, "SciTE Error", "SciTE window doesn't exists !" & @CRLF & "Exiting...", 2) Exit EndIf #EndRegion SciTE #Region $hwnd $hwnd = GUICreate("Sliding SciTE toolbar <d3montools>", 695, 85, @DesktopWidth - 26, -1, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW), $SciTE) GUISetOnEvent($GUI_EVENT_CLOSE, "_SliderHIDE") $ICON1 = GUICtrlCreateIcon("SciTE.ico", -1, 3, 2, 16, 16) GUICtrlSetOnEvent($ICON1, "_SciTERun") $Menu1 = GUICtrlCreateContextMenu($ICON1) GUICtrlCreateMenuItem("Run", $Menu1) GUICtrlSetOnEvent(-1, "_SciTERun") GUICtrlCreateMenuItem("New", $Menu1) GUICtrlSetOnEvent(-1, "_SciTENew") GUICtrlCreateMenuItem("Close", $Menu1) GUICtrlSetOnEvent(-1, "_SciTEClose") $SHOW = GUICtrlCreateButton("<", 3, 21, 16, 55) GUICtrlSetOnEvent($SHOW, "Slide_in") $author = GUICtrlCreateLabel("d3mon Corporation. All rights reserved", 35, 20, 600, 85) GUICtrlSetFont(-1, 24, 700) GUISetState(@SW_HIDE, $hwnd) #EndRegion $hwnd #Region $hwnd2 $hwnd2 = GUICreate("Sliding SciTE toolbar <d3montools>", 695, 85, @DesktopWidth - 674, -1, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW), $SciTE) GUISetOnEvent($GUI_EVENT_CLOSE, "_SliderHIDE") $Label_[1] = GUICtrlCreateLabel("Function", 45, 6, 60, 17) $Button_[1] = GUICtrlCreateButton("Create", 30, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function1") $Label_[2] = GUICtrlCreateLabel("GUI", 136, 6, 60, 17) $Button_[2] = GUICtrlCreateButton("Create", 110, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function2") $Label_[3] = GUICtrlCreateLabel("While 1", 210, 6, 43, 17) $Button_[3] = GUICtrlCreateButton("Create", 190, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function3") $Label_[4] = GUICtrlCreateLabel("Button", 290, 6, 75, 17) $Button_[4] = GUICtrlCreateButton("Create", 270, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function4") $Label_[5] = GUICtrlCreateLabel("Msgbox", 366, 6, 75, 17) $Button_[5] = GUICtrlCreateButton("Create", 350, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function5") $Label_[6] = GUICtrlCreateLabel("Opt Event", 442, 6, 75, 17) $Button_[6] = GUICtrlCreateButton("Create", 430, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function6") $Label_[7] = GUICtrlCreateLabel("Untitled", 526, 6, 40, 17) $Button_[7] = GUICtrlCreateButton("Save", 510, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function7") $Label_[8] = GUICtrlCreateLabel("Include", 605, 6, 60, 17) $Button_[8] = GUICtrlCreateButton("browse", 590, 35, 73, 41) GUICtrlSetOnEvent(-1, "Function8") $ICON2 = GUICtrlCreateIcon("SciTE.ico", -1, 3, 2, 16, 16) GUICtrlSetOnEvent($ICON2, "_SciTERun") $Menu2 = GUICtrlCreateContextMenu($ICON2) GUICtrlCreateMenuItem("Run", $Menu2) GUICtrlSetOnEvent(-1, "_SciTERun") GUICtrlCreateMenuItem("New", $Menu2) GUICtrlSetOnEvent(-1, "_SciTENew") GUICtrlCreateMenuItem("Close", $Menu2) GUICtrlSetOnEvent(-1, "_SciTEClose") $HIDE = GUICtrlCreateButton(">", 3, 21, 16, 55) GUICtrlSetOnEvent($HIDE, "Slide_out") GUISetState(@SW_SHOW, $hwnd2) Slide_out() For $i = 1 To 8 GUICtrlSetCursor($Button_[$i], 0) Next #EndRegion $hwnd2 #Region Exit Func _Exit() GUISetState(@SW_HIDE, $hwnd) If $side = "left" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 200, "long", 0x00050002) If $side = "right" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 200, "long", 0x00050001) Exit EndFunc ;==>_Exit #EndRegion Exit #Region While While 1 Sleep(250) ;~ If Not ProcessExists('SciTE.exe') Then ;~ _Exit() ;~ EndIf #Region Transparent If WinActive('[CLASS:SciTEWindow]') _ Or WinActive($hwnd) _ Or WinActive($hwnd2) Then If $trans <> 255 Then WinSetTrans($hwnd, '', 255) WinSetTrans($hwnd2, '', 255) $trans = 255 EndIf Else If $trans <> 150 Then WinSetTrans($hwnd, '', 150) WinSetTrans($hwnd2, '', 150) $trans = 150 EndIf EndIf #EndRegion Transparent $a_pos = WinGetPos($hwnd2) $a_pos2 = WinGetPos($hwnd) If $side = "left" Then If $a_pos[0] + 306 < (@DesktopWidth / 2) Then If $a_pos[0] <> 0 And $hide_state = 0 And $a_pos[0] Then WinMove($hwnd2, "", 0, $a_pos[1]) ; Left Slider WinMove($hwnd, "", -674, $a_pos[1]) ; Left Button EndIf If $a_pos2[0] <> -674 And $hide_state = 1 Then WinMove($hwnd, "", -674, $a_pos2[1]) ;Left Slider WinMove($hwnd2, "", 0, $a_pos2[1]) ; Left Button EndIf Else SideSwitch() EndIf EndIf If $side = "right" Then If $a_pos[0] + 306 > (@DesktopWidth / 2) Then If $a_pos[0] <> @DesktopWidth - 674 And $hide_state = 0 Then WinMove($hwnd2, "", (@DesktopWidth - 700), $a_pos[1]) ; Right Slider ;~ WinMove($hwnd, "", (@DesktopWidth - 350), $a_pos[1]) ; d3mon Corp WinMove($hwnd, "", (@DesktopWidth - 26), $a_pos[1]) ; Right button EndIf If $a_pos2[0] <> (@DesktopWidth - 22) And $hide_state = 1 Then WinMove($hwnd, "", (@DesktopWidth - 26), $a_pos2[1]) ; Right button WinMove($hwnd2, "", (@DesktopWidth - 700), $a_pos2[1]) ; Right Slider EndIf Else SideSwitch() EndIf EndIf If $hide_state = 0 Then $a_mpos = GUIGetCursorInfo($hwnd2) If IsArray($a_mpos) = 1 Then For $b = 1 To 8 If $a_mpos[4] = $Button_[$b] Then If $b = 1 Then $left = 25 If $b > 1 Then $left = (($b - 1) * 80) + 25 GUICtrlSetPos($Button_[$b], $left, 30, 83, 46) GUICtrlSetColor($Label_[$b], 0xff0000) GUICtrlSetFont($Button_[$b], 8, 400, 4, "MS Sans Serif") While $a_mpos[4] = $Button_[$b] $msg = GUIGetMsg() If $msg = $Button_[$b] Then Call("Function" & $b) ExitLoop EndIf $a_mpos = GUIGetCursorInfo($hwnd2) If IsArray($a_mpos) <> 1 Then ExitLoop WEnd $left = $left + 5 GUICtrlSetPos($Button_[$b], $left, 35, 73, 41) GUICtrlSetColor($Label_[$b], 0x000000) GUICtrlSetFont($Button_[$b], 8, 400, -1, "MS Sans Serif") EndIf Next EndIf EndIf WEnd #EndRegion While #Region Slide Func Slide_in() $hide_state = 0 GUISetState(@SW_HIDE, $hwnd) If $side = "left" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 400, "long", 0x00040001);slide in from left If $side = "right" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 400, "long", 0x00040002);slide in from right WinActivate($hwnd2) WinWaitActive($hwnd2) EndFunc ;==>Slide_in Func Slide_out() $hide_state = 1 If $side = "left" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 200, "long", 0x00050002);slide out to left If $side = "right" Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd2, "int", 200, "long", 0x00050001);slide out to right GUISetState(@SW_SHOW, $hwnd) WinActivate($hwnd) WinWaitActive($hwnd) EndFunc ;==>Slide_out #EndRegion Slide #Region Functions Func SideSwitch() If $side = "left" Then $side = "right" GUICtrlSetPos($HIDE, 3, 21) GUICtrlSetData($HIDE, ">") GUICtrlSetPos($SHOW, 3, 21) GUICtrlSetData($SHOW, "<") GUICtrlSetPos($ICON1, 3, 2) GUICtrlSetPos($ICON2, 3, 2) Else $side = "left" GUICtrlSetPos($HIDE, 675, 21) GUICtrlSetData($HIDE, "<") GUICtrlSetPos($SHOW, 675, 21) GUICtrlSetData($SHOW, ">") GUICtrlSetPos($ICON1, 675, 2) GUICtrlSetPos($ICON2, 675, 2) EndIf EndFunc ;==>SideSwitch Func _SliderSHOW() GUISetState(@SW_SHOW, $hwnd) GUISetState(@SW_SHOW, $hwnd2) Slide_out() EndFunc ;==>_SliderSHOW Func _SliderHIDE() GUISetState(@SW_HIDE, $hwnd) GUISetState(@SW_HIDE, $hwnd2) EndFunc ;==>_SliderHIDE Func Function1() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'Func _Func()') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF & @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, '{BACKSPACE}') ControlSend('[CLASS:SciTEWindow]', '', 350, 'EndFunc') ControlSend('[CLASS:SciTEWindow]', '', 350, '{RIGHT}') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function1 Func Function2() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, '$win = GUICreate(' & '"GUI <d3montools>"' & ', 300, 300, -1, -1, -1, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'GuiSetOnEvent($GUI_EVENT_CLOSE, "_Exit")') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'GuiSetState(@SW_SHOW, $win)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function2 Func Function3() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'While 1') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'Sleep(250)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF & @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, '{BACKSPACE}') ControlSend('[CLASS:SciTEWindow]', '', 350, 'WEnd') ControlSend('[CLASS:SciTEWindow]', '', 350, '{RIGHT}') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function3 Func Function4() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'GuiCtrlCreateButton("",5,5,50,20)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'GuiCtrlSetOnEvent(-1,"_Func")') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function4 Func Function5() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'MsgBox(64,"","")') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function5 Func Function6() Slide_out() ControlSend('[CLASS:SciTEWindow]', '', 350, 'Opt("GuiOnEventMode",1)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'Opt("TrayOnEventMode",1)') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) ControlSend('[CLASS:SciTEWindow]', '', 350, 'Opt("TrayMenuMode",1)') ControlSend('[CLASS:SciTEWindow]', '', 350, '{RIGHT}') ControlSend('[CLASS:SciTEWindow]', '', 350, @CRLF) EndFunc ;==>Function6 Func Function7() Slide_out() WinActivate('[CLASS:SciTEWindow]', '') WinWaitActive('[CLASS:SciTEWindow]', '', 3) Send("^+s") WinWait('Save File', '', 3) ControlSetText('Save File', '', 1148, @DesktopDir & '\Nouveau AutoIt v3 Script.au3') Send('{ENTER}') EndFunc ;==>Function7 Func Function8() Slide_out() _Show_Includes() EndFunc ;==>Function8 Func _Show_Includes() GUICtrlSetState($SHOW, $GUI_DISABLE) $win = GUICreate("AutoIt3 Includes List", 230, 362, -1, -1, -1, -1, $hwnd) GUISetOnEvent($GUI_EVENT_CLOSE, "_CLOSEGUI") GUISetFont(9, 400, -1, "MS Sans Serif") $btnList = GUICtrlCreateButton("&View File", 10, 330, 75, 25) GUICtrlSetOnEvent(-1, "View_Include") $btnView = GUICtrlCreateButton("&Add it", 87, 330, 65, 25) GUICtrlSetOnEvent(-1, "_Set_Include") $TutorItList = GUICtrlCreateList("", 10, 10, 210, 330) $btnBrowse = GUICtrlCreateButton("&Browse...", 155, 330, 65, 25) GUICtrlSetOnEvent(-1, "_Includefolder") GUISetState(@SW_SHOW, $win) Set_List() EndFunc ;==>_Show_Includes Func Set_List($location = "", $type = "*.au3") If $location = "" Then $location = _DirAutoIt() & '\Include\' If Not StringRight($location, 1) = "\" Then $location &= "\" $TutList = _FileListToArray($location, $type, 1) If (Not IsArray($TutList)) Or (@error = 1) Then MsgBox(262208, "Tutor Error", "No Files\Folders Found. ", 5) Return EndIf GUICtrlSetData($TutorItList, "") For $x = 1 To $TutList[0] GUICtrlSetData($TutorItList, (StringTrimRight($TutList[$x], 4)) & "|", 1) Next EndFunc ;==>Set_List Func View_Include() $IncludeName = GUICtrlRead($TutorItList) $Include = _DirAutoIt() & '\Include\' & $IncludeName & ".au3" If FileExists($Include) Then ShellExecute($Include) Else MsgBox(16, "SciTE Slider", "Error : Include file not exists !") EndIf EndFunc ;==>View_Include Func _Set_Include() $Include = GUICtrlRead($TutorItList) ControlSend('[CLASS:SciTEWindow]', '', 350, "#include <") ControlSend('[CLASS:SciTEWindow]', '', 350, "{BACKSPACE 19}") ControlSend('[CLASS:SciTEWindow]', '', 350, $Include & ".au3>" & @CRLF) EndFunc ;==>_Set_Include Func _Includefolder() GUISetState(@SW_MINIMIZE, $win) ShellExecute(_DirAutoIt() & '\Include') EndFunc ;==>_Includefolder Func _CloseGUI() GUIDelete($win) GUICtrlSetState($SHOW, $GUI_ENABLE) EndFunc ;==>_CloseGUI #Region SciTE Functions Func _SciTENew() ShellExecute(_DirAutoIt() & '\SciTE\SciTE.exe') WinWait('[CLASS:SciTEWindow]', '', 3) WinActivate('[CLASS:SciTEWindow]', '') WinWaitActive('[CLASS:SciTEWindow]', '', 3) Send("^n") EndFunc ;==>_SciTENew Func _SciTEClose() ShellExecute(_DirAutoIt() & '\SciTE\SciTE.exe') WinWait('[CLASS:SciTEWindow]', '', 3) WinActivate('[CLASS:SciTEWindow]', '') WinWaitActive('[CLASS:SciTEWindow]', '', 3) Send("^w") EndFunc ;==>_SciTEClose Func _SciTERun() ShellExecute(_DirAutoIt() & '\SciTE\SciTE.exe') EndFunc ;==>_SciTERun #EndRegion SciTE Functions ; ----------------------------------------------- ; Function Name :_DirAutoIt() ; Description : Locate Autoit/Beta Directory ; Author(s) : MHz / FireFox Func _DirAutoIt() If FileExists(@ProgramFilesDir & '\AutoIt3') Then Return @ProgramFilesDir & '\AutoIt3' ElseIf RegRead('HKLM\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') <> '' Then Return RegRead('HKLM\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') EndIf EndFunc ;==>_DirAutoIt ; ----------------------------------------------- #EndRegion Functions Edit : Fixed Non-Array variable error and minor beugs... Edit2 : -Better & faster transparency function -Slider start now from right Edit 3 : Added SciTE Icon for launch SciTE, Close script, New script Enjoy Cheers, FireFox. Edited December 27, 2008 by FireFox Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now