Aceguy Posted August 5, 2008 Share Posted August 5, 2008 (edited) usage... drop & drop onto listview .exe and /lnk filesclick left icon for catagory, click same cat to close listviewdouclick listviewitem to start programright click prog to call up menu.wehn you d&D it will move your .lnk to a desktop folder called shortcuts, will not copy or move .exe files.thats it,hope you like itCOMMENTS PLEASE.... Feel free to change the code as you wish..some things i would like to do (bt dont have the time)* make it sliding*right click menu rename/remove popup menu (instead of just right click remove)NEW* It minimizes to a small windown when lost focus and gui is in small state.NEW* will never let the gui mouve outside windowsNEW* adds an entry stating that the file has an errorNEW* saves the last set(catorgory)NEW* Startup when windows startNEW* .mp3 SupportNEW* ADD PROG TO REGISTRY NEW* Allows D&D of network folder ask linksNEW* the abilty to change the icon to your own suiting.IMPROVED* window posioning upon startIMPROVED* right click menuFIXED* error with old inifile, (incase you updated to new script)FIXED* error when no ini existsFIXED* when deleting, list doest alter(wanted it that way but didnt work)NEEDHELPWITH* when you select the PATH, and click GO, would like a pop the same as when you explore a folder.???expandcollapse popup#Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_outfile=X-L Launch.exe #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** #include<GuiImageList.au3> #include<GuiListView.au3> #include<Misc.au3> #include<ButtonConstants.au3> #include<GUIConstantsEx.au3> #include<ListViewConstants.au3> #include<WindowsConstants.au3> #include<StructureConstants.au3> #include<array.au3> #include<string.au3> Opt("GUIOnEventMode", 1) Opt("TrayIconHide", 1) $a = RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "X-L Launch") ;if it doesn't write it If @error = -1 Then ConsoleWrite("attempting Regwrite " & $a & @LF) If RegWrite("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "X-L", "REG_SZ", @ScriptDir & "\X-L Launch.exe") <> 1 Then If @error = 1 Then MsgBox(0, "Error", "Unable to save to requested key", 2) ElseIf @error = 2 Then MsgBox(0, "Error", "unable to save main key.", 2) ElseIf @error = 3 Then MsgBox("Error", "Unable to remote connect to the registry", 2) ElseIf @error = -1 Then MsgBox("Error", "Unable to save requested value", 2) ElseIf @error = -2 Then MsgBox("Error", "Value type not supported,", 2) EndIf EndIf EndIf If WinExists("X-L") = 1 Then MsgBox(0, "DOH", "Already running", 0) Exit EndIf $inifile = @MyDocumentsDir & "\X Launcher.ini" Global $gui_active, $set, $last Global $WM_DROPFILES = 0x233 Global $gaDropFiles[1], $buttons Global $mini, $win, $sel, $ms_, $xp, $yp, $lost, $pth, $re_, $sct, $network,$strings,$network_f $XL = GUICreate("X-L", 204, 422, 320, 300, -1, BitOR($WS_EX_TOOLWINDOW, $WS_EX_ACCEPTFILES, $WS_EX_TOPMOST));44 fist size then 204 GUISetBkColor(0xC8C8FF, $XL) $buttons = 10 Dim $Pic1[$buttons + 1] Dim $but[$buttons + 1] $network_f=False $network=True $y = 0 $gui_active = True $size = 1 $mini = 0 For $ct = 1 To $buttons $Pic1[$ct] = GUICtrlCreateLabel("", 2, 2 + $y, 40, 40) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetResizing(-1, $GUI_DOCKALL) $but[$ct] = GUICtrlCreateButton("", 6, 6 + $y, 32, 32, $BS_ICON) GUICtrlSetOnEvent(-1, "pressed") GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetState(-1, $GUI_NODROPACCEPTED) $b1 = GUICtrlCreateContextMenu($but[$ct]) $b2 = GUICtrlCreateMenuItem("Change", $b1) GUICtrlSetOnEvent(-1, "change_icon") $y += 42 Next $hListView = GUICtrlCreateListView("", 46, 2, 155, 418, $LVS_LIST, $WS_EX_CLIENTEDGE) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetState(-1, $GUI_DROPACCEPTED) _GUICtrlListView_SetExtendedListViewStyle($hListView, BitOR($LVS_EX_SUBITEMIMAGES, $LVS_EX_FULLROWSELECT)) $hImage = _GUIImageList_Create(32, 32) _GUICtrlListView_SetImageList($hListView, $hImage, 1) _GUICtrlListView_SetView($hListView, 3) $menu1 = GUICtrlCreateContextMenu($hListView) $delete = GUICtrlCreateMenuItem("Remove", $menu1) GUICtrlSetOnEvent(-1, "delete") $rename = GUICtrlCreateMenuItem("Rename", $menu1) GUICtrlSetOnEvent(-1, "Rename") $info = GUICtrlCreateMenuItem("Path", $menu1) GUICtrlSetOnEvent(-1, "Info") for $u=1 to 10 $ri=IniRead($inifile,"icons",$u,"") if $ri <> "" then GUICtrlSetImage($but[$u],$ri,0,1) ElseIf $ri="" and $u=1 Then GUICtrlSetImage($but[1], @ScriptDir & "\icons\094_imageres.ico",0,1);question mark ElseIf $ri="" and $u=2 Then GUICtrlSetImage($but[2], @ScriptDir & "\icons\1_gcdef.ico",0,1);game ElseIf $ri="" and $u=3 Then GUICtrlSetImage($but[3], @ScriptDir & "\icons\1_Au3InfoA.ico",0,1);autoit ElseIf $ri="" and $u=4 Then GUICtrlSetImage($but[4], @ScriptDir & "\icons\017_imageres.ico",0,1);score ElseIf $ri="" and $u=5 Then GUICtrlSetImage($but[5], @ScriptDir & "\icons\147_imageres.ico",0,1);burn ElseIf $ri="" and $u=6 Then GUICtrlSetImage($but[6], @ScriptDir & "\icons\15_connect.ico",0,1);web ElseIf $ri="" and $u=7 Then GUICtrlSetImage($but[7], @ScriptDir & "\icons\1_mmc.ico",0,1);tools ElseIf $ri="" and $u=8 Then GUICtrlSetImage($but[8], @ScriptDir & "\icons\1_mmci.ico",0,1);sound ElseIf $ri="" and $u=9 Then GUICtrlSetImage($but[9], @ScriptDir & "\icons\1_mspaint.ico",0,1);paint ElseIf $ri="" and $u=10 Then GUICtrlSetImage($but[10], @ScriptDir & "\icons\10_oobefldr.ico",0,1);video EndIf Next GUISetOnEvent($GUI_EVENT_CLOSE, "quit") GUISetOnEvent($GUI_EVENT_DROPPED, "Dropped", $XL) GUIRegisterMsg($WM_DROPFILES, "WM_DROPFILES_FUNC") GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") $win = WinGetPos("X-L") If FileExists($inifile) = 1 Then $rd_set = IniRead($inifile, "config", 1, "not") If $rd_set <> "not" Then $set = $rd_set $last = $rd_set GUICtrlSetBkColor($Pic1[$set], 0xFF0000) Else $set = 1 $last = 1 GUICtrlSetBkColor($Pic1[$set], 0xFF0000) EndIf $rd_ = IniRead($inifile, "config", 0, "") If $rd_ <> "0" Then $ss3 = StringSplit($rd_, "|") WinMove("X-L", "", $ss3[1], $ss3[2]) GUISetState(@SW_SHOW) Else GUISetState(@SW_SHOW) EndIf load() Else GUISetState(@SW_SHOW) $set = 1 $last = 1 GUICtrlSetBkColor($Pic1[$set], 0xFF0000) For $c_ = 1 To 10 IniWrite($inifile, $c_, 0, 0) Next IniWrite($inifile, "config", 0, 0) If IniWrite($inifile, "config", 1, 1) = 1 Then MsgBox(0, "", "You inifile has been created successfully", 0) Else MsgBox(32, "Error", "Failed to create inifile, Please insure you have Admin priviledges", 0) EndIf EndIf While 1 Sleep(50) If $win[1] < 0 Then WinMove("X-L", "", $win[0], 0, $win[2], $win[3]) ElseIf $win[1] > @DesktopHeight - $win[3] Then WinMove("X-L", "", $win[0], @DesktopHeight - $win[3], $win[2], $win[3]) ElseIf $win[0] < 0 Then WinMove("X-L", "", 0, $win[1], $win[2], $win[3]) ElseIf $win[0] > @DesktopWidth - $win[2] Then WinMove("X-L", "", @DesktopWidth - $win[2], $win[1], $win[2], $win[3]) EndIf If WinActive("X-L") = 0 And $gui_active = False And $mini = 0 Then $win = WinGetPos("X-L") WinMove("X-L", "", $win[0], $win[1], $win[2], $win[3] - 427, 0) $mini = 1 ElseIf WinActive("X-L") = 1 And $gui_active = False And $mini = 1 Then $win = WinGetPos("X-L") WinMove("X-L", "", $win[0], $win[1], $win[2], $win[3] + 427, 0) $mini = 0 EndIf $win = WinGetPos("X-L") $ms = MouseGetPos() ; if $mini=1 and $ms[0]>10 and $ms[0]<@DesktopWidth-40 then WinMove("X-L","",$ms[0]-10,0) ;gui mouse follow at top.?????????? JUST A TEST If $ms[0] > $win[0] And $ms[0] < $win[0] + $win[2] And $ms[1] > $win[1] And $ms[1] < $win[1] + $win[3] And $gui_active = False And WinActive("X-L") = 0 Then WinActivate("X-L") $mini = 1 EndIf WEnd Func pressed() Local $iD = @GUI_CtrlId ConsoleWrite("ID "&$iD/4&@lf) For $x = 1 To $buttons If $iD = $but[$x] Then GUICtrlSetBkColor($Pic1[(Int($iD / 4))], 0xFF0000) $set = Int($iD / 4) EndIf If $last <> $set Then GUICtrlSetBkColor($Pic1[$last], 0xC8C8FF) Next If $gui_active = True Then If $last = $set Then GUICtrlSetBkColor($Pic1[$set], 0xC8C8FF) $gui_active = False size_box() EndIf ElseIf $gui_active = False Then GUICtrlSetBkColor($Pic1[$set], 0xFF0000) $gui_active = True size_box() EndIf If $gui_active = True And $last <> $set Then _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($hListView)) load() EndIf $last = $set IniWrite($inifile, "config", 1, $set) EndFunc ;==>pressed Func quit() $win = WinGetPos("X-L") IniWrite($inifile, "config", 0, $win[0] & "|" & $win[1]) Exit EndFunc ;==>quit Func size_box() $win = WinGetPos("X-L") If $gui_active = True Then WinMove("X-L", "", $win[0], $win[1], $win[2] + 160, $win[3]) Else WinMove("X-L", "", $win[0], $win[1], $win[2] - 160, $win[3]) EndIf EndFunc ;==>size_box Func Dropped() $read = IniReadSection($inifile, $set) For $d = 0 To UBound($gaDropFiles) - 1 ConsoleWrite("Dropped " & $gaDropFiles[$d] & @LF) $sct = "" If StringRight($gaDropFiles[$d], 4) = ".lnk" Then ConsoleWrite("LINK" & @LF) $FGS = FileGetShortcut($gaDropFiles[$d]) ;_ArrayDisplay($FGS) For $c = 0 To 6 ConsoleWrite("FGS[" & $c & "]" & $FGS[$c] & @LF) Next If $FGS[4] <> "" Then $sct = $FGS[4] ElseIf StringLeft($FGS[0], 2) = "\\" Then $file = $FGS[0] EndIf $file = $FGS[0] Else $file = $gaDropFiles[$d] EndIf ConsoleWrite("$sct>" & $sct & " file>" & $file & @LF) If $file <> "" Then If FileExists($file) = 1 Then $ss = StringSplit($file, "\") $s_ = $ss[0] If StringInStr($ss[$s_], ".", 0, -1) > 0 Then $str = StringTrimRight($ss[$s_], 4) Else $str = $ss[$s_] EndIf If $sct = "" Then If StringRight($file, 4) = ".mp3" Then ConsoleWrite("MP3" & @LF) $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\125_imageres.ico", 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) ElseIf StringLeft($file, 2) = "\\" Then $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\32_SyncCenter.ico", 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) Else $index = _GUIImageList_AddIcon($hImage, $file, 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) EndIf Else If StringRight($file, 4) = ".mp3" Then ConsoleWrite("2nd MP3" & @LF) $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\125_imageres.ico", 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) ElseIf StringLeft($file, 2) = "\\" Then $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\224_shell32.ico", 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) Else $index = _GUIImageList_AddIcon($hImage, $sct, 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) EndIf EndIf If $read[0][0] = 1 And $read[1][1] = "0" Then If $sct = "" Then ConsoleWrite("1nd" & @LF) IniWrite($inifile, $set, $d, $file) Else $ss = StringSplit($file, "\") $s_ = $ss[0] If StringInStr($ss[$s_], ".", 0, -1) > 0 Then $str = StringTrimRight($ss[$s_], 4) Else $str = $ss[$s_] ConsoleWrite("Kept String format 1st" & $str & @LF) EndIf IniWrite($inifile, $set, ($read[0][0]) + $d, $gaDropFiles[$d] & "|" & $str & "|" & $sct) EndIf Else If $sct = "" Then If StringLeft($file, 2) = "\\" Then ConsoleWrite("2nd" & @LF) IniWrite($inifile, $set, ($read[0][0]) + $d, $file) Else ConsoleWrite("3rd" & @LF) IniWrite($inifile, $set, ($read[0][0]) + $d, $gaDropFiles[$d]) EndIf Else $ss = StringSplit($file, "\") $s_ = $ss[0] If StringInStr($ss[$s_], ".", 0, -1) > 0 Then $str = StringTrimRight($ss[$s_], 4) Else $str = $ss[$s_] ConsoleWrite("Kept String format 2nd" & $str & @LF) EndIf IniWrite($inifile, $set, ($read[0][0]) + $d, $gaDropFiles[$d] & "|" & $str & "|" & $sct) EndIf EndIf If StringRight($gaDropFiles[$d], 4) = ".lnk" Then FileCopy($gaDropFiles[$d], @DesktopDir & "\Shortcuts\", 9) FileDelete($gaDropFiles[$d]) EndIf Else $lost = $d lost() EndIf EndIf Next EndFunc ;==>Dropped Func delete() IniDelete($inifile, $set, $sel) $read = IniReadSection($inifile, $set) If @error = 1 Then IniWrite($inifile, $set, 0, 0) Else IniDelete($inifile, $set) For $x = 1 To $read[0][0] IniWrite($inifile, $set, $x - 1, $read[$x][1]) Next EndIf _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($hListView)) load() EndFunc ;==>delete Func rename() $get = _GUICtrlListView_GetItemText($hListView, $sel) If StringInStr($get, "Error!") = 0 Then $re_ = GUICreate("???", 150, 30, $ms_[0], $ms_[1] - 15, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x000000, $re_) $inp = GUICtrlCreateInput("", 2, 2, 145, 25) GUICtrlSetBkColor(-1, 0xC8C8FF) GUICtrlSetFont(-1, 14) GUISetState(@SW_SHOW, $re_) Do Sleep(50) If _IsPressed("DC") And _IsPressed("10") Then MsgBox(0, "", "Do NOT use the | Key", 0) WinActivate("???") WinWaitActive("???") Send("{BACKSPACE}") EndIf Until _IsPressed("0D") $rd_ = IniRead($inifile, $set, $sel, "") If StringInStr($rd_, "|") = 0 Then IniWrite($inifile, $set, $sel, $rd_ & "|" & GUICtrlRead($inp)) _GUICtrlListView_SetItemText($hListView, $sel, GUICtrlRead($inp)) Else $ss2 = StringSplit($rd_, "|") If $ss2[0] = 2 Then IniWrite($inifile, $set, $sel, $ss2[1] & "|" & GUICtrlRead($inp)) ElseIf $ss2[0] = 3 Then IniWrite($inifile, $set, $sel, $ss2[1] & "|" & GUICtrlRead($inp) & "|" & $ss2[3]) EndIf _GUICtrlListView_SetItemText($hListView, $sel, GUICtrlRead($inp)) EndIf GUIDelete($re_) Else MsgBox(0, "", "You cannot rename a broken link", 0) EndIf EndFunc ;==>rename Func info() $g_clicked = False $re_ = GUICreate("???", 350, 30, $ms_[0], $ms_[1] - 15, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x000000, $re_) $inp = GUICtrlCreateLabel("", 2, 2, 300, 25) GUICtrlSetTip(-1, "Click to close") GUICtrlSetOnEvent(-1, "label_click") GUICtrlSetBkColor(-1, 0xC8C8FF) $go_ = GUICtrlCreateButton("GO", 302, 5, 45, 20) GUICtrlSetOnEvent(-1, "go") GUICtrlSetTip(-1, "Take me there") $rd_ = IniRead($inifile, $set, $sel, "") If StringInStr($rd_, "|") = 0 Then GUICtrlSetData($inp, $rd_) $ss3 = StringInStr($rd_, "\", 0, -1) $ss4 = StringTrimRight($rd_, StringLen($rd_) - $ss3) $pth = $ss4 Else $ss2 = StringSplit($rd_, "|") GUICtrlSetData($inp, $ss2[1]) $ss3 = StringInStr($ss2[1], "\", 0, -1) $ss4 = StringTrimRight($ss2[1], StringLen($ss2[1]) - $ss3) $pth = $ss4 EndIf GUISetState(@SW_SHOW, $re_) EndFunc ;==>info Func WM_DROPFILES_FUNC($hWnd, $msgID, $wParam, $lParam) Local $nSize, $pFileName Local $nAmt = DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", 0xFFFFFFFF, "ptr", 0, "int", 255) For $i = 0 To $nAmt[0] - 1 $nSize = DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", $i, "ptr", 0, "int", 0) $nSize = $nSize[0] + 1 $pFileName = DllStructCreate("char[" & $nSize & "]") DllCall("shell32.dll", "int", "DragQueryFile", "hwnd", $wParam, "int", $i, "ptr", DllStructGetPtr($pFileName), "int", $nSize) ReDim $gaDropFiles[$i + 1] $gaDropFiles[$i] = DllStructGetData($pFileName, 1) $pFileName = 0 Next EndFunc ;==>WM_DROPFILES_FUNC Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $tNMHDR, $iCode, $tInfo, $iItem $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $iCode = DllStructGetData($tNMHDR, "Code") Switch $iCode Case $NM_DBLCLK; Sent by a list-view control when the user double-clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) If $iItem = _GUICtrlListView_GetColumnCount($hListView) - 1 Then Return 1 $ir = IniRead($inifile, $set, DllStructGetData($tInfo, "Index"), "") If StringInStr($ir, "|") = 0 Then $ss3 = StringInStr($ir, "\", 0, -1) $ss4 = StringTrimRight($ir, StringLen($ir) - $ss3) ShellExecute($ir, "", $ss4) Else $ss2 = StringSplit($ir, "|") $ss3 = StringInStr($ss2[1], "\", 0, -1) $ss4 = StringTrimRight($ss2[1], StringLen($ss2[1]) - $ss3) ShellExecute($ss2[1], "", $ss4) EndIf Case $NM_RCLICK $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) If $iItem = _GUICtrlListView_GetColumnCount($hListView) - 1 Then Return 1 $sel = DllStructGetData($tInfo, "Index") $ms_ = MouseGetPos() EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func lost() ConsoleWrite("LOST"&@lf) $read = IniRead($inifile, $set, $lost, "") ConsoleWrite("read "&$read&@lf) If StringInStr($read, "|") = 0 Then $ss = StringSplit($read, "\") $s_ = $ss[0] $str = StringTrimRight($ss[$s_], 4) If StringLeft($read, 2) = "\\" Then ConsoleWrite("icon via 1st"&@lf) $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\33_SyncCenter.ico", 0, True) _GUICtrlListView_AddItem($hListView, "Error! - " & $ss[$s_], $index) Else $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\093_imageres.ico", 0, True) _GUICtrlListView_AddItem($hListView, "Error! - " & $str, $index) EndIf Else $ss2 = StringSplit($read, "|") If StringLeft($ss2[1], 2) = "\\" Then ConsoleWrite("icon via 2nd"&@lf) $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\33_SyncCenter.ico", 0, True) _GUICtrlListView_AddItem($hListView, "Error! - " & $ss[$s_], $index) Else $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\093_imageres.ico", 0, True) _GUICtrlListView_AddItem($hListView, "Error! - " & $ss2[2], $index) EndIf EndIf EndFunc ;==>lost Func label_click() GUIDelete($re_) EndFunc ;==>label_click Func go() GUIDelete($re_) ConsoleWrite(@LF & $pth & @LF) ShellExecute("Explorer", $pth) EndFunc ;==>go Func load() $read = IniReadSection($inifile, $set) $network=True For $x = 1 To $read[0][0] If $read[$x][1] <> "0" Then If StringLeft($read[$x][1], 2) = "\\" Then $strings = _StringBetween($read[$x][1], "\\", "\") If Not @error Then ConsoleWrite($strings[0]&" "&$network_f&@lf) if $strings[0] <> $network_f Then _GUICtrlListView_AddItem($hListView, "Checking Network", $x-1) ConsoleWrite(" checking network " & $strings[0] & @LF) $ping = Ping($strings[0], 2000) If $ping = 0 Then $network = False Else $network = True EndIf $network_f=$strings[0] ConsoleWrite("Ping complete " & @LF) _GUICtrlListView_DeleteItem(GUICtrlGetHandle($hListView),_GUICtrlListView_GetItemCount(GUICtrlGetHandle($hListView))-1) EndIf EndIf else $network=True EndIf If StringInStr($read[$x][1], "|") = 0 And $network = True Then If FileExists($read[$x][1]) = 1 Then $ss = StringSplit($read[$x][1], "\") $s_ = $ss[0] $str = StringTrimRight($ss[$s_], 4) ConsoleWrite($x & "X<--- 1st on load()" & @LF) If StringRight($read[$x][1], 4) = ".mp3" Then $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\125_imageres.ico", 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) ElseIf StringLeft($read[$x][1], 2) = "\\" Then $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\32_SyncCenter.ico", 0, True) _GUICtrlListView_AddItem($hListView, $ss[$s_], $index) Else $index = _GUIImageList_AddIcon($hImage, $read[$x][1], 0, True) _GUICtrlListView_AddItem($hListView, $str, $index) EndIf Else $lost = $x - 1 lost() EndIf ElseIf $network = True Then $ss2 = StringSplit($read[$x][1], "|") If FileExists($ss2[1]) = 1 Then ConsoleWrite("2nd on load() " & @LF) If $ss2[0] = 3 Then ConsoleWrite($x & "X<--- 2nd on load() 1st if " & @LF) $index = _GUIImageList_AddIcon($hImage, $ss2[3], 0, True) _GUICtrlListView_AddItem($hListView, $ss2[2], $index) Else If StringRight($ss2[1], 4) = ".mp3" Then $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\125_imageres.ico", 0, True) _GUICtrlListView_AddItem($hListView, $ss2[2], $index) ElseIf StringLeft($ss2[1], 2) = "\\" Then $index = _GUIImageList_AddIcon($hImage, @ScriptDir & "\icons\32_SyncCenter.ico", 0, True) _GUICtrlListView_AddItem($hListView,$ss[$s_], $index) Else $index = _GUIImageList_AddIcon($hImage, $ss2[1], 0, True) _GUICtrlListView_AddItem($hListView, $ss2[2], $index) EndIf EndIf Else $lost = $x - 1 lost() EndIf ElseIf $network = False Then $lost =$x- 1 lost() EndIf EndIf Next EndFunc ;==>load func change_icon() Local $iD = @GUI_CtrlId ConsoleWrite("ID "&int($iD/4)&@lf) $fo=FileOpenDialog("Chose an Icon","","Icons(*.ico)") if not @error Then GUICtrlSetImage($but[int($iD/4)],$fo,-1,1) FileCopy($fo,@ScriptDir&"\Icons",0) $z0=StringSplit($fo,"\") $z1=$z0[0] IniWrite($inifile,"icons",int($iD/4),@ScriptDir&"\icons\"&$z0[$z1]) EndIf EndFunc2,000 people have viewed this and only 21 comments , your opinion does count X_L_Launch.exe Edited September 13, 2008 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
gseller Posted August 5, 2008 Share Posted August 5, 2008 (edited) It definitely has alot of potential! One bug I see is that when you have it loaded with icons and remove one or some it doesn't adjust, it just shows gaping blank spot where the icon was. Way cool the drag and drop thing. I have been looking into doing this same type of thing for a bit now. You have inspired me.. LOL Thanks! It is GREAT! edit: Ooops, My bad! It does clean up if you click on another category then back... Sorry Edited August 5, 2008 by gesller Link to comment Share on other sites More sharing options...
HAL9000 Posted August 6, 2008 Share Posted August 6, 2008 GUICtrlSetImage($but[1], "C:\Users\Ace - PC\Documents\094_imageres.ico",0);question mark guictrlsettip($but[1],"Misc") GUICtrlSetImage($but[2], "C:\Users\Ace - PC\Documents\1_gcdef.ico", 0);game GUICtrlSetTip($but[2],"Games") GUICtrlSetImage($but[3], "C:\Users\Ace - PC\Documents\1_Au3InfoA.ico", 0);autoit GUICtrlSetTip($but[3],"Autoit") GUICtrlSetImage($but[4], "C:\Users\Ace - PC\Documents\017_imageres.ico", 0);score GUICtrlSetTip($but[4],"Music Productin") GUICtrlSetImage($but[5], "C:\Users\Ace - PC\Documents\147_imageres.ico", 0);burn GUICtrlSetTip($but[5],"Burning") GUICtrlSetImage($but[6], "C:\Users\Ace - PC\Documents\15_connect.ico", 0);web GUICtrlSetTip($but[6],"Net tools") GUICtrlSetImage($but[7], "C:\Users\Ace - PC\Documents\1_mmc.ico", 0);tools GUICtrlSetTip($but[7],"Tools") GUICtrlSetImage($but[8], "C:\Users\Ace - PC\Documents\1_mmci.ico", 0);sound GUICtrlSetTip($but[8],"Audio") GUICtrlSetImage($but[9], "C:\Users\Ace - PC\Documents\1_mspaint.ico", 0);paint guictrlsettip($but[9],"Image") gUICtrlSetImage($but[10], "C:\Users\Ace - PC\Documents\10_oobefldr.ico", 0);video guictrlsettip($but[10],"Video") no good path idem for $inifile = @MyDocumentsDir & "\X Launcher.ini" it is better to use @scriptdir Link to comment Share on other sites More sharing options...
Aceguy Posted August 6, 2008 Author Share Posted August 6, 2008 yep, aggree should be @scriptdir. knew about remving icon not shuffiling back up..... was kinda deliberate, just didnt want user to remve an icon and realize that i had gone and clicking agin. i'm getting _guiimagelist_addicon error -1 on some D&D icons...... anyone got a souloution.. thanks for comment geseller. [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
TehWhale Posted August 7, 2008 Share Posted August 7, 2008 The new version is screwed up... Link to comment Share on other sites More sharing options...
gseller Posted August 7, 2008 Share Posted August 7, 2008 Without digging into the code to find your changes, what was changed? The only thing I notice is that now if you do not have an initial app loaded it gives an error finding the file 0... What was supposed to be different? Link to comment Share on other sites More sharing options...
TehWhale Posted August 7, 2008 Share Posted August 7, 2008 The new version seems to be bigger and stuff, besides that error. Link to comment Share on other sites More sharing options...
Aceguy Posted August 8, 2008 Author Share Posted August 8, 2008 new features ** code changed in first post ** **Saves window position upon exit. **now has a right mouse menu (Delete, Rename and info) ** better colours please comment and if you wish, RATEIT [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
sensalim Posted August 8, 2008 Share Posted August 8, 2008 It crashes if you dont have the icon files and drag something onto it... I can't download the zip file (restricted, at work). Can you upload another one with .z1p or something that is not .zip? Thanks. Link to comment Share on other sites More sharing options...
TehWhale Posted August 10, 2008 Share Posted August 10, 2008 BUMP and just to say,,, it has a very important update.... code updated in first post... (incase you have already copied the code pre this message)Errors out. Doesn't work without icons. If theres no ini, which you dont start off with one, errors out twice. Then doesn't work... Link to comment Share on other sites More sharing options...
gseller Posted August 10, 2008 Share Posted August 10, 2008 I was getting an error, but if you delete the old ini file it will work fine.. Great job btw.. Thanks for sharing! Link to comment Share on other sites More sharing options...
Aceguy Posted August 11, 2008 Author Share Posted August 11, 2008 (edited) could you tell me what error you got.coz thats really odd, i delete my ini and restarted and no errors.and just to say YOU NEED THE ICONS Edited August 11, 2008 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
Aceguy Posted August 12, 2008 Author Share Posted August 12, 2008 found the error...... fixed in new post. [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
Jango Posted August 12, 2008 Share Posted August 12, 2008 found the error......fixed in new post.This is really a good script, thank you Link to comment Share on other sites More sharing options...
TehWhale Posted August 12, 2008 Share Posted August 12, 2008 Can I have the first version again? None of the other versions work. Link to comment Share on other sites More sharing options...
Aceguy Posted August 13, 2008 Author Share Posted August 13, 2008 (edited) Can I have the first version again? None of the other versions work.In what way...... what errors do you get.....EDITITED FIRST POST small modification. Edited August 14, 2008 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock Link to comment Share on other sites More sharing options...
MirekFr Posted August 13, 2008 Share Posted August 13, 2008 Good jobs Link to comment Share on other sites More sharing options...
TehWhale Posted August 13, 2008 Share Posted August 13, 2008 In what way...... what errors do you get.....EDITITED FIRST POST small modification.All errors are having to do with an ini file. I have no ini file, so line 128 fails, and line 135 fails. You have no checking for ini, nor creating one... Link to comment Share on other sites More sharing options...
Matthew1344 Posted August 14, 2008 Share Posted August 14, 2008 I can't get it to do anything. It just creates the ini file and runs in the tray without doing anything. Link to comment Share on other sites More sharing options...
Aceguy Posted August 14, 2008 Author Share Posted August 14, 2008 (edited) @Matthew1344 yep sorry found the error didnt have GUISetState(@SW_SHOW) if the inifile didnt exist. @Alienware All errors are having to do with an ini file. I have no ini file, so line 128 fails, and line 135 fails. You have no checking for ini, nor creating one... Hmmm, line 112 checks for ini... If FileExists($inifile) = 1 Then and For $c_ = 1 To 10 IniWrite($inifile, $c_, 0, 0) Next IniWrite($inifile, "config", 0, 0) IniWrite($inifile, "config", 1, 1) does writes the ini Edited August 14, 2008 by Aceguy [u]My Projects.[/u]Launcher - not just for games & Apps (Mp3's & Network Files)Mp3 File RenamerMy File Backup UtilityFFXI - Realtime to Vana time Clock 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