-
Posts
46 -
Joined
-
Last visited
About SnArF
- Birthday 01/15/1971
Profile Information
-
Location
Netherlands
SnArF's Achievements

Seeker (1/7)
2
Reputation
-
Zedna reacted to a post in a topic: How to get version of installed MS Office
-
SnArF changed their profile photo
-
3 years later... Change: Global Const $StructDef_COPYDATA = "dword none;dword count;ptr pointer" to: Global Const $StructDef_COPYDATA = "ulong_ptr none;dword count;ptr pointer"
-
SnArF reacted to a post in a topic: File to and from 2D array
-
How to get version of installed MS Office
SnArF replied to Zedna's topic in AutoIt General Help and Support
Just for reference, this is how I do it. $objWord = ObjCreate("Word.Application") If IsObj($objWord) Then $OfficeVersion = $objWord.Version $objWord.Quit Else $OfficeVersion = "N/A" EndIf Switch $OfficeVersion Case "7.0" $OfficeVersion = "97" Case "8.0" $OfficeVersion = "98" Case "9.0" $OfficeVersion = "2000" Case "10.0" $OfficeVersion = "2002" Case "11.0" $OfficeVersion = "2003" Case "12.0" $OfficeVersion = "2007" Case "14.0" $OfficeVersion = "2010" Case "15.0" $OfficeVersion = "2013" Case "16.0" $OfficeVersion = "2016" Case "N/A" $OfficeVersion = "Not Available" Case Else $OfficeVersion = "Unknown!" EndSwitch MSGBOX(64,"Office Info","Microsoft Office Version:"&@LF&$OfficeVersion) -
Hello, I,m connecting to a access mdb, it works fine except when i use a select query and the requested data does not exists, then i get an error. ; Example Local $dbName = @ScriptDir & "\test.mdb" $dbCon = ObjCreate("ADODB.Connection") ; Create DataBase connection $dbCon.Open("Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & $dbName) $sQuery = "select * from sourcefiles where Text='test'" $result = $dbCon.Execute($sQuery) MsgBox(0, "", $result.Fields( "ID" ).Value)If "test" exists in column Text then i get the ID number from column ID But if it doesn't exist i get an error: MsgBox(0, "", $result.Fields( "ID" ).Value) MsgBox(0, "", $result.Fields( "ID" )^ ERROR If the value "test"does not exist i just want $result to be 0 or "" Someone an idea?
-
Yet another Access UDF( but different - *.accdb only)
SnArF replied to kcvinu's topic in AutoIt Example Scripts
Just where I was looking for but, i doesn't work. When i start the example script I get error number 80020009 scriptline 113 source adodb.connection. i.m using Windows 10 with office 2013 -
SnArF reacted to a post in a topic: Upload to Screenly
-
Celtic88 reacted to a post in a topic: Upload to Screenly
-
THANKS!!! This works great!
-
_IEAction($oDiv, "click") works fine but I can't figure out the next part
-
Hello, I'm using a raspberry PI with screenly. I have to upload 1000+ files and want to automate it but I can't figure out how. Please help, These are the step I need, 1.Open the site (see http://ose.demo.screenlyapp.com/ ) 2. Click Ad asset 3. Click Upload and thnb click choose file 4. set time and date 5. save This is what i have so far #include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IECreate("http://ose.demo.screenlyapp.com/") _IELoadWait($oIE) Local $oDiv = _IEGetObjById($oIE, "add-asset-button") _IEAction($oDiv, "click")
-
@UEZ, The script shows what's different (Content). I have a script that makes an index of 2 servers, about 1.500.000 files per server. The result are saved to 2 text files. Then the the text files are compared, only the different files are then saved to text files. The complete process, indexing 2 file server with 1.5 million files each and comparing them takes about 11 minutes, I think that's very fast.
-
I had to compare two files with more than one million lines per file. I've tested several examples but all of them are too slow. Most of them are running for several hours to compare 1 million lines. I have written a script that compare's 2 txt files with 1 million lines in less than 5 minutes. (After the files are loaded in an array) It writes the missing files to 2 textfiles. It compares 10.000 lines in 1.8 sec, 100.000 lines in 21 sec, 1000.000 lines in 250 sec on my laptop. The example script creates 2 array's with 1.000.000 lines and then remove's some entry's. At the end it writes 2 txt files with the missing lines per array. Please test it and give commend's #include <array.au3> #include <Timers.au3> #include <file.au3> Local $NrOfRows = 1000000 ; Set number of rows to test Local $delString1 = 0 Local $delString2 = 0 Local $Array1[$NrOfRows] Local $Array2[$NrOfRows] $StartTime = _Timer_Init() $Timer = _Timer_Init() ; Creating 2 array's For $i = 0 to $NrOfRows - 1 $Array1[$i] = "Just some tekst to emulate data to compare " & $i Next $Array2 = $Array1 ConsoleWrite("Array's created in " & Round(_Timer_Diff($Timer)) & " milliseconds" & @CRLF) $Timer = _Timer_Init() ; removing some entry's from both array's to show functionality _ArrayDelete($Array1, "333;5555;7777") _ArrayDelete($Array2, "222;4444;6666") ConsoleWrite("Removed some value's in " & Round(_Timer_Diff($Timer)) & " milliseconds" & @CRLF) $Timer = _Timer_Init() ; You neede to sort the array is you use Binary Search _ArraySort($Array1, 0, 1, 0, 0, 1) ConsoleWrite("Sorted Array 1 in " & Round(_Timer_Diff($Timer)) & " milliseconds" & @CRLF) $Timer = _Timer_Init() ; comparing the 2 array's For $i = 0 to UBound($Array2) - 1 $Index = _ArrayBinarySearch($Array1, $Array2[$i], 1) ; add equal rows to a string If $Index <> -1 Then $delString1 &= ";" & $Index $delString2 &= ";" & $i EndIf Next ConsoleWrite("Array's compared in " & Round(_Timer_Diff($Timer)) & " milliseconds" & @CRLF) $Timer = _Timer_Init() ; removing the equal rows from the array's _ArrayDelete($Array1, $delString1) _ArrayDelete($Array2, $delString2) ConsoleWrite("removed equal rows in " & Round(_Timer_Diff($Timer)) & " milliseconds" & @CRLF) $Timer = _Timer_Init() ; writing the rsult to files _FileWriteFromArray("missing in array 1.txt", $Array2) _FileWriteFromArray("missing in array 2.txt", $Array1) ConsoleWrite("Write missing value's to File in " & Round(_Timer_Diff($Timer)) & " milliseconds" & @CRLF) $Timer = _Timer_Init() ConsoleWrite("Compare complete in " &Round(_Timer_Diff($StartTime)) & " milliseconds")
-
Hi JLOGAN I've attached 2 example scripts. When you compile them in x86 it works, in x64 not. run script1 and then script2 script 2 sends data to script1 and then script1 opens a messagebox and send data back to script 2 script 1.au3 script 2.au3
-
Hello, With x86 the Function Messagehandler.au3 works perfect. But I need my script to run on x64. When I build the script in x64 everything works except the messagehandler. Does anyone know how to solve this? MessageHandler.au3
-
Mlipok, I have used: $Data = _SQL_Execute(-1,"DBCC CHECKIDENT (database, RESEED, 0)") to set the ID value. When I use this command, DBCC CHECKIDENT (database, RESEED, 0), in OSQL I get "Checking identity information: current identity value '0',...." This confirms that the command completed successfully. $Data = _SQL_Execute(-1,"DBCC CHECKIDENT (database, RESEED, 0)") works but how do I get the confirmation that the command completed successfully? So in short, how do I get the results from the executed commands in a variable
-
I can't figure out how to get a value back from _SQL-Execute. I just want to execute: "DBCC CHECKIDENT (database, NORESEED)" and get the value in a string or array. Please help,
-
Removed a typo and added the option export to last row minus x Uploaded the UDF in original post en posted an example
-
_FileFromArray2D with extra options Func _FileFromArray2d($aFile, $aArray, $aDelim = ";", $aWriteMode = 2, $aStartRow = 0, $aEndRow = -1, $aStartCol = 0, $aEndCol = -1) Local $aWrite, $aUboundRow, $aUboundCol, $aLine, $aDelimNr If Not IsArray($aArray) Then SetError(1) Return 0 EndIf $aWrite = FileOpen($aFile, $aWriteMode) If $aWrite = -1 Then SetError(2) Return 0 EndIf $aUboundRow = UBound($aArray, 1)-1 $aUboundCol = UBound($aArray, 2)-1 $aDelimNr = StringLen($aDelim) If $aEndRow > $aUboundRow Or $aEndRow = -1 Then $aEndRow = $aUboundRow If $aEndCol > $aUboundCol Or $aEndCol = -1 Then $aEndCol = $aUboundCol For $i = $aStartRow To $aEndRow $aLine = "" For $k = $aStartCol To $aEndCol $aLine &= $aArray[$i][$k] & $aDelim Next $aLine = StringTrimRight($aLine, $aDelimNr ) FileWriteLine($aWrite, $aLine) Next FileClose($aWrite) EndFunc