Jump to content

Leaderboard

Popular Content

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

  1. Not so. Whatever engine you use, the query planner must first apply your where clause to select the resulting subset. Then it must sort it as a whole (probably more than 20 rows); this can be helped by an index on (StudyDate, PatientName). Only then it has to honor the offset=N and skip the first N rows, finally output while counting up to 20.
    2 points
  2. This should help you see why they are not equal: _Example() Func _Example() Local $sKwota_Naliczona = _String_AsRounded_Number('6.05') Local $sKwota_Pobrana_Wczesniej = 0.00 Local $sKwota_Pobieram = _String_AsRounded_Number('4.19') Local $sKwota_Do_Pobrania = _String_AsRounded_Number('1.86') Local $bTesting_1 = $sKwota_Naliczona - $sKwota_Pobrana_Wczesniej - $sKwota_Pobieram Local $bTesting__A = ($bTesting_1 = $sKwota_Do_Pobrania) Local $bTesting__B = ($bTesting_1 == $sKwota_Do_Pobrania) ConsoleWrite(StringFormat("$sKwota_Do_Pobrania = %.15f", $sKwota_Do_Pobrania) & @CRLF) ConsoleWrite(StringFormat("$bTesting_1 = %.15f", $bTesting_1) & @CRLF) ConsoleWrite( _ 'Test pobrania kosztu - ' & $bTesting__A & ' / ' & $bTesting__B & _ ' ( testowano: ' & $sKwota_Naliczona & ' - ' & $sKwota_Pobrana_Wczesniej & ' - ' & $sKwota_Pobieram & ' = ' & $sKwota_Do_Pobrania & ' )' _ & @CRLF) EndFunc ;==>_Example Func _String_AsRounded_Number($sData) Return Round(Number(StringReplace($sData, ",", ".")), 2) EndFunc ;==>_String_AsRounded_Number Output: $sKwota_Do_Pobrania = 1.860000000000000 $bTesting_1 = 1.859999999999999 Test pobrania kosztu - False / True ( testowano: 6.05 - 0 - 4.19 = 1.86 ) When comparing floating point values for equality, it is best to make sure that they are both rounded to the same decimal place. $bTesting1 was not rounded.
    1 point
  3. Because that ensures there is no overflow from 59s to anything, which can be up to one year shift!
    1 point
  4. I have been working on audio graphical scripts these last several months. This is my last script on this subject for now. On to other projects. Credits: UEZ, Eukalyptus, BrettF, Prog@ndy, Authenticity and the AutoIt Community. Thanks to all that made these scripts possible! Please let me know if you have any problems with it. Download: LIVE Stereo Audio Waveform v2.zip
    1 point
  5. @Danp2 It Works Here is the correct function to add to the demo : Func SetupEdge() _WD_Option('Driver', 'msedgedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--log-path="' & @ScriptDir & '\edge.log"') $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"binary": "' & 'c:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"}}}}' EndFunc ;==>SetupEdge Great Thanks for your fast answers and patience
    1 point
  6. @Ghost1982 Use only one character class, as in the example below: #include <StringConstants.au3> ConsoleWrite(_RemoveDateTimeSeparators('YYYY/MM/DD HH:MM:SS') & @CRLF) Func _RemoveDateTimeSeparators($strString) Return StringRegExpReplace($strString, '[ :/]', '') EndFunc By the way, if you want to be even verbose, you should use a different pattern: #include <StringConstants.au3> ConsoleWrite(_RemoveDateTimeSeparators('2020/03/04 12:10:59') & @CRLF) Func _RemoveDateTimeSeparators($strString) Return StringRegExpReplace($strString, '(\d{4})/(\d{2})/(\d{2}) (\d{2}):(\d{2}):(\d{2})', '$1$2$3$4$5$6') EndFunc
    1 point
  7. I think something like this should work. #include <WinAPIGdi.au3> Local $t=_WinAPI_DwmGetColorizationParameters() ConsoleWrite(Hex($t.Color) & @CRLF) ConsoleWrite($t.AfterGlow & @CRLF) ConsoleWrite($t.ColorBalance & @CRLF) ConsoleWrite($t.AfterGlowBalance & @CRLF) ConsoleWrite($t.BlurBalance & @CRLF) ConsoleWrite($t.GlassReflectionIntensity & @CRLF) ConsoleWrite($t.OpaqueBlend & @CRLF) $t.Color=Random(1000,100000,1) $t.AfterGlow=10 $t.ColorBalance=100 $t.AfterGlowBalance=50 $t.BlurBalance=50 $t.GlassReflectionIntensity=50 $t.OpaqueBlend=0 ConsoleWrite("_WinAPI_DwmSetColorizationParameters: " & _WinAPI_DwmSetColorizationParameters($t) & @CRLF) Saludos
    1 point
  8. If you cannot use Send, I doubt you will find a way to automate this install. But here what I would attempt to do : 1- use #RequireAdmin 2- run the script x64 3- try sending VK instead of actual chars (see _WinAPI_Keybd_Event)
    1 point
  9. Grosminet, The 2 types of commands do not have the same "prefix" as they are used differently: Any command that begins GUICtrl* is to be used on an AutoIt GUI created by the script itself - hence the use of a ControlID only to identify the control to be actioned. Commands that begin Control* can be used on any GUI - hence the requirement to define the GUI by title and text as well as providing a ControlID. This explains why there are both ControlGetPos & ControlMove - as you do not necessarily know the initial position of the control - while GUICtrlSetPos is alone, because you created the control and are supposed to know where it is now! As to the differing list heights you detect, I believe there must be a problem with your maths because I do not see a difference when I run this similar script regardless of the method I use to reposition the lists: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("Test", 500, 500 , Default, Default, $WS_SIZEBOX) $aListSize = _CalcHeight() $cList1 = GUICtrlCreateList("List 1", 10, 10, $aListSize[0], $aListSize[1]) $cList2 = GUICtrlCreateList("List 2", 10, $aListSize[1] + 20, $aListSize[0] / 2, $aListSize[1]) GUISetState() GUIRegisterMsg($WM_SIZE, "_WM_SIZE") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _WM_SIZE($hWnd, $iMsg, $wParam, $lParam) $aListSize = _CalcHeight() ;GUICtrlSetPos($cList1, 10, 10, $aListSize[0], $aListSize[1]) ;GUICtrlSetPos($cList2, 10, $aListSize[1] + 20, $aListSize[0] / 2, $aListSize[1]) ControlMove($hGUI, "", $cList1, 10, 10, $aListSize[0], $aListSize[1]) ControlMove($hGUI, "", $cList2, 10, $aListSize[1] + 20, $aListSize[0] / 2, $aListSize[1]) $aSize1 = ControlGetPos($hGUI, "", $cList1) $aSize2 = ControlGetPos($hGUI, "", $cList2) If $aSize1[3] <> $aSize2[3] Then ConsoleWrite("Lists NOT same height: " & $aSize1[3] & " - " & $aSize2[3] & @CRLF) EndIf EndFunc Func _CalcHeight() $aSize = WinGetClientSize($hGUI) $iWidthMargins = 20 ; 10 top and bottom $iHeightMargins = 30 ; 10 top, middle and bottom $aSize[0] = Floor($aSize[0] - $iWidthMargins) $aSize[1] = Floor(($aSize[1] - $iHeightMargins) / 2) Return $aSize EndFunc I do, however, see a slight difference in the actual positions of the controls, so I am investigating further. M23
    1 point
  10. Upsa, misread that you search for guibkcolor... left both gui and ctrl bk color examples in ... #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> #include <StaticConstants.au3> Local $msg GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUISetBkColor(0x00ff00) $label = GUICtrlCreateLabel("Test",10,10,200) GUICtrlSetBkColor(-1,0x0000ff) GUISetState(@SW_SHOW) ; will display an empty dialog box Sleep(2000) GUISetBkColor(_GetSysColor(15)) GUICtrlSetBkColor($label,_GetSysColor(15)) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd GUIDelete() Func _RGB2BGR($nColor) Return (BitAND($nColor, 0xff) * 0x10000) + BitAND($nColor, 0xff00) + (BitAND($nColor, 0xff0000) / 0x10000) EndFunc ;==>_RGB2BGR Func _GetSysColor($nIndex) Return _RGB2BGR(_WinAPI_GetSysColor($nIndex)) EndFunc ;==>_GetSysColor
    1 point
×
×
  • Create New...