Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/17/2023 in all areas

  1. TheSaint

    Kobo Cover Fixer

    I did further coding for the new option, but an eventual test I have just done, revealed nothing solved. Here's some screenshots at various stages today. Using the SUBS value as seen in the second screenshot, and then saving that to the subs input field on the Results window for a selected ebook with missing images, then clicking the CREATE button, I was able to create the 3 required images in that subs folder on my Kobo device. I then rebooted the device, and checked that ebook, but the missing images issue was not solved (menu browsing or sleep cover). Interesting to note, that the original three images in that subs folder (still there), have an Image ID in their file name, that does not exist in the device SQLite file. I was hoping the sub-folders were correct but the files were wrongly named ... not updated or something after I purchased the ebook in question. Alas that appears to be false. My new code extracts detail from the device SQLite file and creates an INI file called 'Others.ini', that the Mapped Images Viewer can use if the values of Author etc are not returned from the 'Results.ini' file. Using what is or isn't returned, the new inputs for DEVICE and OWNED and SUBS, as well as AUTHOR and TITLE are populated. The larger preview image is now optional with a checkbox setting when a cover image is clicked. A few other minor improvements. The only place I can think to go from here, is to sideload all the troublesome ebooks, which is something I prefer not to do, as that means giving up on Wifi for many ebooks and mucking around with connecting my Kobo device to a PC, and then fixing any images afterwards that are badly sized (formatted). I still have the option of seeking help from Kobo Support or from some folk at the MobiRead Forums, but we will see. Time to do other things now for a while. DOWNLOAD Kobo Cover Fixer.au3 (47 downloads) SEE THE FIRST POST in this topic for the latest version. 163.48 kB
    1 point
  2. Local $hTimer = TimerInit() Local $sOutput = runPowershell('cd Z:/test; dir') MsgBox(262144, 'Took ' & TimerDiff($hTimer) & ' ms', $sOutput) Func runPowershell($sCommand) Return runCaptureOutput("powershell -Command " & $sCommand) EndFunc Func runCaptureOutput($sCommand) Local $iPid = Run(@ComSpec & " /c " & $sCommand, "", @SW_HIDE, 2 + 4) Local $sOutput = "" While (ProcessExists($iPid)) Sleep(50) WEnd Return StdoutRead($iPid) EndFunc Hope this helps.
    1 point
  3. Thanks for your Tips Guys, yes I am using the X64 Version. Working directory could be an issue because i have a mostly portable Version of Scite and Autoit. I will try on Monday, thank you and have a nice Weekend.
    1 point
  4. in continued from: 210355-after-controlclick-how-can-i-check-the-color-of-the-clicked-coordinate ShareXMenu("Send", "r") ;Rectangle ;~ ShareXMenu("Click", 869) ;Tool Options Local $iBorderSize = ShareXMenu("Get_ToolOptions", "BorderSize") ;get BorderSize Local $sBorderStyle = ShareXMenu("Get_ToolOptions", "BorderStyle") ;get BorderStyle ConsoleWrite("$iBorderSize=" & $iBorderSize & @CRLF) ConsoleWrite("$sBorderStyle=" & $sBorderStyle & @CRLF) ShareXMenu("Set_ToolOptions", "BorderSize=" & $iBorderSize + 2) ;set BorderSize ShareXMenu("Set_ToolOptions", "BorderStyle=DashDotDot") ;set BorderStyle $iBorderSize = ShareXMenu("Get_ToolOptions", "BorderSize") ;get BorderSize $sBorderStyle = ShareXMenu("Get_ToolOptions", "BorderStyle") ;get BorderStyle ConsoleWrite("$iBorderSize=" & $iBorderSize & @CRLF) ConsoleWrite("$sBorderStyle=" & $sBorderStyle & @CRLF) ;---------------------------------------------------------------------------------------- Func ShareXMenu($sCommand, $sOption) ;~ https://getsharex.com/docs/keybinds#tools ;~ Image editor only ;~ Keybind Description ;~ Send, "^{NUMPADADD}" Zoom in ;~ Send, "^{NUMPADSUB}" Zoom out ;~ Send, "^{NUMPAD0}" Reset zoom ;~ Send, "^!{NUMPAD0}" Zoom to fit ;~ Send, "{ENTER}" Close image editor and continue task with changes applied ;~ Send, "{SPACE}" Close image editor and continue task without apply changes ;~ Send, "{ESC}" Close image editor and cancel task ;~ Send, "^s" Save image ;~ Send, "^+s" Save image as… ;~ Send, "^+c" Copy image to clipboard ;~ Send, "^u" Upload image ;~ Send, "^p" Print image ;~ ;~ Tools ;~ Keybind Description ;~ Send, "m" Select and move ;~ Send, "r" Rectangle ;~ Send, "e" Ellipse ;~ Send, "f" Freehand ;~ Send, "l" Line ;~ Send, "a" Arrow ;~ Send, "o" Text (Outline) ;~ Send, "t" Text (Background) ;~ Send, "s" Speech balloon ;~ Send, "i" Step ;~ Send, "b" Blur ;~ Send, "p" Pixelate ;~ Send, "h" Highlight ;~ Send, "c" Crop image ;~ Send, "x" Cut out ;~ ;~ Click, 305 freehand arrow ;~ Click, 503 magnify ;~ Click, 527 image file ;~ Click, 585 sticker ;~ Click, 613 cursor ;~ Click, 642 smart eraser ;~ Click, 814 Border Color ;~ Click, 843 Fill Color ;~ Click, 869 Tool Options ;~ ;~ Get_ToolOptions, "BorderSize" Get BorderSize ;~ Set_ToolOptions, "BorderSize=5" Set BorderSize to 5 ;window handle Local $hWnd = WinWait("ShareX - Editor menu", "", 3) Local $aWinPos = WinGetPos($hWnd) ;ConsoleWrite("$aWinPos:" & $aWinPos[0] & ", " & $aWinPos[1] & ", " & $aWinPos[2] & ", " & $aWinPos[3] & @CRLF) ;icon size Local Const $iSZ = $aWinPos[3] / 2 ; - 16 Switch $sCommand Case "Send" ConsoleWrite("- Send:" & $sOption & @CRLF) Local $hParent = WinGetHandle("ShareX - Image editor") WinActivate($hParent) Sleep(100) Send($sOption) Case "Click" $sOption = Int($sOption) ConsoleWrite("- Click:" & $sOption & @CRLF) ControlClick($hWnd, "", "WindowsForms10.Window.8.app.0.1a52015_r6_ad11", "left", 1, $sOption, $iSZ) ;MouseMove($aWinPos[0] + $sOption, $aWinPos[1] + $iSZ) Case "Get_ToolOptions" ConsoleWrite("- Get_ToolOptions:" & $sOption & @CRLF) ;first click Tool Options ControlClick($hWnd, "", "WindowsForms10.Window.8.app.0.1a52015_r6_ad11", "left", 1, 869, $iSZ) Local $Result Switch $sOption Case "BorderSize" $Result = Int(ControlGetText("[CLASS:WindowsForms10.Window.808.app.0.1a52015_r6_ad1]", "", "WindowsForms10.EDIT.app.0.1a52015_r6_ad11")) Case "CornerRadius" $Result = Int(ControlGetText("[CLASS:WindowsForms10.Window.808.app.0.1a52015_r6_ad1]", "", "WindowsForms10.EDIT.app.0.1a52015_r6_ad12")) Case "BorderStyle" $Result = ControlGetText("[CLASS:WindowsForms10.Window.808.app.0.1a52015_r6_ad1]", "", "WindowsForms10.COMBOBOX.app.0.1a52015_r6_ad11") EndSwitch Send("{ESC}") Return $Result Case "Set_ToolOptions" ConsoleWrite("- Set_ToolOptions:" & $sOption & @CRLF) ;first click Tool Options ControlClick($hWnd, "", "WindowsForms10.Window.8.app.0.1a52015_r6_ad11", "left", 1, 869, $iSZ) Local $aSplt = StringSplit($sOption, "=") If $aSplt[0] <> 2 Then Exit ConsoleWrite("! exit" & @CRLF) Switch $aSplt[1] Case "BorderSize" ControlSetText("[CLASS:WindowsForms10.Window.808.app.0.1a52015_r6_ad1]", "", "WindowsForms10.EDIT.app.0.1a52015_r6_ad11", $aSplt[2]) Case "CornerRadius" ControlSetText("[CLASS:WindowsForms10.Window.808.app.0.1a52015_r6_ad1]", "", "WindowsForms10.EDIT.app.0.1a52015_r6_ad12", $aSplt[2]) Case "BorderStyle" ControlFocus("[CLASS:WindowsForms10.Window.808.app.0.1a52015_r6_ad1]", "", "WindowsForms10.COMBOBOX.app.0.1a52015_r6_ad11") Switch $aSplt[2] Case "Solid" Send("s") Case "Dash" Send("sd") Case "Dot" Send("sdd") Case "DashDot" Send("sddd") Case "DashDotDot" Send("sdddd") EndSwitch Send("{ESC}") EndSwitch Send("{ESC}") EndSwitch EndFunc ;==>ShareXMenu ;----------------------------------------------------------------------------------------
    1 point
  5. ControlGetText('[CLASS:WindowsForms10.Window.20808.app.0.1a52015_r6_ad1]', '', '[CLASS:WindowsForms10.EDIT.app.0.1a52015_r6_ad11; INSTANCE:1]')
    1 point
  6. For the record, you aren't dealing with encryption. You are dealing with hashing. Hashing and encryption are different. You're welcome!
    1 point
  7. @JLogan3o13 I am curious as well, I've noticed that we sometimes get new users who need help with programming stuff which is not related to AutoIt at all. I wonder what makes them think this is a good place to ask for help here. I am assuming this isn't a spam post, if it is then it's a very elaborate setup. Kudos to the spammer who's doing such hard work
    1 point
  8. Lazycat

    Form Snap

    Very simple example, result of playing with new GUIRegisterMsg function. This is fasionable effect - form is snap to screen edges when moving. #include <GUIConstants.au3> Global Const $WM_WINDOWPOSCHANGING = 0x0046 Global Const $SPI_GETWORKAREA = 0x30 Global $nGap = 20, $nEdge = BitOR(1, 2, 4, 8); Left, Top, Right, Bottom $hGUI = GUICreate("Snapped window", 300, 200) GUIRegisterMsg($WM_WINDOWPOSCHANGING, "MY_WM_WINDOWPOSCHANGING") GUISetState() While 1 $GUIMsg = GUIGetMsg() Switch $GUIMsg Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func MY_WM_WINDOWPOSCHANGING($hWnd, $Msg, $wParam, $lParam) #cs HWND hwnd; HWND hwndInsertAfter; int x; int y; int cx; int cy; UINT flags; #ce Local $stRect = DllStructCreate("int;int;int;int") Local $stWinPos = DllStructCreate("uint;uint;int;int;int;int;uint", $lParam) DllCall("User32.dll", "int", "SystemParametersInfo", "int", $SPI_GETWORKAREA, "int", 0, "ptr", DllStructGetPtr($stRect), "int", 0) Local $nLeft = DllStructGetData($stRect, 1) Local $nTop = DllStructGetData($stRect, 2) Local $nRight = DllStructGetData($stRect, 3) - DllStructGetData($stWinPos, 5) Local $nBottom = DllStructGetData($stRect, 4) - DllStructGetData($stWinPos, 6) If BitAND($nEdge, 1) and Abs($nLeft - DllStructGetData($stWinPos, 3)) <= $nGap Then DllStructSetData($stWinPos, 3, $nLeft) If BitAND($nEdge, 2) and Abs($nTop - DllStructGetData($stWinPos, 4)) <= $nGap Then DllStructSetData($stWinPos, 4, $nTop) If BitAND($nEdge, 4) and Abs($nRight - DllStructGetData($stWinPos, 3)) <= $nGap Then DllStructSetData($stWinPos, 3, $nRight) If BitAND($nEdge, 8) and Abs($nBottom - DllStructGetData($stWinPos, 4)) <= $nGap Then DllStructSetData($stWinPos, 4, $nBottom) Return 0 EndFunc
    1 point
×
×
  • Create New...