Leaderboard
Popular Content
Showing content with the highest reputation on 11/28/2013 in all areas
-
Implementing Windows Explorer right pane
pixelsearch and one other reacted to LarsJ for a topic
Note that this is a real Windows Explorer. But only the right pane. All functionality of Windows Explorer is working. E.g. keyboard shortcuts, the context (right click) menu, cut, copy, paste, drag & drop and automatic update of the window. Implementations There are three implementations: An implementation for Vista, 7 and 8, an implementation for Windows XP, and a SysListView32 based implementation for Vista, 7 and 8. The latter is named SysLv32.au3 in the examples. This is more or less the Windows XP implementation adapted for Vista, 7 and 8. Functionality The implementations are based on Shell interfaces. This means that most functionality of Windows Explorer is working automatically without any additional code. Other features: Position Explorer window in GUISpecify root and start foldersSpecify an initial icon view modeSpecify an icon view mode for the DesktopSpecify a file filter to filter files by extensionUse folder flags $FWF_NOBACKBROWSING, $FWF_SINGLESEL and $FWF_NOSUBFOLDERSBrowse to child/parent folder with Enter/Backspace keysDelete, disable and insert items in the context menuExecute context menu commands in codeDocumentation Use ExplorerWindowCreate() to create the right pane window. This function is located in Explorer\<Implementation>\WindowsExplorer.au3. You find documentation for the function in top of the file. Documentation for the Vista, 7, 8 implementation is included in the Examples section below. Ini file To handle Rename, New and View in the context menu, it's necessary to be able to identify these items. This seems only to be possible to do, by identifying the names. Because the names are localized, an ini file is used to store the names. Especially the View command depends on the ini file. If the View command isn't recognized, the icon view modes are not set properly. Rename and New commands are depending on the ini file, when the commands are selected with the keyboard. More information in the sections below. First release 2013-11-28 In first release Explorer right pane windows are created with enough functionality to get it to work. There are two implementations: One for Vista, 7 and 8, and one for Windows XP. First update 2014-03-14 This update consists primarily of bug fixes in first release. Because both APIConstants.au3 and WinAPIEx.au3 are included, the scripts can't run on AutoIt 3.3.10 without modifications. A new implementation for Vista, 7 and 8 is added. This implementation is based on a SysListView32 control. This is more or less the Windows XP implementation adapted for Vista, 7 and 8. Second update 2014-04-23 The implementations are based on Shell interfaces, and most functionality of Windows Explorer is working automatically. But you still have to integrate that functionality into your script. Especially you have to take care of keystrokes in combination with various controls and windows. E.g. the rename edit box, the context menu and dialog boxes. This update introduces an ini file: Explorer\Inifiles\ContextMenu.ini Third update 2014-05-02 The third update is mostly about the context menu. It's divided into two parts. The first part is about manipulating the context menu. The example shows how to delete, disable and add custom menu items. The second part shows how to execute context menu commands in code. The example implements Cut, Copy and Paste buttons. The spoiler section starts with an explanation of the message flow and message handlers. Final release 2014-05-10 Left, top, width and height parameters are added to the ExplorerWindowCreate() function. This makes it easier to position the Explorer window in the GUI. When the GUI is resized, the Explorer window is resized so that margins are retained. The margins can be used for buttons or other controls. The new parameters are implemented in the examples. Redundant code is moved from example files to common files. Some minor bug fixes. This is the final release of the small examples. It should not be too difficult to reuse the examples and code. I'm currently working on a large example where an address bar, a toolbar, a left pane and a status bar is implemented besides the right pane. This is a much bigger example, and it'll be more difficult to reuse the code. I'll probably add this example to a new thread. Final release, Vista update 2014-06-21 The Vista, 7, 8 example in first release dated 2013-11-28 was based on Vista code. The XP example was based on XP code. But most of the additional code in the next updates was XP code (see post 40). This meant that some functionality wasn't implemented completely under Vista and later. E.g. icon view modes. Examples The zip contains seven folders at the top level: 1. Basic example2. Position and size3. Navigation buttons4. Toolbar example5. Context menu6. Cut-copy-pasteExplorerThe first six folders are examples. The Explorer folder contains common files and includes. Resources specific for a particular example are contained in the example folder. There are three scripts for each example: Vista, 7, 8.au3, SysLv32.au3 and Windows XP.au3. Other examples (Vista and later) in posts below: Three examples where all panes are implemented (not just the right pane)You can find an example which implements the other panes in this post.This example shows how to merge all include files into a single Include folder.Implement proper tab order between LV and TV, and update LV on up/down keys in TV here.An example that shows how to cancel drag/drop operations can be found here. AutoIt 3.3.8 If you want to run the scripts on AutoIt 3.3.8 you need APIConstants.au3 and WinAPIEx.au3 by Yashied. The UDFs are not included in the zip. You must enable the UDFs in top of ShellFunctions.au3. The UDFs are already added, but commented out. And you must comment out the 3.3.10 UDFs in ShellFunctions.au3 and WERPFuncs.au3. Testet on XP 32 bit and Win 7 32/64 bit. The scripts can be run as both 32 and 64 bit programs. If you are running a 64 bit Windows you should run the scripts as 64 bit programs. Windows Explorer right pane.7z2 points -
File Name: AutoIt v3.3.9.23 Beta File Submitter: Jon File Submitted: 28 Nov 2013 File Category: Beta 3.3.9.23 (28th November, 2013) (Beta) AutoIt: - Fixed #2518: Static keyword not working correctly. - Fixed #2541: Accessing object methods or properties on a non-object when error handler is installed. - Fixed: StringStripCR() and StringAddCR() not working with strings that contain nulls. UDFs: - Changed: $INTERNET_FLAG_NO_CACHE_WRITE default value for _FTP_ListToArray*(). - Added #2540: _ArrayDisplay() can copy Header and Row. - Added: _GDIPlusTextureCreateIA(). - Fixed #2539: _ArrayUnique() doc precision. - Fixed #2521: Removed _IEFormElementSetValue[5].au3 example. - Fixed: _SQLite_...() running in X64 Mode. - Fixed: _SQLite_Startup() parameter checking and doc. AutoIt3Help: - Changed: Version number to 1.0.0.5. - Fixed #2519: Wrong page opening if launch without parameter. Click here to download this file2 points
-
Absolutely perfect1 point
-
Switch $ii Case 1, 7 .. 79 ; Statements Case Else ; Statements EndSwitch1 point
-
fikri1979, The 2 dialogs return the selected file name - so store it in a variable and use GUICtrlSetData to put it into the input. Try and code it yourself and see how you get on - come back if you run into difficulties. M231 point
-
AutoIt v3.3.9.22 Beta
DatMCEyeBall reacted to trancexx for a topic
You did good. Being anal is sometimes gay so don't change a thing more.1 point -
fikri1979, Look at FileOpenDialog and FileSaveDialog in the Help file. But note that @WorkingDir is changed after each use of these functions, so you might need to change it back using FileChangeDir. M231 point
-
Put the _IEBodyReadText inside the While loop, it's only going to read it once and never update the way you have it now.1 point
-
and use WinWaitActive("[CLASS:Notepad]") Otherwise, non English systems will wait forever In German locale e.g., the title is "Unbenannt - Editor" This code runs perfectly on my German machine Run("notepad") WinActivate("[CLASS:Notepad]") WinWaitActive("[CLASS:Notepad]") SendKeepActive("[CLASS:Notepad]") Send("This is some text.")1 point
-
I am also on Win 7 64 bit. I think you are using "sendkeepactive" by accident. Try "send" as in the help file to actually send the text. Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("This is some text.") The sendkeepactive function is just to keep the window open during send ... not to send text.1 point
-
Either change WinActive to WinWaitActive (so the script waits until the window is active) or check the window title of Notepad - maybe the title has changed with Windows 7.1 point
-
Oops, sorry about the mistakes: I actually switched ">5" and ">6" everywhere. But at least you get the idea. Please try this fix and report if it doesn't work for some case: Local $sStringA = "WT0F525M23112013001XX12345YYY5555555555" Local $sStringN = "1234567WT0F525M231120130A01" Func _Pack128($sPlainCode) Local $sC128BC = ":" $sC128BC &= StringRegExpReplace($sPlainCode, "((?:\d\d){3,})", ">5\1>6") $sC128BC = StringRegExpReplace($sC128BC, "^:>5", ";") $sC128BC = StringRegExpReplace($sC128BC, ">6$", "") Return($sC128BC) EndFunc ConsoleWrite(_Pack128($sStringA) & @LF) ConsoleWrite(_Pack128($sStringN) & @LF) I'm afraid I don't have a simpler way to clean up the result.1 point
-
Take webcam screenshot
MadaraUchiha reacted to Chimaera for a topic
I get the same with testing, i dont need capture just view on screen so im sure it works1 point -
Hi, Here is a TreeView GUI with some functionalities (search, export to clipboard, change state of the tree...). Personally I use it to display some datas from the registry. Tested with : AutoIt 3.3.0.0, WinXP SP3 32 Bits, single monitor, 'Windows classic' (as Windows 95/98/2000) desktop theme I would be grateful if someone would be willing to test it in different environments than mine to see how it behaves. Things that could make the script not to work properly : * using an AutoIt script engine > 3.3.0.0 (However, I tried to make my script compatible with newer AutoIt versions) * running on another OS than WinXP * running on a 64 Bits OS (DllStruct or DllCall possible issues with 64 bits pointers/handles) * GUI problems with desktop themes (I only use the 'Windows classic' theme) * multiple monitors (for windows positionning, treeview items hit_test and rectangle) * things I did not think of... * and bugs of course... Known bugs : * memory usage increase by a few hundreds Kbytes everytime the treeview is reloaded (some memory leak...), as a workaround, after a hundred treeview reload, the program will restart itself to release the lost memory * small memory leak (~8 kb) on each tree reload * using a theme for the blinds with large fonts makes the bottom of the main GUI to disappear The code is free to reuse/improve/adapt as you want. (This script, as I release it, does not write anything to the registry or the file system) Thanks for any testing or advice. Updated, 02 April 2013 : TreeViewGUI.zip : MD5 : DF0802EE21D458AA00DA839B235370BB SHA-1 : 3FF545F440E728B86D1688C56CF7FB3060DEB4EA SHA-256 : 0D24C6D24808BE34EB8BC2A92218D6EB7B8209DF1B0AED6CB78943633814E320 TreeViewGUI.zip screenshots :1 point
-
Below is the easy way with _ispressed. Notice that you still get a context menu when hitting the right mouse button. If you used a low level mouse hook you could avoid the context menu showing up. But that's for another day Just so you aren't wondering what consolewrite is. When you run a script in scite(press f5) you can have text write to the console (at bottom) for debugging purposes. Good luck and welcome to the forum. Picea #include <Misc.au3> $dll = DllOpen("user32.dll") global $autohammer = 0 Func hammer_toggle() If $autohammer = 0 Then ; Send("+{w down}") Sleep(100) $autohammer = 1 ConsoleWrite("on") Else ; Send("+{w Up}") Sleep(100) $autohammer = 0 ConsoleWrite("off") EndIf EndFunc ; Idle While 1 if _IsPressed("02", $dll) and _IsPressed("10", $dll) Then hammer_toggle();right mouse and shift Sleep(10) Wend1 point