Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/04/2019 in all areas

  1. water

    AD - Active Directory UDF

    Version 1.6.3.0

    17,292 downloads

    Extensive library to control and manipulate Microsoft Active Directory. Threads: Development - General Help & Support - Example Scripts - Wiki Previous downloads: 30467 Known Bugs: (last changed: 2020-10-05) None Things to come: (last changed: 2020-07-21) None BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort
    1 point
  2. New version - 13 Jan 2019 - Added: 2 new functions to hide/show and existing marquee. New UDF and example script in zip format: Marquee.zip As always, ready for compliments and/or complaints! M23
    1 point
  3. Reading about HTML woudn't hurt. But the difference is quite simple for those 2. .classname is when there is class=something. .innertext is typically set at the end of a tag.
    1 point
  4. Have you tried WinActivate ($hwindow) ?
    1 point
  5. You could create your own splash window instead. Just make a borderless window with the text you want, that way you can have more control over it. I have a splashscreen UDF linked in my signature that can give you some ideas.
    1 point
  6. Do a screen capture of the UAC, post it in a GUI, place 2 input box over. VoilĂ  !
    1 point
  7. Version 0.3.0.0 of the UDF has been released.
    1 point
  8. You need to add innerText or something after and class is not a tag, use "a" instead and compare with object.className
    1 point
  9. In my opinion most important is the design of your project. Means: First you need a catalog of specifications (functionality, security, privacy req., performance ...), then you select the language to implement them.
    1 point
  10. sleep(1000) ; = 1 second If you press F1 you get the help file. For every function there is an example First lookup in the help file Do For While Then lookup Sleep() Then FileDelete () FileRecycle () BUT are you sure you want to delete DATABASE FILE? .db files are databases. They have information in them? Take care you not removing the wrong files. We all started on the F1 key (Help File) and learned all the command, So if you want to get very good, take some time and have a good read. Then things in AutoIT get really easy. ;These are 3 diffrent loop examples to learn from. ; Since you are new a little boost ; Also Research ContinueLoop and Exitloop ; ---------------------------------- Local $xi = 0 Do Sleep(1000) ConsoleWrite("Hello World 1 - Loop# " & $xi & @CRLF) $xi = $xi + 1 Until $xi = 10 ; ---------------------------------- Local $xii = 0 For $xii = 0 to 10 ; You can also use a "Step" here to say ever 1 or 2 steps (every other loop extra) Sleep(1000) ConsoleWrite("Hello World 2 - Loop# " & $xii & @CRLF) Next ; ---------------------------------- Local $xiii = 10 While 1 If $xiii = 10 Then Exitloop ; IF THIS LINE IS REMOVED IT BECOMES A ENDLESS LOOP Sleep(1000) ConsoleWrite("Hello World 3 - Loop# " & $xiii & @CRLF) $xiii = $xiii + 1 Wend ; ----------------------------------
    1 point
  11. Seems Excel doesn't like double dot notation. "chaining" object references seems to be a problem. So I changed the code to only have single dot notation. Could you please test this version? #include <Excel.au3> $file = "C:\Temp\Test.xlsx" $aProcesses = ProcessList("Excel.exe") ConsoleWrite($aProcesses[0][0] & " Excel instance(s) running." & @CRLF) ConsoleWrite("Started Processing " & $file & @CRLF) ;--------------------- $oExcel = _Excel_Open() $oExcel = ObjCreate("Excel.Application") ConsoleWrite("_Excel_Open: @error = " & @error & ", @extended = " & @extended & @CRLF) $oExcel.Visible = True $oExcel.DisplayAlerts = True ; Default is False $oExcel.ScreenUpdating = True $oExcel.Interactive = True ;--------------------- $oWorkbook = _Excel_BookOpen($oExcel, $file, True) $oWorkbooks = $oExcel.Workbooks $oWorkbook = $oWorkbooks.Open($File, Default, True) ConsoleWrite("_Excel_BookOpen: @error = " & @error & ", @extended = " & @extended & @CRLF) ;--------------------- ; $aOrgArray = _Excel_RangeRead($oWorkbook) ; ConsoleWrite("_Excel_RangeRead: @error = " & @error & ", @extended = " & @extended & @CRLF) ;--------------------- _Excel_BookClose($oWorkbook, False) $oWorkbook.Close() ConsoleWrite("_Excel_BookClose: @error = " & @error & ", @extended = " & @extended & @CRLF) $oWorkbook = 0 ;--------------------- _Excel_Close($oExcel, False, True) $oExcel.Quit() ConsoleWrite("_Excel_Close: @error = " & @error & ", @extended = " & @extended & @CRLF) $oExcel = 0 $oWorkbooks = 0 $oWorkbook = 0 ;just to allow some time for the process to definitely close (if it does close) ConsoleWrite("Finished Processing " & $file & @CRLF) For $i = 1 To 50 Sleep(10) $aProcesses = ProcessList("Excel.exe") If $aProcesses[0][0] = 0 Then ExitLoop ConsoleWrite($i & ": " & $aProcesses[0][0] & " Excel instance(s) still running." & @CRLF) Next
    1 point
  12. I replaced all UDF functions (except RangeRead) with pure COM. So we then know if it is a problem with the UDF or somethign else. #include <Excel.au3> $file = "C:\Temp\Test.xlsx" $aProcesses = ProcessList("Excel.exe") ConsoleWrite($aProcesses[0][0] & " Excel instance(s) running." & @CRLF) ConsoleWrite("Started Processing " & $file & @CRLF) ;--------------------- $oExcel = _Excel_Open() $oExcel = ObjCreate("Excel.Application") ConsoleWrite("_Excel_Open: @error = " & @error & ", @extended = " & @extended & @CRLF) $oExcel.Visible = True $oExcel.DisplayAlerts = True ; Default is False $oExcel.ScreenUpdating = True $oExcel.Interactive = True ;--------------------- $oWorkbook = _Excel_BookOpen($oExcel, $file, True) $oWorkbook = $oExcel.Workbooks.Open($File, Default, True) ConsoleWrite("_Excel_BookOpen: @error = " & @error & ", @extended = " & @extended & @CRLF) ;--------------------- $aOrgArray = _Excel_RangeRead($oWorkbook) ConsoleWrite("_Excel_RangeRead: @error = " & @error & ", @extended = " & @extended & @CRLF) ;--------------------- _Excel_BookClose($oWorkbook, False) $oWorkbook.Close() ConsoleWrite("_Excel_BookClose: @error = " & @error & ", @extended = " & @extended & @CRLF) $oWorkbook = 0 ;--------------------- _Excel_Close($oExcel, False, True) $oExcel.Quit() ConsoleWrite("_Excel_Close: @error = " & @error & ", @extended = " & @extended & @CRLF) $oExcel = 0 $oWorkbook = 0 ;just to allow some time for the process to definitely close (if it does close) ConsoleWrite("Finished Processing " & $file & @CRLF) For $i = 1 To 50 Sleep(10) $aProcesses = ProcessList("Excel.exe") If $aProcesses[0][0] = 0 Then ExitLoop ConsoleWrite($i & ": " & $aProcesses[0][0] & " Excel instance(s) still running." & @CRLF) NextCould you please give it a try?
    1 point
  13. Nope, even running just this causes the issue, I still reckon it has to do with a 32-bit instance of excel running on a 64-bit instance of Windows, because when I run the same few lines of codes on a machine that has both 32-bit Windows and Office or both 64-bit Windows and Office it works fine. It only seems to have a problem with the mixed 32/64-bit environment. Here's the entire code I use for testing: #include <Excel.au3> $file = "C:\Blank Workbook.xlsx" $aProcesses = ProcessList("Excel.exe") ConsoleWrite($aProcesses[0][0] & " Excel instance(s) running." & @CRLF) ConsoleWrite('Started Processing ' & $file & @CRLF) $oExcel = _Excel_Open(False, False, False, False, True) $oWorkbook = _Excel_BookOpen($oExcel, $file, True) $aOrgArray = _Excel_RangeRead($oWorkbook) $oWorkbook = _Excel_BookClose($oWorkbook, False) $oExcelClose = _Excel_Close($oExcel, False, True) Sleep(5000) ;just to allow some time for the process to definitely close (if it does close) ConsoleWrite('Finished Processing ' & $file & @CRLF) ConsoleWrite('$oExcelClose=' & $oExcelClose & ' | @error=' & @error & ' | @extended=' & @extended & @CRLF) $aProcesses = ProcessList("Excel.exe") ConsoleWrite($aProcesses[0][0] & " Excel instance(s) still running." & @CRLF)From Win64+Office64: From Win64+Excel32:
    1 point
  14. I'm sure water can give you better using the excel object (I had that snippet but cannot find it), but for a quick and dirty you could do something like this: #include <Excel.au3> $oExcel = _ExcelBookOpen(@DesktopDir & "\Test.xls", 1) For $i = 1 To 10 $cell = _ExcelReadCell($oExcel, $i, 1) If $cell = "" Then _ExcelWriteCell($oExcel, "Found an empty cell", $i, 1) ExitLoop EndIf Next Edit: Found it. This will move the cursor to the first empty row in column A Const $xlCellTypeLastCell = 11 $oExcel = ObjCreate("Excel.Application") $oBook = $oExcel.Workbooks.Open("C:\Users\Hades\Desktop\Test.xls") $oExcel.Visible = True $oSheet = $oBook.Worksheets(1) $oSheet.Activate $oRange = $oSheet.UsedRange $oRange.SpecialCells($xlCellTypeLastCell).Activate $newRow = $oExcel.ActiveCell.Row + 1 $oExcel.Range("A" & $newRow).Activate
    1 point
  15. Here another method: Func Convert24h($time, $format) ;am/pm to 24h format by UEZ If $format = "am" Then Return Mod($time, 12) Return Mod($time + 12, 24) EndFunc Br, UEZ
    1 point
  16. I can understand you wanting to automate the normal steps of starting software, but killing any running AV program really makes me wonder why in the hell you installed it in the first place.Its like running around with a condom on your thingy and when you actually about to use your thingy, you remove the condom first. Jos
    1 point
×
×
  • Create New...