Leaderboard
Popular Content
Showing content with the highest reputation on 04/20/2012 in all areas
-
You're kind of a boring troll. You're not funny enough to be entertaining; you're not smart enough to be clever; you're not insane enough to be interesting. All in all I've had better trolls2 points
-
DeathRow
stormbreaker and one other reacted to Valik for a topic
Blocked. Marked as "Insane" in the blacklist.2 points -
FOUND A BUG in Autoit command !!
twitchyliquid64 and one other reacted to Valik for a topic
Why do people still think they can win? Do they not pay attention to the threads where I state we block tens of thousands of addresses? Do they not notice how hollow all the threats we receive end up ringing? Oh well.2 points -
Stop being an argumentative bitch and work with the people trying to help you or I will remove your ability to receive support on this forum. Your attitude and behavior are not acceptable for somebody requesting help from volunteers.2 points
-
Windows 7 I've had a chance to test the script on Windows 7. To be able to browse system folders e.g. the Control Panel on Windows 7 you have to run the script, EnumDesktopGUI.au3, in the proper way. If you are using Windows 7 64 bit you have to run the script as a 64 bit program to be able to browse the system folders. On Windows XP the generel look and appearance of the GUI is OK. There are problems on Windows 7: The menu bar doesn't look good. Disabled icons are looking very bad. The drop down menu of some of the buttons can erase parts of other controls. The grouping in the ListView of the items in Computer folder is looking very clumsy and the items seems to be mixed up in some way. Also for the Control Panel some items are mixed up and some items appears both as folders and files. I will try to find a solution to these issues. Update #2: 2012-08-20 See first post dated 2012-04-19 below. zip-files are attached to the bottom of the post. Severe error Fixed an error which could lead to a crash immediately before GUI was closed down. Data for the TreeView was deleted and memory freed while the TreeView still had focus. Sorting _GUICtrlListView_RegisterSortCallBack() and related functions are used for sorting. The functions are modified to group files and folders, and to properly sort by size, by type and by time. The functions are provided in the file SortListView.au3. It can be time consuming to sort a large number of files and folders. To prevent using time on both updating and sorting the ListView when a new folder is selected in the TreeView, the sorting mechanism is reset to default when a new folder is selected. The default sorting is the order of files and folders as provided in the "While $IEnumIDList.Next() ... WEnd" loops. Virtual folders It can be a lengthy process to expand a large number of subfolders in the TreeView. To avoid this multiple subfolders can be grouped into a number of virtual folders with a specific number of subfolders in each virtual folder. The virtual folders are only created in the TreeView and ListView. Not on the disk. Virtual folders will be used when the number of subfolders exceeds 300. The number of subfolders in each virtual folder is set to 100. These limits can be changed in the options. And the functionality can be disabled completely. This is testet in a folder with 4000 subfolders and 100 pictures in each subfolder. Expanding the subfolders is much much faster when using virtual folders. In this example there will be created 40 virtual folders named "1 - 100", "101 - 200", ..., "3901 - 4000". Each virtual folder will contain 100 subfolders. But the 100 subfolders will not be expanded until you click a virtual folder. That means that in stead of creating 4000 subfolders at one time (which is extremely time consuming) there will be created 40 virtual folders, and when you click a virtual folder there will be created 100 subfolders at a time. Other updates Right click menu in TreeView: Refresh Added a SplitterBar control between the TreeView and ListView Added grouping information to the ListView for My Computer folder If an icon file EnumDesktopGUI.ico exists, this icon will be used for the GUI Option to save GUI position and size on exit Option to set TreeView startup folder More info to the Details View Fixed some minor issues Update #1: 2012-04-25 In post #3 wraithdu pointed out that the built-in function ObjCreateInterface could be used in stead of AutoItObject. An advantage in using ObjCreateInterface is that according to the helpfile you can use a struct as a parameter in the description string for the methods of the interface. It works in this example. No need for a lot of calls to DllStructGetPtr(). With ObjCreateInterface enumeration of a folder looks like this: ; The address that receives an IShellFolder Interface pointer $pParentFolder = GetParentFolder( ... ) ; Create an IDispatch-Object for the IShellFolder Interface $IShellFolder = ObjCreateInterface( $pParentFolder, $sIID_IShellFolder, $dtagIShellFolder ) ; $pIEnumIDList is the address that receives an IEnumIDList interface pointer of the enumeration object If $IShellFolder.EnumObjects( $NULL, BitOR( $SHCONTF_FOLDERS, $SHCONTF_INCLUDEHIDDEN ), $pIEnumIDList ) = $S_OK Then ; Create an IDispatch-Object for the IEnumIDList Interface $IEnumIDList = ObjCreateInterface( $pIEnumIDList, $sIID_IEnumIDList, $dtagIEnumIDList ) ; Enumerate the folders ; Param 1 [in] : Step value as in a For-loop While $IEnumIDList.Next( 1, $pidlRel, $iFetched ) = $S_OK ; Param 2 [out]: PIDL relative to parent folder $iFolders += 1 ; Param 3 [out]: 0 if no more PIDLs, 1 else ... ... ... WEnd EndIf The zipfile below is updated with new au3-files (the 3 EnumDesktop-files) that uses ObjCreateInterface. This version is not depending on AutoItObject and AutoItObject.au3 is not included. In this example ObjCreateInterface seems to be working flawlessly. 2012-04-19 I've been looking at AutoItObject for some time. I've got inspiration for this example from a similar C++ example and from this thread http://www.autoitscript.com/forum/index.php?showtopic=123365. The GUI in the example is a Windows Explorer Viewer with a TreeView and a ListView. The root of the TreeView is the Desktop. You can browse the Desktop by expanding the folders in the TreeView. Select a folder to show the subfolders and files in the ListView. Right click on an item in the ListView to get file properties. Right click in the free area of the ListView to print a list of item names. Double click or press Enter on an item in the ListView to open a file or execute a program. With AutoItObject a folder doesn't have to be a file system folder. It can be any folder in the Desktop e.g. the Control Panel. The Desktop in this case means the root of the Shell's namespace. To enumerate a folder using AutoItObject you use code like this: ; The address that receives an IShellFolder Interface pointer $pParentFolder = GetParentFolder( ... ) ; Create an IDispatch-Object for the IShellFolder Interface $IShellFolder = _AutoItObject_WrapperCreate( $pParentFolder, $dtagIShellFolder ) ; The address that receives an IEnumIDList interface pointer of the enumeration object $aRet = $IShellFolder.EnumObjects( $NULL, BitOR( $SHCONTF_FOLDERS, $SHCONTF_INCLUDEHIDDEN ), 0 ) If $aRet[0] = $S_OK Then $pIEnumIDList = $aRet[3] ; Create an IDispatch-Object for the IEnumIDList Interface $IEnumIDList = _AutoItObject_WrapperCreate( $pIEnumIDList, $dtagIEnumIDList ) ; Enumerate the folders $aRet = $IEnumIDList.Next( 1, 0, 0 ) ; Param 1 [in] : Step value as in a For-loop While $aRet[3] ; Param 2 [out]: PIDL relative to parent folder $iFolders += 1 ; Param 3 [out]: 0 if no more PIDLs, 1 else ... ... ... $aRet = $IEnumIDList.Next( 1, 0, 0 ) WEnd EndIf Enumeration of a folder in this way uses PIDLs (pointers to ITEMIDLIST structures) in stead of file and folder names. See http://msdn.microsoft.com/en-us/library/windows/desktop/cc144090(v=vs.85).aspx. The zipfile below contains a number of files: EnumDesktopConsts.au3 - definitions and declarationsEnumDesktopFuncs.au3 - functions for the enumerationsEnumDesktopGUI.au3 - the GUI, run this fileFunctions.au3 - different functionsGetIcon.au3 - icon functionsWindows.au3 - child windows for options and infoStringSize.au3 - by Melba23, see http://www.autoitscript.com/forum/index.php?showtopic=114034HourglassOff.au3 - turn hourglass off, see belowres\ - 4 icons and WSP.dll by Yashied, see http://www.autoitscript.com/forum/index.php?showtopic=83621 post #16WSP.dll is used for NM_RETURN notifications in the ListView. The central file in the example is EnumDesktopFuncs.au3. The most important functions in the file are GetParentFolder() - returns an IShellFolder Interface pointer to the parent folderEnumTreeViewObjects() - expands the folders of the parent folder in the TreeViewEnumListViewObjects() - shows the folders and files in the ListView for the parent folderInvokeCommand() - opens a file or runs a program when an item in the ListView is activatedYou need AutoItObject by the AutoItObject team and APIConstants.au3 and WinAPIEx.au3 version 3.6 or 3.7 by Yashied. If the script fails for some reason and you are left with an hourglass cursor, then run HourglassOff.au3 to get the normal cursor back. Run EnumDesktopGUI.au3 in the zipfile. Testet on XP SP3. The zip-files can be opened with 7-Zip. 2012-04-19: Implemented with AutoItObject EnumDesktop.zip Update #2 2012-08-20: Implemented with ObjCreateInterface() (no need for AutoItObject, not included) EnumDesktop.zip EnumDesktop.zip1 point
-
Wow, you are really coureageous o.o ...because you are the admin and you can ban, and all the skids are licking you in the ass, no ? But what was if you wasn't ?? Let me tell you: you are my personal bitch ! Best escort ever!! Hmm... and I really love how you fools are asking "why are you doing this,why you want to do that..."( because you are afraid of...I know it...) and then I lie your asses up with all the bullshits and you trust them ...hahahaha "...the people trying to help you..." well..you are very helpful too, my lovely escort, and all your script skids :]] Don't know shit about C++ .... And my last wish : click on this little doggy and press Ctrl + A ....................../´¯/) ....................,/¯../ .................../..../ ............./´¯/'...'/´¯¯`·¸ ........../'/.../..../......./¨¯ ........('(...´...´.... ¯~/'...') ..........................'...../ ..........''............. _.·´ ..........................( ..............................1 point
-
1 point
-
Is using 'not' better than using '= 0'
jvanegmond reacted to Zedna for a topic
If Not FileExists ("C:afile.txt") Then I prefer this way a this way it has more readability but from programers point of view it' the same.1 point -
sure it is possible. Ask your parents if you can do it first.1 point
-
This should do what you need: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $list_srv = "C:templist_srv1.txt" $sRead = FileRead($list_srv) $asRead = StringSplit($sRead, @CRLF, 1) GUICreate("AutoIT", 400, 350, -1, -1) $hList = GUICtrlCreateList("", 20, 40, 100, 160) For $i = 1 To $asRead[0] If $asRead[$i] <> "" Then GUICtrlSetData($hList, $asRead[$i]) Next GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd1 point
-
Here's a new version of the script that uses Windows messaging to read that the control is being moved instead of the GUIGetMsg function, this works pretty good without the jumping around. #include <GUIConstantsEx.au3> #include <GuiSlider.au3> #include <WindowsConstants.au3> #include <GuiSlider.au3> #include <SliderConstants.au3> #include <GuiEdit.au3> GUIRegisterMsg($WM_HSCROLL, "WM_H_Slider") Global $TicArray[5] = [5, 30, 50, 70, 90] Local $oldpos = 0 ; Create GUI GUICreate("Slider Set Tic", 400, 296) $hSlider = GUICtrlCreateSlider(2, 2, 396, 20, BitOR($TBS_TOOLTIPS, $TBS_BOTH, $TBS_ENABLESELRANGE)) $edit = GUICtrlCreateEdit("--", 50, 50) GUISetState() _GUICtrlSlider_ClearTics($hSlider) ; Set Tics ArrayTicks($TicArray, $hSlider) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ; Create array tics Func ArrayTicks($array, $CurrentSlider) Local $iMax = UBound($array), $i For $i = 0 To $iMax - 1 _GUICtrlSlider_SetTic($CurrentSlider, $array[$i]) Next EndFunc ;==>ArrayTicks Func WM_H_Slider($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $iValue If $lParam = GUICtrlGetHandle($hSlider) Then Local $SliderPos = GUICtrlRead($hSlider) If $SliderPos > $oldpos Then GUICtrlSetData($edit, "moving right") Switch GUICtrlRead($hSlider) Case 1 To 5 GUICtrlSetData($hSlider, 5) Case 6 To 30 GUICtrlSetData($hSlider, 30) Case 31 To 50 GUICtrlSetData($hSlider, 50) Case 51 To 70 GUICtrlSetData($hSlider, 70) Case 71 To 90 GUICtrlSetData($hSlider, 90) Case 91 To 100 GUICtrlSetData($hSlider, 100) Case Else GUICtrlSetData($hSlider, 0) EndSwitch $oldpos = GUICtrlRead($hSlider) ElseIf $SliderPos < $oldpos Then GUICtrlSetData($edit, "moving left") Switch GUICtrlRead($hSlider) Case 0 To 4 GUICtrlSetData($hSlider, 0) Case 5 To 29 GUICtrlSetData($hSlider, 5) Case 30 To 49 GUICtrlSetData($hSlider, 30) Case 50 To 69 GUICtrlSetData($hSlider, 50) Case 70 To 89 GUICtrlSetData($hSlider, 70) Case 90 To 99 GUICtrlSetData($hSlider, 90) Case Else GUICtrlSetData($hSlider, 100) EndSwitch $oldpos = GUICtrlRead($hSlider) EndIf EndIf Return $GUI_RUNDEFMSG EndFunc ;==>WM_H_Slider1 point