Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/30/2016 in all areas

  1. nend

    Regex toolkit

    This is a program that I made to help my self learn better regular expressions. There are a lot of other programs/website with the similar functions. The main advantage of this program is that you don't have to click a button after every changes. The program detected changes and react on it. Function: Match Match of arrays Match and replace Load source data from website Load source data from a website with GET/POST Load text data from file Clear fields Export and Import settings (you can finish the expression a other time, just export/import it) Cheat sheet DPI aware Generate AutoIt code example code The source code is not difficult and I think most user will understand it. In the zip file there is a export files (reg back example), you can drag and drop this files on the gui to import it. EDIT: Updated to version V1.2.0 Changes are: Expand and collapse of the cheat sheet (Thanks to Melba23 for the Guiextender UDF) Usefull regular expressions websites links included in the program Text data update time EDIT: Updated to version V1.3.0 Changes are: Automatic generate AutoIt code Icons on the tab Few minor bug fixes EDIT: Updated to version V1.4.0 Changes are: Link to AutoIt regex helpfile If the regular expression has a error than the text becomes red Option Offset with Match and array of Matches Option Count with Match and replace Some small minor bug fixed EDIT: Updated to version V1.4.1 Changes are: Small bug in "create AutoIt" code fixed EDIT: Updated to version V1.4.2 Changes are: Small bug in "create AutoIt" code fixed Bug with website data fixed EDIT: Updated to version V1.4.3 Changes are: DPI aware Click function on cheat sheet to insert function in the regex input field (Sourcode, example and compiled exe file) Regex toolkit.zip
    1 point
  2. This simple dllcall sets @error == 1 (cannot use dll file) I suspect bitness issue and hoping someone on x86 can try it. ;#AutoIt3Wrapper_UseX64=y $BUFFER = DllStructCreate("CHAR VAR[2048]") $PBUFFER = DllStructGetPtr($BUFFER) $SIZE = DllStructCreate("DWORD") $PSIZE = DllStructGetPtr($SIZE) $call = DllCall("C:\Windows\System32\Urlmon.dll", "LONG", "ObtainUserAgentString", "DWORD", 0, "STR*", $PBUFFER, "DWORD*", $PSIZE) ;ConsoleWrite(@error & @CRLF) MsgBox(0, @AutoItX64, @error) Compiled as either x86 or x64 @error is always 1. Win10 x64 EDIT: never mind I used ^ instead of * New screen res, and i'm blind.
    1 point
  3. Hello @argumentum Sorry I left that project. Saludos
    1 point
  4. Jos

    fun

    Please simply report the PM in case of issues so we can deal with it. Jos
    1 point
  5. FWIW, the first line of code should actually read: $oDiv = _FFXPath("//div[@id='mstr395']") Copy / paste.
    1 point
  6. What details do you need? If you want to list only .jpg can use StringInStr() to filter! #include <String.au3> #include <Array.au3> Global $listing, $timer $directory = FileSelectFolder("Browse for Folder.", "") $timer = TimerInit() list($directory, 0) time() Func list($path = "", $counter = 0) $counter = 0 $path &= '\' Local $list_files = '', $file, $demand_file = FileFindFirstFile($path & '*') If $demand_file = -1 Then Return '' While 1 $file = FileFindNextFile($demand_file) If @error Then ExitLoop If @extended Then If $counter >= 10 Then ContinueLoop list($path & $file, $counter + 1) Else If StringInStr($file, ".jpg") > 0 Then $listing &= $path & $file & "|" FileWriteLine(@ScriptDir & "\listing.ini", $path & $file); Use this to list full path ;FileWriteLine(@ScriptDir & "\listing.ini", $file); Use this to list only the name EndIf EndIf WEnd FileClose($demand_file) EndFunc ;==>list Func time() Local $total_time = TimerDiff($timer) Local $minutes = Int(Mod($total_time, 3600000) / 60000) Local $seconds = Int(Mod(Mod($total_time, 3600000), 60000) / 1000) Local $min_seg = StringFormat("%02d:%02d", $minutes, $seconds) MsgBox(4096, 'Total time', $min_seg) $listing = StringTrimRight($listing, 1) $listing = _StringExplode($listing, "|", 0) _ArraySort($listing) _ArrayDisplay($listing, "files found") EndFunc ;==>time
    1 point
  7. You just use the File WriteLine: #include <String.au3> #include <Array.au3> Global $listing, $timer $directory = FileSelectFolder("Browse for Folder.", "") $timer = TimerInit() list($directory, 0) time() Func list($path = "", $counter = 0) $counter = 0 $path &= '\' Local $list_files = '', $file, $demand_file = FileFindFirstFile($path & '*') If $demand_file = -1 Then Return '' While 1 $file = FileFindNextFile($demand_file) If @error Then ExitLoop If @extended Then If $counter >= 10 Then ContinueLoop list($path & $file, $counter + 1) Else $listing &= $path & $file & "|" FileWriteLine(@ScriptDir & "\listing.ini", $path & $file); Use this to list full path ;FileWriteLine(@ScriptDir & "\listing.ini", $file); Use this to list only the name EndIf WEnd FileClose($demand_file) EndFunc ;==>list Func time() Local $total_time = TimerDiff($timer) Local $minutes = Int(Mod($total_time, 3600000) / 60000) Local $seconds = Int(Mod(Mod($total_time, 3600000), 60000) / 1000) Local $min_seg = StringFormat("%02d:%02d", $minutes, $seconds) MsgBox(4096, 'Total time', $min_seg) $listing = StringTrimRight($listing, 1) $listing = _StringExplode($listing, "|", 0) _ArraySort($listing) _ArrayDisplay($listing, "files found") EndFunc ;==>time
    1 point
  8. Not sure how helpful we can be with the limited information, but you could try something like this: $oDiv = _FFXPath("//input[@id='mstr395']") _FFCmd("FFau3.xpath.onclick()")
    1 point
  9. Melba23

    ListView Help

    232showtime, This question has nothing to do with my GUIListViewEx UDF, so I have split it from the main UDF thread. Use the existing GUIListView UDF commands to read your ListView - like this: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include "GUIListViewEx.au3" #include <Array.au3> ; #include <GUIListView.au3> ; Already included with GUIListViewEx Global $idListview1, $sString, $hButton0, $iLV_Index, $cLVItem, $Gui_Column, $hGUI1, $sRead1, $sRead2, $sRead3, $sReadList Global $aNew_entry_search gui1() Func gui1() $hGUI1 = GUICreate("Gui 1", 800, 400, 200, 200) $hButton0 = GUICtrlCreateButton("Load", 100, 10, 80, 30) $hButton1 = GUICtrlCreateButton("Clear 1", 10, 10, 80, 30) $hButton2 = GUICtrlCreateButton("Add", 10, 60, 80, 30) $idListview1 = GUICtrlCreateListView("", 10, 100, 700, 200, BitOR(0x0200, 0x008), BitOR(0x00000020, 0x00000001)) _GUICtrlListView_AddColumn($idListview1, "1", 200, 2) _GUICtrlListView_AddColumn($idListview1, "2", 200, 2) _GUICtrlListView_AddColumn($idListview1, "3", 200, 2) _GUICtrlListView_Scroll($idListview1, 10, 100) ; Initiate ListView within UDF $iLV_Index = _GUIListViewEx_Init($idListview1, "") $cLVItem = GUICtrlCreateDummy() ; dummy control for listview LVN_ITEMACTIVATE dblclick on item $notify = GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $hButton1 MsgBox("", "MsgBox 1", "Clear???") _GUICtrlListView_DeleteAllItems($idListview1) Case $hButton2 ; Disable the first GUI GUISetState(@SW_DISABLE, $hGUI1) gui2() ; Re-enable the first GUI GUISetState(@SW_ENABLE, $hGUI1) Case $hButton0 _GUIListViewEx_LoadListView($iLV_Index, "Save.lvs") ; Reset column alignment _GUICtrlListView_JustifyColumn($idListview1, 0, 2) _GUICtrlListView_JustifyColumn($idListview1, 1, 2) _GUICtrlListView_JustifyColumn($idListview1, 2, 2) _WinAPI_RedrawWindow(GUICtrlGetHandle($idListview1)) Case $cLVItem ;listview dummy control ;retrieve selected listview index from dummy with GUICtrlRead() _column_gui(GUICtrlRead($cLVItem)) EndSwitch WEnd EndFunc ;==>gui1 Func gui2() $hGUI2 = GUICreate("Gui 2", 200, 200, 350, 350) GUICtrlCreateLabel("COL1", 15, 55, 50, 50) $sString1 = GUICtrlCreateEdit("", 50, 50, 120, 25, $ES_WANTRETURN) GUICtrlCreateLabel("COL2", 15, 110, 50, 50) $sString2 = GUICtrlCreateEdit("", 50, 100, 120, 25, $ES_WANTRETURN) GUICtrlCreateLabel("COL3", 15, 165, 50, 50) $sString3 = GUICtrlCreateEdit("", 50, 160, 120, 25, $ES_WANTRETURN) $hButton3 = GUICtrlCreateButton("Save", 10, 10, 80, 30) GUISetState() While 1 ; We can only get messages from the second GUI Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $hButton3 $sRead1 = GUICtrlRead($sString1) $sRead2 = GUICtrlRead($sString2) $sRead3 = GUICtrlRead($sString3) _GUIListViewEx_Insert($sRead1 & "|" & $sRead2 & "|" & $sRead3) ; Add item to ListView uaing UDF ;~ _GUIListViewEx_Insert($sRead2 & "||") ; Add item to ListView uaing UDF _GUIListViewEx_SaveListView($iLV_Index, "Save.lvs") GUICtrlSetState($hButton0, $GUI_ENABLE) ExitLoop EndSwitch WEnd GUIDelete($hGUI2) EndFunc ;==>gui2 ;-------------DOUBLE CLICK Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView $hWndListView = $idListview1 If Not IsHWnd($idListview1) Then $hWndListView = GUICtrlGetHandle($idListview1) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) ;DllStructCreate(AutoItCommand, Pointer) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $LVN_ITEMACTIVATE ;dblclick on item (NM_DBLCLK includes blank space in listview) ;Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam) Local $iIndex = DllStructGetData($tInfo, "Index") ;~ Local $aInfo[5] = [$hWndFrom, $iIDFrom, $iCode, DllStructGetData($tInfo, "Index"), _ ;~ DllStructGetData($tInfo, "SubItem")] If $iIndex <> -1 Then ;check index: -1 indicates click was not on an item GUICtrlSendToDummy($cLVItem, $iIndex) ;MsgBox($MB_SYSTEMMODAL, "listview item", GUICtrlRead(GUICtrlRead($idListview1)), 2) ;~ ToolTip("You Double Clicked on" & @CRLF & "3---Column: " & $aInfo[3] & @CRLF & "4---Row: " & $aInfo[4]) EndIf EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY ;------------------------_column_gui-------------- Func _column_gui($cLVItem) If IsHWnd($Gui_Column) Then GUIDelete($Gui_Column) GUISetState(@SW_SHOW, $Gui_Column) $Gui_Column = GUICreate("Edit Window", 500, 300, -1, -1, -1, -1, $hGUI1) $aReadList = _GUICtrlListView_GetItemTextArray($idListview1, $cLVItem) ; Use this command to read the ListView line <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $Column1_display = GUICtrlCreateInput($aReadList[1], 100, 20, 50, -1, 0X0800) GUICtrlCreateLabel("Column 1:", 20, 24) $Column2_display = GUICtrlCreateInput($aReadList[2], 100, 45, 50, -1, 0X0800) GUICtrlCreateLabel("Column 2:", 20, 49) $Column3_display = GUICtrlCreateEdit($aReadList[3], 100, 70, 50, -1, 0X0800) GUICtrlCreateLabel("Column 3", 20, 75) $edit_button = GUICtrlCreateButton("Edit", 100, 95) GUISetState(@SW_SHOW, $Gui_Column) MsgBox(0, "", "Success") GUISetState() While 1 ; We can only get messages from the second GUI Switch GUIGetMsg() Case $GUI_EVENT_CLOSE If IsHWnd($Gui_Column) Then GUIDelete($Gui_Column) ExitLoop Case $edit_button ;_GUIListViewEx_SetEditStatus($Column1_display, 1) ; Why are you trying to use the UDF to edit an input control? <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< EndSwitch WEnd EndFunc ;==>_column_gui I have increased the size of your GUI and controls - I was fed up of scrabbling around trying to see what was happening. And I have added a few comments. M23
    1 point
  10. spudw2k

    Add Files to treeview

    That looks familiar. Glad you found some use of it...but I second Melba's recommendation. His UDF is a much more mature and robust solution than crafting it your/myself. It was a fun learning exercise at best.
    1 point
  11. I shorten you code a little bit and added _WinAPI_DeleteObject($Lf_HbitmapHdl) to release the GDI resource. #include <GDIPlus.au3> #include <GDIPlusConstants.au3> #include <GUIConstants.au3> #include <Memory.au3> #include <MemoryConstants.au3> Opt("MustDeclareVars", 1) Opt("GUIOnEventMode", 1) ; AutoItSetOption("WinTitleMatchMode", 1) AutoItSetOption("MouseCoordMode", 0) AutoItSetOption("GUICloseOnESC", 0 ) Global $ghGDIPDll = $__g_hGDIPDll Global $MyGUI = GUICreate("MyGUI",289,280,-1,-1,BitOr($WS_CAPTION,$WS_SYSMENU,$WS_MINIMIZEBOX,$WS_VISIBLE),BitOr($WS_EX_ACCEPTFILES,$WS_EX_APPWINDOW)) GUISetOnEvent($GUI_EVENT_CLOSE, "Close", $MyGUI) Global $Gc_OpenPicID1 = GUICtrlCreatePic("",102,20,85,30,-1,-1) Global $Gc_OpenPicID2 = GUICtrlCreatePic("",102,54,85,30,-1,-1) Global $Gc_OpenPicID3 = GUICtrlCreatePic("",102,88,85,30,-1,-1) Global $Gc_OpenPicID4 = GUICtrlCreatePic("",102,120,85,30,-1,-1) Global $Gc_OpenPicID5 = GUICtrlCreatePic("",102,154,85,30,-1,-1) Global $Gc_OpenPicID6 = GUICtrlCreatePic("",102,184,85,30,-1,-1) Global $G_BinOpenPic = _My_LoadOpenBtnPicBin() _GDIPlus_Startup() _Mod_Set_Control_From_Binary( $Gc_OpenPicID1, $G_BinOpenPic ) _Mod_Set_Control_From_Binary( $Gc_OpenPicID2, $G_BinOpenPic ) _Mod_Set_Control_From_Binary( $Gc_OpenPicID3, $G_BinOpenPic ) _Mod_Set_Control_From_Binary( $Gc_OpenPicID4, $G_BinOpenPic ) _Mod_Set_Control_From_Binary( $Gc_OpenPicID5, $G_BinOpenPic ) _Mod_Set_Control_From_Binary( $Gc_OpenPicID6, $G_BinOpenPic ) _GDIPlus_Shutdown() While True Sleep(1000) ; Sleep for a second WEnd Func Close() GUIDelete($MyGUI) Exit EndFunc Func _Mod_Set_Control_From_Binary( $arg_ControlID, $arg_BinaryImage ) Local $Lf_ControlHdl = GUICtrlGetHandle( $arg_ControlID ) Local $Lf_HbitmapHdl = _GDIPlus_BitmapCreateFromMemory( $arg_BinaryImage, True ) _GUICtrlStatic_SetImage($arg_ControlID, $Lf_HBitmapHdl) _WinAPI_DeleteObject($Lf_HbitmapHdl) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name...........: _GUICtrlStatic_SetImage ; Description ...: Sets a HBITMAP to a static control like image or label ; Syntax.........: _GUICtrlStatic_SetImage($iCtrlId, $hBitmap) ; Parameters ....: $iCtrlId - CtrlId or handle of Control in the current process ; $hBitmap - Pointer top Windows HBITMAP ; Return values .: Success - 1 ; Failure - 0 and set @error: ; |1 - invalid $pSource ; |1 - invalid $pSource ; Author ........: ProgAndy, Zedna ; Modified.......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: ; =============================================================================================================================== Func _GUICtrlStatic_SetImage($iCtrlId, $hBitmap) Local Const $STM_SETIMAGE = 0x0172 Local Const $IMAGE_BITMAP = 0 Local Const $SS_BITMAP = 0xE Local Const $GWL_STYLE = -16 If IsHWnd($iCtrlId) Then If WinGetProcess($iCtrlId) <> @AutoItPID Then Return SetError(1,0,0) Else $iCtrlId = GUICtrlGetHandle($iCtrlId) If Not $iCtrlId Then Return SetError(2,0,0) EndIf ; set SS_BITMAP style to control Local $oldStyle = DllCall("user32.dll", "long", "GetWindowLong", "hwnd", $iCtrlId, "int", $GWL_STYLE) If @error Then Return SetError(3, 0, 0) DllCall("user32.dll", "long", "SetWindowLong", "hwnd", $iCtrlId, "int", $GWL_STYLE, "long", BitOR($oldStyle[0], $SS_BITMAP)) If @error Then Return SetError(4, 0, 0) Local $oldBmp = DllCall("user32.dll", "handle", "SendMessageW", "hwnd", $iCtrlId, "int", $STM_SETIMAGE, "wparam", $IMAGE_BITMAP, "handle", $hBitmap) If @error Then Return SetError(5, 0, 0) If $oldBmp[0] Then _WinAPI_DeleteObject($oldBmp[0]) Return 1 EndFunc ; ; = = = = = = = = = = = = = = = = = = = ; Func _My_LoadOpenBtnPicBin () ; Code Generated by BinaryToAu3Kompressor. Local $sFileBin = '/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAAeAGQDAREAAhEBAxEB/8QAHgAAAQQCAwEAAAAAAAAAAAAABwAFBggJCgIDBAv/xABBEAAABgEBAwYKCAQHAAAAA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bXK0g+Dp8nvpMuEJkVOuWLLt6rM6lYq9MZFeJOY6Kk26R0WrlCuNihDi4bJqKAgvzBVCCqqO8RVU4kx1JPnuoOXKihBMU/JBwpocZCmIVQG6QEQKcCnOHGCYG0ObUf3h1X46CiIkSmYMEEFSpnRBybiXeCiqoRVREz1wZV2ZEyiaZxSMsKeqaehf3CaZ5yEIkQiaZCppplKRNMhQIQhCABSkIUoAUpSlAClKUAAAAAAAANsLZW2//Z' $sFileBin = Binary ( _Base64Decode ( $sFileBin ) ) Return $sFileBin EndFunc ;==> _My_LoadOpenBtnPicBin Func _Base64Decode($input_string) ; by trancexx Local $struct = DllStructCreate('int') Local $a_Call = DllCall('Crypt32.dll', 'int', 'CryptStringToBinary', 'str', $input_string, 'int', 0, 'int', 1, 'ptr', 0, 'ptr', DllStructGetPtr($struct, 1), 'ptr', 0, 'ptr', 0) If @error Or Not $a_Call[0] Then Return SetError(1, 0, '') Local $a = DllStructCreate('byte[' & DllStructGetData($struct, 1) & ']') $a_Call = DllCall('Crypt32.dll', 'int', 'CryptStringToBinary', 'str', $input_string, 'int', 0, 'int', 1, 'ptr', DllStructGetPtr($a), 'ptr', DllStructGetPtr($struct, 1), 'ptr', 0, 'ptr', 0) If @error Or Not $a_Call[0] Then Return SetError(2, 0, '') Return DllStructGetData($a, 1) EndFunc ;==>_Base64Decode Without seeing your full code I cannot say what's wrong with it (at least the GUI initializing part).
    1 point
  12. Any AutoIt Forum member can be a contributor to AutoIt WikiPage https://www.autoitscript.com/wiki/Main_Page Currently thanks to @water there was added new page: https://www.autoitscript.com/wiki/ListView After that I added some links. There is many other page, and many things that can be do. If you want to get involved, the road is open. If you do not know how. Just please write here. Regards, mLipok
    1 point
  13. Sontec, Welcome to the Autoit forum. You can easily sort a ListView using _GUICtrlListView_SimpleSort - but you need to take care how you do it. Here is a short example: #include <GUIConstantsEx.au3> #include <GuiListView.au3> Global $fSortDescending = False Global $aNames[10] = ["Fred","Tom", "Dick", "Harry", "Peter", "Paul", "Mary", "Alice", "Bob", "Eve"] $hGUI = GUICreate("Test", 500, 500) $hListView = GUICtrlCreateListView("Names", 10, 10, 300, 300) For $i = 0 To 9 GUICtrlCreateListViewItem($aNames[$i], $hListView) Next $hButton = GUICtrlCreateButton("Sort", 10, 400, 80, 30) $hLabel = GUICtrlCreateLabel("", 100, 405, 200, 20) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton ; Sort column 0 _GUICtrlListView_SimpleSort($hListView, $fSortDescending, 0) Switch $fSortDescending Case True GUICtrlSetData($hLabel, "Sorted Descending") Case Else GUICtrlSetData($hLabel, "Sorted Ascending") EndSwitch EndSwitch WEndThe trick is the $fSortDescending variable so that the function knows which way to sort each time. M23
    1 point
×
×
  • Create New...