Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/30/2023 in all areas

  1. @mike1950r May I suggest you adapt the following code to your script, changing the value of 14 with another value that will suit your needs. #include <SendMessage.au3> ... $g_hRichEdit = _GUICtrlRichEdit_Create(...) ... _SetTabStops($g_hRichEdit, 14) ; 14 corresponds approx. to 4 characters width (as my Scite) in this RichEdit control with this font ... Func _SetTabStops($hWnd, $iTabStops) If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd) ; next line _SendMessage based on _GUICtrlEdit_SetTabStops / _GUICtrlRichEdit_SetTabStops, with "uint*" instead of "struct*" of course. _SendMessage($hWnd, $EM_SETTABSTOPS, 1, $iTabStops, 0, "wparam", "uint*") EndFunc ;==>_SetTabStops Please indicate what value made it for you, as we don't have the same fonts installed on our computers. Good luck
    2 points
  2. Jos

    Kobo Cover Fixer

    We have 2 Kobo devices and use an Docker version of Calibre-Web to serve the book to either Kobo. There is a one time setup to do. I first update the Meta data at import time when anything is missing and then place the book on either shelf. Then simply press sync on the Kobo to get the books. This way I haven't seen any issues with thumbs or covers.
    2 points
  3. Jos

    Kobo Cover Fixer

    I always thought that DeDRM is a plugin for Calibre and will use the Adobe Digital Editions information (read license info) to open the EPUB at import time and remove the DRM protection making the file shareable. Would it be a better approach to use the Calibre metadata.db sqlite database to do any of the fixes? I normally use Calibre's option to modify the metadata and add any cover when missing before putting it on the ereader.
    2 points
  4. I have modified my function like this: Func WindowEditSetDefaultFont($hWnd, $iPoints, $sName, $iTabWidth = 4) Local $hFont, $iTabStops $hFont = _WinAPI_CreateFont($iPoints + 3, 0, 0, 0, $FW_NORMAL, False, False, False, $DEFAULT_CHARSET, $OUT_DEFAULT_PRECIS, $CLIP_DEFAULT_PRECIS, $DEFAULT_QUALITY, 0, $sName) _SendMessage($hWnd, $WM_SETFONT, $hFont, True) _WinAPI_DeleteObject($hFont) $iTabStops = $iTabWidth * 4 _SendMessage($hWnd, $EM_SETTABSTOPS, 1, $iTabStops, 0, "wparam", "uint*") EndFunc ;==>WindowEditSetDefaultFont You can enter $iTabWidth value directly 4 or 6 etc. always 100% fitting. thanks lot, pixelsearch, cheers mike
    1 point
  5. Yes it matches perfectly, even after 100 characters have been typed on the precedent line (25 tabs on the following line match exactly 100 characters on preceding line). I already tested that 16 would fit, just after you indicated "Lucida Console, fontsize 10, $FW_NORMAL" As you're using a function WindowEditSetDefaultFont in this post which adds +3 to fontsize (10+3 = 13) then it's important for our readers to understand that "Lucida Console, fontsize 13, $FW_NORMAL" requires a Tab parameter of 16 for the _SetTabStops() function, so @TAB will correspond exactly to 4 characters width, in a RichEdit control using these font parameters. It's longer to explain than just modifying the value
    1 point
  6. It can be found in the last stable release of AutoIt 3.3.16.1 (just checked again) For example, if you go to this page... https://www.autoitscript.com/autoit3/files/archive/autoit/ ...then you download the package WITHOUT installer, found nearly at the bottom of the page autoit-v3.3.16.1.zip 2022-09-19 20:06 17M <=== 17M (+++) ...you should be able to download the file from the package. I use WinRar to do that, so I can view the content of the package, select the file required and unzip it Watch out not to unzip all files on your HD as you probably got an older version installed. Good luck
    1 point
  7. Werty

    Clamp function.

    Func _Clamp($value,$min,$max) Return $value<$min?$min:$value>$max?$max:$value EndFunc
    1 point
  8. RTFC

    Clamp function.

    #include <Math.au3> Func _Clamp($value,$min,$max) Return _Max($min,_Min($max,$value)) EndFunc
    1 point
  9. Nine

    Remap Mouse Button?

    Maybe something along this : #include <WinAPI.au3> #include <WindowsConstants.au3> Opt("MustDeclareVars", True) Opt("WinTitleMatchMode", 2) ;match partial names of windows Global $hHook, $hFunc, $bMiddle HotKeySet('{ESC}', _Exit) OnAutoItExitRegister(Close) Main() Func Main() $hFunc = DllCallbackRegister(MouseProc, 'lresult', 'int;int;int') $hHook = _WinAPI_SetWindowsHookEx($WH_MOUSE_LL, DllCallbackGetPtr($hFunc), _WinAPI_GetModuleHandle(0)) While Sleep(10) If $bMiddle Then Switch IdentifyApp() Case 1 ; repeat for all apps ; do something before While $bMiddle Sleep(10) WEnd ; do something after Case 4 Send("notepad down" & @CR) While $bMiddle Sleep(10) WEnd Send("notepad up" & @CRLF) EndSwitch EndIf WEnd EndFunc ;==>Main Func MouseProc($iCode, $iwParam, $ilParam) If $iCode < 0 Then Return _WinAPI_CallNextHookEx($hHook, $iCode, $iwParam, $ilParam) Switch $iwParam Case $WM_MBUTTONDOWN, $WM_MBUTTONUP If IdentifyApp() Then $bMiddle = $iwParam = $WM_MBUTTONDOWN Return 1 EndIf EndSwitch Return _WinAPI_CallNextHookEx($hHook, $iCode, $iwParam, $ilParam) EndFunc ;==>MouseProc Func _Exit() Exit EndFunc ;==>_Exit Func Close() _WinAPI_UnhookWindowsHookEx($hHook) DllCallbackFree($hFunc) EndFunc ;==>Close Func IdentifyApp() Local Static $aList[] = ["OneNote", "Acrobat", "Visio", "[CLASS:Notepad]"] For $i = 0 To UBound($aList) - 1 If WinActive($aList[$i]) Then Return $i + 1 Next EndFunc ;==>IdentifyApp
    1 point
×
×
  • Create New...