Jump to content

Search the Community

Showing results for tags 'delete'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 19 results

  1. Good morning guys, i hope that you're all well. guys, i have a problem and i hope that you can help me i've created an 3d array the array Contain a Categories info as folow $array[n][0][0] = Categorie name $array[n][0][1] = Categorie file path $array[n][0][2] = Categorie contents number $array[n][m][0] = link name $array[n][m][1] = link url $array[n][m][2] = link section name in my tool i want to add an option to delete a Category as you know the Categorie mean that must delete a region from the array when i tried to use _arrayDelete with the 2d array it work well but here i couldn't find any way to do that, can any one help me please? thanks in advance.
  2. Is there a reliable way to ensure that data assigned to variables in a script is overwritten or deleted when the script exits? I have scripts that encrypt/decrypt data and would like to ensure, if possible, that the encryption keys and decrypted data do not stay in memory after the script exits. Thanks.
  3. My program has to first search for names in Column D that do not match up with column C. I got that search to work using arrays. It was slow and I could not figure out how to delete them so I just manually put coded the names that do not belong. I found their cell location but I do not know how to store that location and delete it. This is what I have so far. Local $NameToDelete1[6]  = _Excel_RangeFind($OpenWorkbook, "Smith, Bill") _ArrayDisplay($NameToDelete1, "Excel UDF: _Excel_RangeFind Example 1", "", 0, "|", "Sheet|Name|Cell|Value|Formula|Comment") _Excel_RangeDelete($OpenWorkbook.ActiveSheet, $NameToDelete1[2], $xlShiftUp) Please help, I wanted to have this program done yesterday but I did not see this problem until yesterday.
  4. every time i press "delete button" delete a line, but i can't add new line with info. the id line write normally but i can't change or add new info obs: looking at the "includes" one realizes that already tried of everything that knew my code #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> #include <WinAPI.au3> #include <StringConstants.au3> #include <Array.au3> #include <GuiListBox.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 612, 480, 192, 154) $MenuItem1 = GUICtrlCreateMenu("&Arquivo") $MenuItem2 = GUICtrlCreateMenuItem("Salvar Ctrl+S", $MenuItem1, $SS_CENTER) $MenuItem4 = GUICtrlCreateMenuItem("Carregar Ctrl+O", $MenuItem1, $SS_CENTER) $MenuItem3 = GUICtrlCreateMenuItem("Salvar Como Shitft+Ctrl+S", $MenuItem1, $SS_CENTER) $Group1 = GUICtrlCreateGroup("", 21, 8, 569, 97, $SS_CENTER) $Input1 = GUICtrlCreateInput("ID COR", 122, 32, 97, 21, $SS_CENTER) $Input2 = GUICtrlCreateInput("REGIÃO", 138, 64, 249, 21, $SS_CENTER) $Input3 = GUICtrlCreateInput("Label", 264, 30, 121, 21, $SS_CENTER) $Label1 = GUICtrlCreateLabel("Label", 232, 32, 30, 17, $SS_CENTER) $Button1 = GUICtrlCreateButton("Capturar Cor", 42, 30, 75, 25, $SS_CENTER) $Button2 = GUICtrlCreateButton("Capturar Região", 42, 62, 91, 25, $SS_CENTER) $Button3 = GUICtrlCreateButton("ADD", 442, 24, 113, 33) $Button5 = GUICtrlCreateButton("Delet", 442, 64, 113, 33) $Group2 = GUICtrlCreateGroup("Editar ID selecionado", 8, 384, 601, 57, $SS_CENTER) $Input7 = GUICtrlCreateInput("ID", 10, 402, 40,21, $SS_CENTER) $Input4 = GUICtrlCreateInput("COR", 51, 402, 121, 21, $SS_CENTER) $Input5 = GUICtrlCreateInput("REGIÃO", 173, 402, 249, 21, $SS_CENTER) $Input6 = GUICtrlCreateInput("LABEL", 423, 402, 121, 21, $SS_CENTER) $Button4 = GUICtrlCreateButton("\/", 544, 400, 30, 25, $SS_CENTER) $Button6 = GUICtrlCreateButton("/\", 574, 400, 30, 25, $SS_CENTER) ; Add column Global $id = Int(0) $List1 = GUICtrlCreateListView("",5, 120, 601, 253, $SS_CENTER) _GUICtrlListView_AddColumn($List1, "ID",40) _GUICtrlListView_AddColumn($List1, "COR",100) _GUICtrlListView_AddColumn($List1, "COORDENADA",305) _GUICtrlListView_AddColumn($List1, "LABEL",150) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $MenuItem2 MsgBox($MB_SYSTEMMODAL, "ctrl + s", "Nothing Here",1) Case $MenuItem3 MsgBox($MB_SYSTEMMODAL, "shift+ctrl s", "Nothing Here",1) Case $MenuItem4 MsgBox($MB_SYSTEMMODAL, "ctrl + o", "Nothing Here",1) Case $Button1 MsgBox($MB_SYSTEMMODAL, "Capturar cor", "Aperte espaço para capturar a cor") GUICtrlSetData($Input1,MouseColor()) Case $Button2 MsgBox($MB_SYSTEMMODAL, "capturar região", "Aperte espaço para capturar a posição inicial") local $mouse = MouseGetPos() $x_init = $mouse[0] $y_init = $mouse[1] MsgBox($MB_SYSTEMMODAL, "capturar região", "Aperte espaço para capturar a posição final") local $mouse = MouseGetPos() $x_end = $mouse[0] $y_end = $mouse[1] GUICtrlSetData($Input2,$x_init&','&$y_init&' ; '&$x_end&','&$y_end) Case $Button3 _GUICtrlListView_AddItem($List1, $id, 1) ; id _GUICtrlListView_AddSubItem($List1, $id, GUICtrlRead($Input1), 1, 1) ;cor _GUICtrlListView_AddSubItem($List1, $id, GUICtrlRead($Input2), 2, 1) ;coordenada _GUICtrlListView_AddSubItem($List1, $id, GUICtrlRead($Input3), 3, 1) ;label $id= $id + 1 Case $Button4 $Item = _GUICtrlListView_GetSelectedIndices($List1) $Sid = _GUICtrlListView_GetItem($List1, Number($Item),0) $Scor = _GUICtrlListView_GetItem($List1, Number($Item),1) $Scord = _GUICtrlListView_GetItem($List1, Number($Item),2) $Slabel = _GUICtrlListView_GetItem($List1, Number($Item),3) ; get info GUICtrlSetData($Input7,$Sid[3]) GUICtrlSetData($Input4,$Scor[3]) GUICtrlSetData($Input5,$Scord[3]) GUICtrlSetData($Input6,$Slabel[3]) Case $Button5 _GUICtrlListView_DeleteItemsSelected($List1) Case $Button6 ; give back inf if GUICtrlRead($Input7) <> "ID" Then _GUICtrlListView_SetItem($List1, GUICtrlRead($Input4), GUICtrlRead($Input7),1) ;cor _GUICtrlListView_SetItem($List1, GUICtrlRead($Input5), GUICtrlRead($Input7),2) ;coordenada _GUICtrlListView_SetItem($List1, GUICtrlRead($Input6), GUICtrlRead($Input7),3) ;coordenada EndIf EndSwitch WEnd Func MouseColor() local $mouse = MouseGetPos() Return Hex(PixelGetColor($mouse[0],$mouse[1]), 6) EndFunc
  5. Hello, i need help in deleting files from a server. The function "_FTP_DirDelete" only deletes a directory when its empty. I need to delete a non empty directory. I also can not delete the files in this directory first, because the files are PAG and DIR files in a .DAV directory and FTPEx.au3 doesnt like a directory starting with a ".". Any ideas? Thx, Sally
  6. Hi all I been using autoit some years ago and needed a tool for changing various in outlook so i found autoit again and i allready succeed in some of this, but i cant find and delete an appointment. I have found this example and the creation is ok (after i changed $oOL/$oOutlook typo) Https://www.autoitscript.com/wiki/OutlookEX_UDF_-_Meeting_Item But i cant get the delete part to work and i keep on getting "not found" and an empty array (screen shoot of _ArrayDisplay attached) Please can someone tell me what i am missing, i have been searching and trying various but stil i have no luck in finding any items. I am using outloook 2013 and office365. I have been able to send mails and create appointment, so i guess my problem is not due to the use off office365.
  7. I am trying to read all the files in a folder, then whatever file is newest, keep only that one and delete the rest. Example files: (these all have version numbers embedded in them, I dont want to rely on the file name) Faint.exe Faint-v2.0.exe Faint-v3.0.exe Faint-v4.0.exe What I have so far: #include <File.au3> RemoveOldFiles() ConsoleWrite(FileGetVersion("C:\WB Resources\FAINT_DONT_LINK_THESE\Faint-v4.0.0.exe") &@CRLF) Func RemoveOldFiles() Local $aFileList = _FileListToArray("C:\WB Resources\FAINT_DONT_LINK_THESE\", "*.exe",$FLTA_FILES) For $i = 0 To UBound($aFileList) - 1 $aFileVersion = FileGetVersion($aFileList[$i]) ConsoleWrite($aFileList[$i] & @CRLF) ConsoleWrite($aFileVersion & @CRLF) Next EndFunc OUTPUT: >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\bot\ownCloud\WellBeats\Delete Old Files\delete-test.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop 3 0.0.0.0 a.exe 0.0.0.0 b.exe 0.0.0.0 Faint-v4.0.0.exe 0.0.0.0 4.0.0.18 <-- This is the correct file version.... +>07:34:26 AutoIt3.exe ended.rc:0 +>07:34:26 AutoIt3Wrapper Finished. >Exit code: 0 Time: 0.6647 Not sure what I am missing here? Thanks!
  8. Hi everybody, new here. I'm messing around with AutoIT since a few days. I'm actually doing some experiment on my computer, and want to do a simple textbox on my desk, and when I type some things like "chrome" then click OK or input Enter, it launch chrome.exe Anyway, I'm storing a historic of my inputs in a txt file. And if I push my BackSpace button, I'd like to make my code delete the last character of the txt file instead of FileWrite ($historic, 'BACKSPACE') .. Is there a special character that can delete my last char in the txt file ? I remember doing domething like that in C but it was years ago and I was beginning... Thanks for your help !
  9. I'm looking to delete string from point A to point B... For example: "I want to go to store" I would think I need 2 variables. $sfind1 = want $sfind2 = to. Anything between $sfind1 and $sfind2 will be delete it. I would think stringtrim left or right, but the problem I'm facing is, trim left/right does not have a point a or point b to trim from and to. It would be useful if a function was created to do this job if it doesn't already exist.
  10. This function rewrite whole content of given file by defined (implicitly 0x0) character and finally delete it, it's called as secure deleting. This should be VERY fast!! Just note that there is no error checking inside FileWipe() Maybe I will post later also version with error checking. You can comment line FileDelete($sFileName) to see how it's rewritten before deletion. EDIT: There can be problems with too big files (>2GB or > amount of RAM) see post #8 by Kafu #include <WinAPI.au3> ; prepare testing file FileDelete('1.txt') FileWrite('1.txt','123abc') FileWipe('1.txt') Func FileWipe($sFileName, $nByte = 0x0) If Not FileExists($sFileName) Then Return $iSize = FileGetSize($sFileName) $hFile = _WinAPI_CreateFile($sFileName, 2, 6) $hMapping = _WinAPI_CreateFileMapping($hFile) $pAddress = _WinAPI_MapViewOfFile($hMapping) MemSet($pAddress, $nByte, $iSize) _WinAPI_UnmapViewOfFile($pAddress) _WinAPI_CloseHandle($hMapping) _WinAPI_CloseHandle($hFile) FileDelete($sFileName) EndFunc Func MemSet($pDest, $nChar, $nCount) DllCall("msvcrt.dll", "ptr:cdecl", "memset", "ptr", $pDest, "int", $nChar, "int", $nCount) If @error Then Return SetError(1,0,False) Return True EndFunc ; from WinAPIEx - just simplified for this purpose Func _WinAPI_CreateFileMapping($hFile) Local $Ret = DllCall('kernel32.dll', 'ptr', 'CreateFileMappingW', 'ptr', $hFile, 'ptr', 0, 'dword', 0x4, 'dword', 0, 'dword', 0, 'ptr', 0) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) Return $Ret[0] EndFunc Func _WinAPI_MapViewOfFile($hMapping) Local $Ret = DllCall('kernel32.dll', 'ptr', 'MapViewOfFile', 'ptr', $hMapping, 'dword', 0x6, 'dword', 0, 'dword', 0, 'dword', 0) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) Return $Ret[0] EndFunc Func _WinAPI_UnmapViewOfFile($pAddress) DllCall('kernel32.dll', 'int', 'UnmapViewOfFile', 'ptr', $pAddress) If @error Then Return SetError(1, 0, 0) Return 1 EndFunc Here is my first test version without memory mapped files: Func FileWipe($sFileName, $nByte = 0x0) If Not FileExists($sFileName) Then Return $iSize = FileGetSize($sFileName) $tBuffer = DLLStructCreate("byte[" & $iSize & "]") MemSet(DLLStructGetPtr($tBuffer), $nByte, $iSize) $hFile = _WinAPI_CreateFile($sFileName, 2, 6) _WinAPI_WriteFile($hFile, DLLStructGetPtr($tBuffer), $iSize, $iSize) _WinAPI_CloseHandle($hFile) FileDelete($sFileName) EndFunc
  11. The below script is used by me before for copying files/folders with progress bar(windows default progress bar). I found similar option for moving by using same object. But not able to find for delete. dml.vbs (This is a vbscript one and I am posting in this forum because autoit is made on top of vbscript and it might have similar functions.) So, I checked in AutoIT forums and found below script files and which I have been modified for my requirement. In those below I found delete2.au3 is working fine but hanging during deletion of huge memory files/folders. Delete1_au3 Delete2_au3 Delete3_au3 Please try to provide a solution.
  12. I recently >posted a question in the general help and support about how the best way to find the last non-empty cell in a workbook. @Water was kind enough to help me find several solutions. During that thread we also posted a snippet that I find to be very useful. It was slightly off topic from the OP so I thought I would post it here so it has a home in case anyone needs it. That said, this is one way to delete all blank rows in a spreadsheet: $oWorkbook.ActiveSheet.Columns("A:A").SpecialCells($xlCellTypeBlanks).EntireRow.Delete The $xlCellTypeBlanks is a constant in the Excel constants include so you don't need to pre-define it. "A:A" is the range. So this would look for any blank rows in Col A and delete those rows from the workbook. Hope somebody finds it useful.
  13. Hi, Here is an UDF to create, delete, set the icon and state, tooltip and tip for your notify icons. The main advantage is that you can handle mouse events as you want, there is no default events. You can create fully customised notifyicons/tooltips. Thanks to Holger Kotsch for his ModernMenu UDF. Note : Breaking changes ! Please use the 1.2+ version. Functions : Attachments : Example + UDF : AutoIt v3.3.10.0+ NotifyIcon_1.2.zip TrayIconEx_1.1.zip AutoIt v3.3.8.0+ TrayIconEx.zip & Requirements : >WinAPIEx UDF. As usual, enjoy !
  14. I tried a lot of techniques but still have no luck.. How can I delete the second sentence until the last sentence of a set paragraph range on a Microsoft Word document? #include <Word.au3> Global $oWord, $oDoc $oWord = _Word_Create() $oDoc = _Word_DocGet($oWord, 1) Global Const $Count = $oDoc.Paragraphs.Count For $i = 0 To $Count - 1 $oRange = _Word_DocRangeSet($oDoc, -1, $wdParagraph, $i, $wdParagraph, 1) ; Here will be placed the missing code Next Sample of the beginning of a Word document: This is a sentence 1. This is a sentence 2. This is a sentence 3. This is a sentence 4. This is a sentence 5. This is a sentence 6. This is a sentence 7. This is a sentence 8. This is a sentence 9. Sample of the final result: This is a sentence 1. This is a sentence 4. This is a sentence 7.
  15. Hi everybody! I'm trying to use SQLite for the first time into an app with a listview. I've already succesful managed to create a database, insert and update items, also on the listview! My problem is about deleting records. I mean i can easily delete a record from a database with _SQLite_Exec(-1, "DELETE FROM Database WHERE KEY = " & $selected_row_on_listview & ";") and also from listview with _GUICtrlListView_DeleteItemsSelected($listview) but the difference is that if I have 5 records into the Database and I delete 1 in the middle (say KEY=3) I will have KEY values 0,1,2,4 BUT Listview updates its rows 0,1,2,3 so I couldn't use $selected_row_on_listview anymore, since if I click on row 3 it would try to delete a missing record. Sorry if my question sounds silly but I'm really stuck now. Thanks for any hints and forgive my poor english. Also, any good example with SQLite and listview would be greatly appreciated.
  16. I know this question has been asked, and has even been answered ( for example), but even after reading through the AutoIT commands and trying to reverse engineer the fantastic script Varian put together, I'm still having trouble, and I was hoping for some help. Basically, I have a script that runs once an hour, every hour, duplicating a folder into a backup location and stamping it with a date and time stamp. I'm using the simple DirCopy command with some rudimentary macros. An example of what I'm talking about follows: DirCopy("[SOURCE DIR]", "[TARGET DIR]\[" & @MON & "-" & @MDAY & "-" & @YEAR & "]-[" & @HOUR & @MIN & " Hours]", 1) Obviously I've replaced the source and target directories in the above example. When run, the source folder is copied to a \Backups\ alternate folder, as shown in the following examples: - ...\Backups\[07-06-2012]-[0000 Hours] - ...\Backups\[07-06-2012]-[0100 Hours] - ...\Backups\[07-06-2012]-[0200 Hours] - ...\Backups\[07-06-2012]-[0300 Hours] - ...\Backups\[07-06-2012]-[0400 Hours] This goes on for a 24 hour cycle, reaching 2400 hours, at which point the date rolls over and the whole process starts again. The obvious problem is that I don't want these backup folders filling up the entire drive. Therefore, I'd like to add functionality to the script to purge any backup folders previously created which are more than a few days old. Again, I've reviewed the commands in the linked article, and I've done my best to reverse engineer the linked script, but I just can't get it to work. My goal isn't to have an interactive script, but rather to have a script that will run unattended on its own without user intervention. If the script is attended, I might as well just go in and manually purge the old files. I hate to ask someone else to do my work for me, but I'm at the end of my rope with this particular issue. If anyone can (and is willing) to help, I'd really appreciate it. Thanks, Bob
  17. I have very minimal knowledge of AutoIt. I come from basic/batch/vbscript/wisescript environment. I am learning AutoIt as I type this. I'm hoping someone can help me out / point me in the right direction. AutoIt has helped me in the past with many tasks. Again, I am a beginner here. I'm looking for a script that compares two text files (contains listing of files) and sorting out the differences. Once the differences have been sorted out, I want to delete the files that are "different." For example: [file1.txt content] c:dog.txt c:cat.txt c:mouse.txt [file2.txt content] c:dog.txt c:cat.txt c:mouse.txt c:bear.txt Logic: Difference = c:bear.txt Delete c:bear.txt Any help would be appreciated. -DS
  18. Hi guys, I would like to create an application that uses CUI, and consolewrite. At compiling I set the CUI enabled and It works well. #AutoIt3Wrapper_Change2CUI=y Now I have only one question: Is there any way to hide/delete the CUI? (I write something on it, let it be there for some sec, then it would disappear) Thanks a lot: Unc3nZureD
  19. hello guys, i wanna know how to Search for a file by name then run or rename or delete .... etc
×
×
  • Create New...