Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/24/2018 in all areas

  1. The answer to "disable-infobars" ChromeOption is this: '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true, "args": ["--disable-infobars"]}}}}'
    1 point
  2. You got it, argumentum! I've already got everything working, which means that one can call any one of my four UReg functions (matching the four built-in functions) without knowing if it's a 32 or 64-bit type of key in advance. But I've got more thinking to do about efficiency with regard to ByRef variables (which the style guide discourages). I've some other things to complete, too, but I expect that everything will be ready by the end of this week or early next week. Thanks for expressing an interest!
    1 point
  3. @itsid Such an aggresive reaction is absoltelly inadequate! I have added you to my ignore list and I'm done with you. I'm happy that the most of people on this forum don't behave the way like you ...
    1 point
  4. I decided to compile and run the script. I got a message that the script couldn't be found but it was in a green border. This made me look at my AV and sure enough somehow, it had gotten auto-containment turned on and that was causing the problem. Everything is working as normal now. I'd still like to know how we find the meanings of the AutoIT.exe error codes....
    1 point
  5. Subz

    column count - excel udf

    Do you mean something like: Global $oWorkbook = _Excel_BookOpen($oExcel, $sWorkbook, Default, Default, True) MsgBox(0,'', "Columns : " & $oWorkbook.ActiveSheet.Usedrange.Columns.Count & @CRLF & _ "Rows : " & $oWorkbook.ActiveSheet.Usedrange.Rows.Count)
    1 point
  6. goss34

    Word test alignment

    So here's an example for you to follow, this time you don't need test.doc, it will populate then format it as you wanted. Hope it helps. #include <Word.au3> ; Create application object Local $oRange, $oWord = _Word_Create() ; Open the test document Local $oDoc = _Word_DocAdd($oWord) ; Set default alignment 0= Left, 1 = Centre, 2 = Right Local $wdAlignParagraphJustify = 0 ; Select start of doc as range $oRange = _Word_DocRangeSet($oDoc, -1) ; Insert text before selected range ^^ $vRange = $oDoc.Range $vRange.InsertBefore("I am line 1" & @CR & "I am line 2" & @CR & "I am line 3") ; Move line 1 $oRange = _Word_DocRangeSet($oDoc, -1, $wdParagraph, 0, Default, 2) Local $wdAlignParagraphJustify = 2 $oRange.ParagraphFormat.Alignment = $wdAlignParagraphJustify ; Move line 2 $oRange = _Word_DocRangeSet($oDoc, 0, $wdParagraph, 1, Default, 2) Local $wdAlignParagraphJustify = 1 $oRange.ParagraphFormat.Alignment = $wdAlignParagraphJustify
    1 point
  7. trancexx

    EPOCH time

    This can be done by dllcalling function or two from msvcrt.dll. Limitation of that way is that it cannot proceed negative EPOCH times and is limited to maximum year of 2038 (3000). Probably there is some other function inside some other dll since Javascript has this as built-in function and for example VBS can deal with "negative" times. Anyway, this is done without DllCall(). It is completley based on Date.au3 and functions inside it. - Why did I extract this out of Date.au3? Because this way these two functions are about 6-7 times faster than using Date.au3. - Speed compared to some other methods? Incredible! Impressive! omg! - Why? Date.au3 is very resourceful script. When I look at functions inside of it I'm starting to wonder if people who wrote them are humans at all? I have serious suspicions about Jos van der Zande. I think that he (it!) is some sort of artificial intelligence. I think that that entity has no form but exists in form that is far beyond our... something. I'm serious. Functions with small example: ConsoleWrite("EPOCH time 1234567890 is " & _Epoch_decrypt(1234567890) & @CRLF) ConsoleWrite("Date 4712/12/31 23:59:59 is EPOCH " & _Epoch_encrypt("4712/12/31 23:59:59") & @CRLF) Func _EPOCH_decrypt($iEpochTime) Local $iDayToAdd = Int($iEpochTime / 86400) Local $iTimeVal = Mod($iEpochTime, 86400) If $iTimeVal < 0 Then $iDayToAdd -= 1 $iTimeVal += 86400 EndIf Local $i_wFactor = Int((573371.75 + $iDayToAdd) / 36524.25) Local $i_xFactor = Int($i_wFactor / 4) Local $i_bFactor = 2442113 + $iDayToAdd + $i_wFactor - $i_xFactor Local $i_cFactor = Int(($i_bFactor - 122.1) / 365.25) Local $i_dFactor = Int(365.25 * $i_cFactor) Local $i_eFactor = Int(($i_bFactor - $i_dFactor) / 30.6001) Local $aDatePart[3] $aDatePart[2] = $i_bFactor - $i_dFactor - Int(30.6001 * $i_eFactor) $aDatePart[1] = $i_eFactor - 1 - 12 * ($i_eFactor - 2 > 11) $aDatePart[0] = $i_cFactor - 4716 + ($aDatePart[1] < 3) Local $aTimePart[3] $aTimePart[0] = Int($iTimeVal / 3600) $iTimeVal = Mod($iTimeVal, 3600) $aTimePart[1] = Int($iTimeVal / 60) $aTimePart[2] = Mod($iTimeVal, 60) Return StringFormat("%.2d/%.2d/%.2d %.2d:%.2d:%.2d", $aDatePart[0], $aDatePart[1], $aDatePart[2], $aTimePart[0], $aTimePart[1], $aTimePart[2]) EndFunc Func _Epoch_encrypt($date) Local $main_split = StringSplit($date, " ") If $main_split[0] - 2 Then Return SetError(1, 0, "") ; invalid time format EndIf Local $asDatePart = StringSplit($main_split[1], "/") Local $asTimePart = StringSplit($main_split[2], ":") If $asDatePart[0] - 3 Or $asTimePart[0] - 3 Then Return SetError(1, 0, "") ; invalid time format EndIf If $asDatePart[2] < 3 Then $asDatePart[2] += 12 $asDatePart[1] -= 1 EndIf Local $i_aFactor = Int($asDatePart[1] / 100) Local $i_bFactor = Int($i_aFactor / 4) Local $i_cFactor = 2 - $i_aFactor + $i_bFactor Local $i_eFactor = Int(1461 * ($asDatePart[1] + 4716) / 4) Local $i_fFactor = Int(153 * ($asDatePart[2] + 1) / 5) Local $aDaysDiff = $i_cFactor + $asDatePart[3] + $i_eFactor + $i_fFactor - 2442112 Local $iTimeDiff = $asTimePart[1] * 3600 + $asTimePart[2] * 60 + $asTimePart[3] Return $aDaysDiff * 86400 + $iTimeDiff EndFuncWhat is really special about this functions is that they cover dates from -4712/12/31 23:59:59 (EPOCH -210831897601) to 2147483647/12/25 20:00:00 (EPOCH 67767976233000000). First date is nothing special but second one is far beyond other converters can convert. Far, far... edit: "comared" is not a word lol
    1 point
  8. Global $doubleClickTime = 400 Can be replaced by: Global $doubleClickTime = DllCall("user32.dll", "uint", "GetDoubleClickTime") $doubleClickTime = $doubleClickTime[0]
    1 point
×
×
  • Create New...