Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/17/2020 in all areas

  1. Strange how i ask here and answer to myself . Well... "I like to talk with a smart person!" ©
    3 points
  2. Ok, i think i got it to work (again, obviously it was easier then i thought). When the window initialized, we send expand message (as PIDL), and then we just send another message to select the item, and then once we have target item selected, we can set checked state for that item. #include <WindowsConstants.au3> #include <WinAPIDlg.au3> #include <GUITreeView.au3> Global $sChecked $sInitDir = @ProgramFilesDir $sRoot = _WinAPI_PathStripToRoot($sInitDir) $hBrowseProc = DllCallbackRegister('_BrowseProc', 'int', 'hwnd;uint;lparam;ptr') $pBrowseProc = DllCallbackGetPtr($hBrowseProc) $sChecked = $sInitDir & '|' & @UserProfileDir & '|' & @DesktopDir $pText = _WinAPI_CreateString($sInitDir) $sPath = _WinAPI_BrowseForFolderDlg($sRoot, 'Select a folder from the list below.', BitOR($BIF_RETURNONLYFSDIRS, $BIF_UAHINT, $BIF_BROWSEINCLUDEFILES, $BIF_VALIDATE, $BIF_NEWDIALOGSTYLE, $BIF_NONEWFOLDERBUTTON), $pBrowseProc, $pText) _WinAPI_FreeMemory($pText) If $sPath Then ConsoleWrite($sChecked & @CRLF) ;ConsoleWrite('--------------------------------------------------' & @CRLF) ;ConsoleWrite($sPath & @CRLF) EndIf DllCallbackFree($hBrowseProc) Func _BrowseProc($hWnd, $iMsg, $wParam, $lParam) Local $sPath, $aSplit, $pIDL Local Static $sPrev_Path, $hPrev_Item Local Static $hTV = ControlGetHandle($hWnd, '', 'SysTreeView321') Switch $iMsg Case $BFFM_INITIALIZED ;Set checkboxes _WinAPI_SetWindowLong($hTV, $GWL_STYLE, BitOR(_WinAPI_GetWindowLong($hTV, $GWL_STYLE), $TVS_CHECKBOXES)) ;Set title _WinAPI_SetWindowText($hWnd, 'MyTitle') ;Split the pre-checked list and set checkboxes by PIDL $aSplit = StringSplit($sChecked, '|') ;$sChecked = '' For $i = 1 To $aSplit[0] $pIDL = _WinAPI_ShellILCreateFromPath($aSplit[$i]) _SendMessage($hWnd, $BFFM_SETEXPANDED, 0, $pIDL) _SendMessage($hWnd, $BFFM_SETSELECTIONW, 0, $pIDL) _WinAPI_CoTaskMemFree($pIDL) _GUICtrlTreeView_SetChecked($hTV, _GUICtrlTreeView_GetSelection($hTV)) ;_GUICtrlTreeView_Expand($hTV, _GUICtrlTreeView_GetSelection($hTV), False) Next ;Set default selection _SendMessage($hWnd, $BFFM_SETSELECTIONW, 1, $lParam) Case $BFFM_SELCHANGED If $hPrev_Item Then _StringUpdate($sChecked, $sPrev_Path, _GUICtrlTreeView_GetChecked($hTV, $hPrev_Item)) EndIf $hPrev_Item = _GUICtrlTreeView_GetSelection($hTV) $sPath = _WinAPI_ShellGetPathFromIDList($wParam) If Not @error Then $sPrev_Path = $sPath EndIf EndSwitch Return 0 EndFunc Func _StringUpdate(ByRef $sString, $sValue, $bAdd, $bUnique = True, $sDelim = Default) If $sDelim == Default Then $sDelim = Opt('GUIDataSeparatorChar') EndIf If $bAdd Then If Not $bUnique Or ($bUnique And Not StringInStr($sDelim & $sString & $sDelim, $sDelim & $sValue & $sDelim, 2)) Then $sString &= ($sString ? $sDelim : '') & $sValue EndIf Return EndIf ;Remove If StringInStr($sDelim & $sString & $sDelim, $sDelim & $sValue & $sDelim, 2) Then Local $aString = StringSplit($sString, $sDelim) $sString = '' For $i = 1 To $aString[0] If $aString[$i] <> $sValue Then $sString &= ($sString ? $sDelim : '') & $aString[$i] EndIf Next EndIf EndFunc The "Magic" constant (BFFM_SETEXPANDED) i found here.
    2 points
  3. I needed a function to automate programs at work that can't be fully automated via Autoits built in functions. For example a virtual machine running on your physical machine, meaning you would need to run an extra script within the virtual machine (if it is even running Windows) in order to automate everything. I came across OpenCV which allows matching/finding a picture in another picture. This would also allow searching for a button/text on the screen in order to press the exact position. Fortunately @mylise already translated all the required OpenCV functions to Autoit, I just had to remove all unnecessary functions to make the script as small as possible. The problem: Using this method, you will never be able to fully automate everything dynamically, as it will only work on the machine with same resolution/dpi settings, same theme etc.. This is only a last resort for programs that can't be automated using the built in Autoit functions. Features: Find a given picture on the entire screen (all monitors) or a certain area on the screen and execute mouse clicks on this position. Adjust the threshold so that the picture doesn't have to match 100%. Debugging options like logging and marking the screen where the picture was found etc. Includes a Snapshot-Tool that creates snapshots of a certain area(buttons, text etc.) on the screen and generates the code that is required for the matching. It can also be used to get the coordinates to a marked area on the screen in order to check only on a certain area for the match picture. Example: Note: The example will probably not work on your computer, depending on the display resolution and dpi settings, as the picture has to match the exact same size on the screen. Please use the included Snapshot-Tool to generate new match pictures and code very easily. #AutoIt3Wrapper_UseX64=n ; In order for the x86 DLLs to work #include "OpenCV-Match_UDF.au3" _OpenCV_Startup();loads opencv DLLs _OpenCV_EnableLogging(True,True,True) ;Logs matches, errors in a log file and autoit console output. ;Please note that these examples might not work as the match pictures have to be found with the exact same size on your screen. ;Example 1 ShellExecute("http://www.tv.com/");Open Website tv.com $Match1 = _MatchPicture(@ScriptDir&"\Match\1.png", 0.70,False,10,500);Try to find the match picture on the screen. Number of tries: 10, Sleep between each try: 500ms. If Not @error Then _MarkMatch($Match1) ;Debugging: Draws a rect on the screen/coordinates of the match to show the user where the match was found Sleep(100) _ClickMouse($Match1, "left",1) ;Calculates the center of the match and clicks the left mouse once on click position EndIf Sleep(1000) ;Example 2, matching on a specific area of the screen ShellExecute("notepad.exe");open nodepad WinWait("[CLASS:Notepad]","",5) WinMove("[CLASS:Notepad]","",0,0,500,500) Local $sCoords[4] = [0, 0, 500,500] $Match2 = _MatchPicture(@ScriptDir&"\Match\2.png", 0.80,$sCoords,3,500) If Not @error Then _MarkMatch($Match2) Sleep(100) _ClickMouse($Match2, "left", 1) EndIf _OpenCV_Shutdown();Closes DLLs So basically, all you need to do is provide a path to the match picture and the function will return you the coordinates (x1,y1,x2,y2) of where the picture has been found on the screen. With these, you can either calculate an exact position for the mouse click or use the "_ClickMouse" function which will execute a mouse click on the center of the coordinates where the picture was found. Credits: @mylise for the OpenCV UDF Download: Includes the required .DLL files of OpenCV. You can also manually download them on the website of OpenCV (Version 3.x doesn't include these anymore, you need to download 2.x). OpenCV_Match.zip
    1 point
  4. Trong

    Image Search UDF

    Version 2021.8.30.2

    10,235 downloads

    Use MouseClick() need: #RequireAdmin Dll is already integrated in UDF ! ; #INDEX# =============================================================== ; Title .........: ImageSearch ; AutoIt Version : 3.x ; Language ......: English ; Description ...: Check image Appears or Not and Return the position of an image on the desktop ; Author(s) .....: Dao Van Trong - TRONG.LIVE ; ======================================================================= ; #CURRENT# ============================================================= ; _ImageSearch ; _ImageSearch_Area ; _ImageSearch_Wait ; _ImageSearch_WaitArea ; ======================================================================== ;========================================================================= ; ; Author:...........: AutoIT VietNam : Dao Van Trong - TRONG.LIVE ; Description:......: Check image Appears or Not ; Find and return the position of an image on the desktop ; Syntax:........... _ImageSearch_Area, _ImageSearch ; Parameter(s):..... $_ImagePath: The image to locate on the desktop ; May be a list of image by delimited by "|" ; i.e: $_ImagePath = "image1.bmp|image2.bmp|image3.bmp" ; $P_x1 $P_y1: Position of 1st point ; $P_x2 $P_y2: Position of 2nd point - Default is last botton right of desktop ; $_Tolerance: 0 for no tolerance (0-255). Needed when colors of image differ from desktop. e.g GIF ; $_CenterPos: boolen. True will return $array[1] x $array[2] is center of image found. ; False will return top-left position ; Return Value(s):.. Return an array has 3 item ; On Success: $array[0] 1 ; On Failure: $array[0] 0 ; DLL not found or other error: $array[0] -1 ; $array[1] x $array[2]: position of image what found on desktop ; ; Note:............. Use _ImageSearch to search the entire desktop ; _ImageSearch_Area to specify a desktop region to search ; $_ImagePath with more item need more time appear on screen before function can detect. ; Decrease sleep time in the loop to detect faster. But less performance. I.e CPULoad increased ; ;======================================================================== EG 1: ;~ Opt("MustDeclareVars", 1) ;~ #AutoIt3Wrapper_UseX64=y ;~ #AutoIt3Wrapper_Change2CUI=y #RequireAdmin #include "_ImageSearch_UDF.au3" HotKeySet("{Esc}", "_Exit") ; Press ESC for exit Func _Exit() Exit 0 EndFunc ;==>_Exit Global Const $Ask_On_Found = 0 Global Const $Mouse_Move_On_Found = 1 Global Const $Mouse_Click_On_Found = 0 Global Const $iSleep_Time=500 Global $sCount = 0, $_Image_1 = @ScriptDir & "\example.bmp" ; First, use this function to create a file bmp, maybe a desktop icon for example') MsgBox(64 + 262144, 'ImageSearch', 'At first, create a file bmp,' & @CRLF & 'photos that will search on the screen!') _ImageSearch_Create_BMP($_Image_1) ConsoleWrite("! Search for images: " & $_Image_1 & @CRLF & '! Searching on the screen ...' & @CRLF) While 1 ToolTip('(Press ESC for EXIT) Searching ...', 1, 1) Sleep($iSleep_Time) $sCount += 1 Local $return = _ImageSearch($_Image_1) If $return[0] = 1 Then ConsoleWrite('- [' & $sCount & '] Image found:' & " X=" & $return[1] & " Y=" & $return[2] & @CRLF) If $Mouse_Move_On_Found Then MouseMove($return[1], $return[2]) Sleep($iSleep_Time) EndIf If $Mouse_Click_On_Found Then MouseClick("left", $return[1], $return[2]) ToolTip('(Press ESC for EXIT) - [' & $sCount & "] Image found:" & " X=" & $return[1] & " Y=" & $return[2], 1, 1) If $Ask_On_Found Then Local $ask = MsgBox(6 + 262144, 'Success [' & $sCount & ']', 'Image found:' & " X=" & $return[1] & " Y=" & $return[2]) If $ask = 2 Or $ask = 3 Or $ask = 5 Or $ask = 7 Then Exit ;No, Abort, Cancel, and Ignore If $ask = 10 Then _ImageSearch_Create_BMP($_Image_1) ; Continue ;Try Again EndIf EndIf Sleep(200) WEnd Video demo: [+] When any problem or error occurs, please make sure that:- Downloaded and used the latest version.- Set screen Screen Scale and layout = 100%- Installed display driver.- Tried turning off the antivirus- Full installation: Microsoft Visual C++ Redistributable 2005->2022 [+] You can download the AIO version of the Visual C++ Redistributable here: -> https://www.mediafire.com/file/0ak8dcj9mdn7nyq/VisualCppRedist_AIO_2005-2022_x86_x64_%5Btrong.live%5D.zip/file -> FOR Windows XP: https://www.mediafire.com/file/5m5lnr1kfg73tc9/VisualCppRedist_AIO_2005-2019_x86_XP_%5Btrong.live%5D.zip/file <!> Password for Extract: trong.live [+] The last full version of SCITE4AutoIT supports windows XP: https://www.autoitscript.com/autoit3/scite/download/archive/v19.1127.1402.0-SciTE4AutoIt3.exe
    1 point
  5. WinHttp.au3: #include-once Global Const $HTTP_STATUS_OK = 200 Func HttpPost($sURL, $sData = "") Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") $oHTTP.Open("POST", $sURL, False) If (@error) Then Return SetError(1, 0, 0) $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded") $oHTTP.Send($sData) If (@error) Then Return SetError(2, 0, 0) If ($oHTTP.Status <> $HTTP_STATUS_OK) Then Return SetError(3, 0, 0) Return SetError(0, 0, $oHTTP.ResponseText) EndFunc Func HttpGet($sURL, $sData = "") Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") $oHTTP.Open("GET", $sURL & "?" & $sData, False) If (@error) Then Return SetError(1, 0, 0) $oHTTP.Send() If (@error) Then Return SetError(2, 0, 0) If ($oHTTP.Status <> $HTTP_STATUS_OK) Then Return SetError(3, 0, 0) Return SetError(0, 0, $oHTTP.ResponseText) EndFunc Example 1: #include "WinHttp.au3" Global $MD5 = HttpPost("http://www.afk-manager.ir/test/post.php", "password=WeWantThisAsMd5") MsgBox(64, "MD5", $MD5) Example 2: #include "WinHttp.au3" Global $sGet = HttpGet("http://www.google.com/") FileWrite("Google.txt", $sGet) Speed compare: [WinHttp.WinHttpRequest.5.1 GET] 1 = 422.961162765649 2 = 455.738280639636 3 = 441.821516504421 4 = 390.538648365335 Total = 1711.059608275041 Average = 427.7649020687603 [WinHttp.WinHttpRequest.5.1 POST] 1 = 826.436200956633 2 = 872.366642546045 3 = 871.266802895081 4 = 875.792832686324 Total = 3445.862479084083 Average = 861.4656197710208 [HTTP UDF GET] 1 = 984.282912132673 2 = 813.896511915435 3 = 781.158836566862 4 = 791.901235916364 Total = 3371.239496531334 Average = 842.8098741328335 [HTTP UDF POST] 1 = 788.734835486743 2 = 975.688234142967 3 = 785.810779035388 4 = 847.537193542955 Total = 3397.771042208053 Average = 849.4427605520133 [InetRead GET] 1 = 672.120733570292 2 = 595.221462195098 3 = 561.122261209642 4 = 738.180516302658 Total = 2566.64497327769 Average = 641.6612433194225 Tests result: Server 2003 32bit OK Server 2003 64bit Not Tested Server 2008 32bit Not Tested Server 2008 64bit OK XP 32bit OK XP 64bit Not Tested Vista 32bit Not Tested Vista 64bit Not Tested 7 32bit OK 7 64bit OK 8 32bit OK 8 64bit OK Are you interested? Check this out: http://msdn.microsoft.com/en-us/library/windows/desktop/aa384106(v=vs.85).aspx
    1 point
  6. gcriaco

    RDP Automation

    Found the solution (described here: stackoverflow) I need to add the following step to ptrex old topic: $oRDP.AdvancedSettings8.EnableCredSspSupport = true Script example: #include <GUIConstantsEx.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> $host = "IP Address" ;<<<<<<< enter here the host name or ip address ;Remote Desktop ActiveX Control Interfaces -> http://msdn.microsoft.com/en-us/library/aa383022(v=VS.85).aspx $hGUI = GUICreate("RDP Embedded Sessions", 952, 675, -1, -1, $WS_OVERLAPPEDWINDOW + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) $oRDP = ObjCreate("MsTscAx.MsTscAx") ;http://msdn.microsoft.com/en-us/library/aa381344(v=VS.85).aspx $oRDP_Ctrl = GUICtrlCreateObj($oRDP, 64, 44, 800, 600) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetStyle($oRDP_Ctrl , $WS_VISIBLE) $oRDP.DesktopWidth = 1366 $oRDP.DesktopHeight = 768 $oRDP.Fullscreen = 768 $oRDP.ColorDepth = 32 $oRDP.AdvancedSettings2.RedirectDrives = True ; Sollen die Laufwerke mitgenommen werden $oRDP.AdvancedSettings2.RedirectPrinters = False ; Sollen die Drucker mitgenommen werden $oRDP.AdvancedSettings2.RedirectPorts = False ; Ports wie LPT1 etc $oRDP.AdvancedSettings2.RedirectSmartCards = False ; SmartCards für Authentifizierung $oRDP.AdvancedSettings2.EnableAutoReconnect = False $oRDP.AdvancedSettings2.allowBackgroundInput = False $oRDP.AdvancedSettings2.ConnectionBarShowRestoreButton = False $oRDP.AdvancedSettings3.SmartSizing = True $oRDP.AdvancedSettings5.AudioRedirectionMode = 0 $oRDP.AdvancedSettings2.ClearTextPassword = "Password" ; <<<<<<< enter here the user password $oRDP.AdvancedSettings8.EnableCredSspSupport = true $oRDP.Server = $host $oRDP.UserName = "Username" ;<<<<<<< enter here the user name $oRDP.Domain = "domain" ;<<<<<<< enter here the domain name $oRDP.ConnectingText = "Connecting to " & $host $oRDP.DisconnectedText = "Disconnected from " & $host $oRDP.StartConnected = True $oRDP.Connect() GUISetState(@SW_SHOW, $hGUI) ;~ ConsoleWrite($oRDP.GetErrorDescription() & @CRLF) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE $oRDP.Disconnect() Exit EndSwitch WEnd Hope this post is useful to someone else. regards Peppe
    1 point
  7. Bert

    Help with StringRegExp

    This is the site I use for RegEx stuff: http://regexlib.com/Default.aspx
    1 point
  8. mikell

    Help with StringRegExp

    Maybe this ? #Include <Array.au3> $txt = StringReplace(FileRead("numbers.txt"), @crlf, ", ") $res = StringRegExp($txt, '([^"]+)" = "((?:Mobile|Home)[^"]+)', 3) Local $n = UBound($res), $k = 2, $res2D[Ceiling($n/$k)][$k] For $i = 0 To $n - 1 $res2D[Int($i / $k)][Mod($i, $k)] = $res[$i] Next _ArrayDisplay($res2D) Edit The trick is to use [^"] which means "any non-quote character" Mobile|Home is mentioned explicitely to avoid capture of "test" = "test" or so
    1 point
  9. @Zmylna Use the .Title property for the $n object
    1 point
  10. Hello. Maybe this , this , this and this can help you. Saludos
    1 point
  11. Yeah. Quit being lazy and write that UDF If it’s so important to you do it yourself instead of insulting other people. Plus what you’re asking for is impossible. It has to be built into the OS and have programmable hardware support.
    1 point
  12. kangkeng

    Image Search Library

    Hi Folks, I'm a great fan of AutoIT. While trying to automate data entry into a java applet based ERP, I found that checking for entry error or success is quite a pain using pixelsearch. Instead, check for a data entry "success" or "failed" image is far simpler. This a feature found in AHK, I've cut out the necessary code and compiled it into a DLL, and written a au3 library around it. I've tested it in various XP and W2k3 machines, and it seems to work fine. It's a quick and dirty hack I did to get a job done, so your mileage may vary ImageSearch.zip (84K) Number of downloads:
    1 point
  13. Then just don't set any text when the RichEdit is initially created #include <GUIConstantsEx.au3> #include <GuiRichEdit.au3> #include <WindowsConstants.au3> Example() Func Example() Local $hGui = GUICreate("Example (" & StringTrimRight(@ScriptName, StringLen(".exe")) & ")", 320, 350, -1, -1) Local $hRichEdit = _GUICtrlRichEdit_Create($hGui, "", 10, 10, 300, 220, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) _GUICtrlRichEdit_SetSel($hRichEdit, 0, -1) ; select all _GUICtrlRichEdit_ChangeFontSize($hRichEdit, 4) ; change point size _GUICtrlRichEdit_Deselect($hRichEdit) ; deselect all Local $idBtnDoIt = GUICtrlCreateButton("Do it", 270, 310, 40, 30) Local $iMsg GUISetState(@SW_SHOW) While True $iMsg = GUIGetMsg() Select Case $iMsg = $GUI_EVENT_CLOSE _GUICtrlRichEdit_Destroy($hRichEdit) ; needed unless script crashes ; GUIDelete() ; is OK too Exit Case $iMsg = $idBtnDoIt _GUICtrlRichEdit_AppendText($hRichEdit, @CRLF & "This is appended text.") EndSelect WEnd EndFunc ;==>Example
    1 point
  14. _GUICtrlRichEdit_SetFont does exactly that #include <GUIConstantsEx.au3> #include <GuiRichEdit.au3> #include <WindowsConstants.au3> Example() Func Example() Local $hGui = GUICreate("Example (" & StringTrimRight(@ScriptName, StringLen(".exe")) & ")", 320, 350, -1, -1) Local $hRichEdit = _GUICtrlRichEdit_Create($hGui, "This is a test.", 10, 10, 300, 220, _ BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) Local $iFontSize = 12 Local $lblSize = GUICtrlCreateLabel("Current Size: " & $iFontSize, 10, 270, 150, 20) Local $btnIncrease = GUICtrlCreateButton("Increase", 10, 240, 100, 20) Local $btnDecrease = GUICtrlCreateButton("Decrease", 210, 240, 100, 20) ; Change it as soon as it's made ; RichEdit controls start out with MS Sans Serif size 8.5 by default ; You need to select the whole control and then set the font ChangeFontSize($hRichEdit, $iFontSize) GUISetState(@SW_SHOW) While (True) Switch (GUIGetMsg()) Case $GUI_EVENT_CLOSE _GUICtrlRichEdit_Destroy($hRichEdit) ; needed unless script crashes ; GUIDelete() ; is OK too Exit Case $btnIncrease $iFontSize += 1 ChangeFontSize($hRichEdit, $iFontSize) GUICtrlSetData($lblSize, "Current Size: " & $iFontSize) Case $btnDecrease If ($iFontSize - 1 > 0) Then $iFontSize -= 1 ChangeFontSize($hRichEdit, $iFontSize) GUICtrlSetData($lblSize, "Current Size: " & $iFontSize) EndIf EndSwitch WEnd EndFunc ;==>Example Func ChangeFontSize($hRichEdit, $iSize) _GUICtrlRichEdit_SetSel($hRichEdit, 0, -1, True) ; select all _GUICtrlRichEdit_SetFont($hRichEdit, $iSize) _GUICtrlRichEdit_Deselect($hRichEdit) ; deselect all EndFunc ;==>ChangeFontSize By default a richedit control starts out with 8.5 as the size, using font MS Sans Serif (Something like that). Even if you use _SetFont right after making it, that very first 0 position of the text data is going to have the 8.5 MS Sans Serif font. So you need to select all of the text (even if there is none) and then use _SetFont. Afterwards, deselect it
    1 point
  15. kamuline, This works for me: #include <GUIConstantsEx.au3> #include "GUIListViewEx.au3" $gui = GUICreate("Order", 210, 300) $List = GUICtrlCreateListView("", 1, 1, 204, 300) ; Always best to set the extended ListView styles like this ; And yo uneed the FULLROWSELECT extended style for the UDF to work _GUICtrlListView_SetExtendedListViewStyle($List, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_CHECKBOXES)) GUISetState() _Fill() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch _GUIListViewEx_EventMonitor() ; This lets the UDF do its magic WEnd Func _Fill() Local $Materials[5] = ["mat 1", "mat 2", "mat 3", "mat 4", "mat 5"] _GUICtrlListView_AddColumn($List, "Materials", 100) _GUICtrlListView_AddColumn($List, "Quantity", 100) ; initialise the ListView $iList_Index = _GUIListViewEx_Init($List, "") ; Set column 1 to be an edit with an updown from 0 to 3 _GUIListViewEx_SetEditStatus($iList_Index, 1, 1, 1, "0|3|1") ; Insert the data - tellign the UDF that the array elementas are separate rows _GUIListViewEx_Insert($Materials, True) ; Register the NOTIFY messages - no need for the others _GUIListViewEx_MsgRegister(True, False, False, False) EndFunc ;==>_Fill Please ask if you have any questions. M23
    1 point
  16. kamuline, if you are referring to the UDF, then I freely admit that it is a complex beast. But if you tell me what parts of your ListView need to be editable I will be happy to help you get it working as you require. M23
    1 point
  17. kamuline, My GUIListViewEx UDF (look in my sig for the link) allows you to have editable items within a ListView - you might want to take alook. M23
    1 point
  18. maybe like this: _IEImgClick($oIE, 'images/calculate.gif')
    1 point
  19. Cherokee

    Instagram authentication

    I've been attempting to login to Instagram via the _WinHTTP functions all day with no succes. The response only loads the default login page, with no invalid/successful login notification. Here's my code. #include <WinHttp.au3> Global $host = 'instagram.com' $hOpen = _WinHttpOpen() $hConnect = _WinHttpConnect($hOpen, $host) $hLoginResult = _WinHttpSimpleFormFill($hConnect, "/accounts/login/", _ "login-form", _ "name:username", "theusername", _ "name:password", "thepassword") ConsoleWrite($hLoginResult & @CRLF) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen) Any help would be appreciated, thanks.
    1 point
×
×
  • Create New...