Jump to content

yasuo

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

yasuo's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. OMG sorry 😂😂😂
  2. https://www.autohotkey.com/docs/commands/SetTitleMatchMode.htm also the Help is not very helpful, it should be updated. PS: sorry for gravedigging
  3. Hi there, i cannot get this to work, it will recognize the upper Letters (example pictures are different) but not the lowers. The correct part of the screen is being captured (checked the image file) but it does not recocnize the button texts... Also tried scaling from 1-8... #include <Tesseract.au3> $g_szVersion = "IchBinDa" If WinExists($g_szVersion) Then Exit ; It's already running AutoItWinSetTitle($g_szVersion) $win_title="App Window Name" $left_indent = 30 $top_indent = 130 $right_indent = 300 $bottom_indent = 390 $pad_left = 150 $pad_top = 230 $pad_right = 220 $pad_bottom = 240 $padA_scale = 2; try1 $padA_left = 180 $padA_top = 250 $padA_right = 350 $padA_bottom = 400 $padA_scale = 4; try2 $padA_left = 160; einfach doppelte Zahl? $padA_top = 220 $padA_right = 350 $padA_bottom = 405 $padA_scale = 8; try3 $padA_left = 147; einfach doppelte Zahl? $padA_top = 202 $padA_right = 344 $padA_bottom = 400 $padA_scale = 1; try4 $padA_left = 240 $padA_top = 350 $padA_right = 345 $padA_bottom = 390 $temp_path= 'C:\tmp' _TesseractTempPathSet($temp_path) $win_text = "" $get_last_capture = 0 $delimiter = "" $cleanup = 0 $scale = 2 $show_capture = 0 WinActivate($win_title) $txt="" $PIN=_TesseractWinCapture($win_title, $win_text, $get_last_capture, $delimiter, $cleanup, $scale, $left_indent, $top_indent, $right_indent, $bottom_indent, $show_capture) ;MsgBoxx($PIN) $txt="Pin: '" & $PIN & "'(mit Zeilenumbruch)" &@CRLF $PAD=_TesseractWinCapture($win_title, $win_text, $get_last_capture, $delimiter, $cleanup, $scale, $pad_left, $pad_top, $pad_right, $pad_bottom, $show_capture) ;MsgBoxx($PAD) $PAD_A=_TesseractWinCapture($win_title, $win_text, $get_last_capture, $delimiter, $cleanup, $padA_scale, $padA_left, $padA_top, $padA_right, $padA_bottom, $show_capture) $txt=$txt & " $PAD_A: '" & $PAD_A & "'" &@CRLF &"Pad: '" &$PAD &"'" WinActivate($g_szVersion) MsgBoxx($txt); func MsgBoxx($msgboxx_msg) MsgBox(0, $g_szVersion, $msgboxx_msg) EndFunc unrecognized_part.tif tesseract ver: https://jztkft.dl.sourceforge.net/project/tesseract-ocr-alt/tesseract-ocr-setup-3.02.02.exe
  4. thanks for your ideas, but its not yet the solution the batch is not the problem (you can use removedrive.exe or maybe devcon.exe), but as long the program runs from the same drive you cannot safely eject. I also would avoid ejecting forcefully too often. hmm deleting is an idea but "delete on exit" will not work in case the machine stops unexpected etc. etc. deleting while its running is not possible normally can i end the handle without stopping the program?
  5. Hi there, i have a script wich runs from USB, sometimes i will remove the USB after the script is startet, actually i even want to remove it using the script itself. But windows will refuse ejecting the USB since the script is running from it and there is an open handle. The common "resolution" is to copy the script to $temp and re-run it from there, but i dont want to copy my script for security reasons and i dont like filling up $temp. Is there another way to end the script's handle or even to preload it completely into memory? greetings
  6. Hi there, i want to eject the USB Drive my script is running from, i guess is will requirey to detect and close the handle of @ScriptFullPath. however, for the beginning i will focus on the eject, wich deos not work on my win7 ent.: #include <ejectUSB.lib.au3> #NoTrayIcon #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 ;;;EXAMPLE Global $drive = InputBox("Eject Drive", "Enter drive (letter only):", "", " M1", 200, 130) If @error Then Exit $drive = StringUpper(StringLeft($drive, 1)) If Not FileExists($drive & ":") Then MsgBox(0 + 16, "Error", "Drive not found.") Exit EndIf Global $driveInfo[9] = ["Device Number", "Drive Type", "DOS Device Name", "Device Path", "Device ID", "Device Instance", "Device Instance Parent", _ "Parent Device ID", "IsRemovable"] Global $driveArray = _QueryDrive($drive) For $i = 0 To UBound($driveArray) - 1 ConsoleWrite("-" & $driveInfo[$i] & ": " & $driveArray[$i] & @CRLF) Next ConsoleWrite("-Is USBHDD: " & _IsUSBHDD($driveArray) & @CRLF) If (6 = MsgBox(4 + 32, "Eject?", "Eject this drive?")) Then ConsoleWrite("Ejecting drive <" & $drive & ":> - " & _QueryDrive($drive, True) & @CRLF) If (6 = MsgBox(4 + 32, "Restart?", "Restart this drive?")) Then ConsoleWrite("Restarting drive <" & $drive & ":> - " & _RestartDrive($driveArray) & @CRLF) >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "P:\OC\autoit\conti\ejectUSB.au3" /UserParams +>13:09:33 Starting AutoIt3Wrapper v.14.801.2025.0 SciTE v.3.4.4.0 Keyboard:00000407 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409) +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper >Running AU3Check (3.3.12.0) params:-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 from:C:\Program Files (x86)\AutoIt3 input:P:\OC\autoit\conti\ejectUSB.au3 +>13:09:33 AU3Check ended.rc:0 >Running:(3.3.12.0):C:\Program Files (x86)\AutoIt3\autoit3.exe "P:\OC\autoit\conti\ejectUSB.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop -Device Number: 1 -Drive Type: 2 -DOS Device Name: \Device\HarddiskVolume5 -Device Path: \\?\usbstor#disk&ven_jetflash&prod_transcend_16gb&rev_8.01#7q9wxdi5&1#{53f56307-b6bf-11d0-94f2-00a0c91efb8b} -Device ID: 2172 -Device Instance: -Device Instance Parent: -Parent Device ID: -IsRemovable: -Is USBHDD: False "P:\OC\autoit\conti\ejectUSB.lib.au3" (281) : ==> Variable used without being declared.: $res = DllCall("setupapi.dll", "dword", "CM_Query_And_Remove_SubTreeW", "dword", $DevInstParent, "dword*", 0, "wstr", "", "ulong", 260, "ulong", $CM_REMOVE_UI_OK) $res = DllCall("setupapi.dll", "dword", "CM_Query_And_Remove_SubTreeW", "dword", ^ ERROR ->13:09:36 AutoIt3.exe ended.rc:1 +>13:09:36 AutoIt3Wrapper Finished. >Exit code: 1 Time: 4.048 any idea?
×
×
  • Create New...