
lordsocke
Active Members-
Posts
72 -
Joined
-
Last visited
Everything posted by lordsocke
-
For beeing honestly Ive never worked with powershell, so I can edit the Autoit script from francesco so that its going to work out for me, but im not able to understand the powershell If you got the time to explain it to me or sending me a link where is written what this actually does, lots of hugs
-
Here I wrote total bullshit: "Looks very nice, but some of the files got the name 54816382648173 so I think counting up the for loop will crash my CPU 😄. " The script is working fine, but it is creating new folders containing the files. Actually I have to sort them into existing folders in the same path as the source files. Desktop/foldername/ <- here is everything inside (files and folders in the same path) 345678-2019-06-06-philipp.pdf <- sorting this 345678-2019-06-06-philipp.doc <- sorting this 345678-2019-06-06-philipp.txt <- sorting this 345678-2019-06-06-philipp_Folder <- into this folder 345234-2019-07-04-tom.pdf 345234-2019-07-04-tom.doc 345234-2019-07-04-tom.txt 345234-2019-07-04-tom_Folder 824567890-2018-02-20-melanie.pdf 824567890-2018-02-20-melanie.doc 824567890-2018-02-20-melanie.txt ...and so on
-
I want to find all 123 files and want to move them to „123“ folder :D
-
Hey all, currently I have to sort thousand of files like this: 123A.pdf 123Abc.doc 123Aaz.txt 321Aaffas.pdf 321Asdf.doc 321Aas.txt 213eq.pdf 213lvgs.doc 213sgd.txt to folders like this: 123 Folder 321 Folder 213 Folder So basicly the files and the folders (where the files should be placed) got the same number in the front. The rest can be different. Any Ideas which ist a smart way of doing it? If not any Ideas? edit: all files and folders are stored in one folder. File names (numbers at the front) reaching from 1000000-XXX000000. Also included Ä Ü Ö (im german) best regards
-
Hi there, I´m working at university on a big data analysis, about price development of used cars. My source for that shold come from mobile.de (a german marketplace for cars). When im trying to read out HTML, im getting an error message "acces denied for automated requests" does anybody knows a workaround? For sure ive contaced the shown support for getting legal access to the data. But it would be nice to use the day and start my searches today
-
google OCR response string
lordsocke replied to lordsocke's topic in AutoIt General Help and Support
Thanks a lot!!! -
Hi there, Im using the google OCR textdetection. In the response I want to take out just all the written text. The response is coming like this: "text": "t" } ] } ] } ], "blockType": "TEXT" } ] } ], "text": "I´m the wanted\npart, of, the, respons\n1\nI´m the wanted part of the respons 2\nI´m the wanted part of the respons 3\nI´m the wanted part of the respons 4\n" } } ] } or "text": "g" } ] } ] } ], "blockType": "TEXT" } ] } ], "text": "I´m the wanted\npart of\nthe respons 1?\nI´m the wanted part of the respons 2\nI´m the wanted part of the respons 3\I´m the wanted part of the respons 4\n" } } ] } or "text": "h" } ] } ] } ], "blockType": "TEXT" } ] } ], "text": "I´m the wanted part of the\nresponse 1?\nI´m some unwanted crap\nI´m the wanted part of the respons 2\I´m the wanted part of the respons 3\nI´m the wanted part of the respons 4\n" } } ] } These are some examples how the respond parts can look like. My problem, that I just want a way that I only get the marked parts in this way. $string1 = I´m the wanted part of the respons 1 $string2 = I´m the wanted part of the respons 2 $string3 = I´m the wanted part of the respons 3 $string4 = I´m the wanted part of the respons 4 So what is changing: variable number of wordwraps (\n) the length of every string can be between 1 and 99 between part1 and part2 can be some unwanted shit (looks always the same) Thanks for everybody, I know this looks totally wired. Is there maybe a function that can just deliver the recived text as so many strings as wordwraps are in there?
-
_stringbetween empty string
lordsocke replied to lordsocke's topic in AutoIt General Help and Support
looks sweet, but it is not fixing the problem... :-( -
Hey there, $string2 = "59?\nHello\nAutoit\nWorld\n", $string4 = _StringBetween($string2,"\n","\n") @error MsgBox(0,"_StringBetween Error",@error) MsgBox(0,$string4,$string4) UBound($string4) @error MsgBox(0,"Ubound Error",@error) this is making me a serious headach. It it always delivering me a empty string, and say´s that it finds the string. Any Ideas?
-
_stringbetween non-accessible variable
lordsocke replied to lordsocke's topic in AutoIt General Help and Support
Tanks for that, im going to test! About the second, I thougth so as well, but it worked -
Hey there, in my script, im using _stringbetween, to look for parts of strings. If the string was not found, it always says "non-accessible variable" and closes. Any Ideas? I just want it to exit the function and bring the user back to the start of the script. $string3 = _StringBetween($text,":","\n") $string3 = ($string3[0]) if @error then GUICtrlSetData($Edit1, "Error: No readable content "& @CrLf ,1) Exit Else $stringlen = StringLen($string3) $text = StringTrimLeft($text,$stringlen) EndIf
-
thanks!
-
But the Thing is, that I need to keep the \n inside the code.
-
Hey there, my code: Global $res = StringRegExp($text,"\n", 3) If @error Then $nbOccurencesn = 0 Else $nbOccurencesn = UBound($res) Endif ConsoleWrite(@crlf&$nbOccurencesn&@crlf) is not delivering any hits in the string: "Which Reese Witherspoon movie\nhas gotten a Broadway musical\nadaptation?\nElection\nWalk the Line\nLegally Blonde\n" any Ideas what im making wrong?
-
Stringregex between pattern´s
lordsocke replied to lordsocke's topic in AutoIt General Help and Support
looks pretty, thanks for you both! I´m just to retarded for this -
Hey there, I´m struggling around for an hour now to figure out, how to cut a simple string between 2 words in a google response. It looks like this: "description": "Im a string and I don´t know how long I can be!", "boundingPoly": { I want to use a Stringrex. My bad try looks like this: $aResult = StringRegExp ($sOutput,"(?i)(?s)(\Q) description(.*?) boundingPoly(\E)",3) But this seems to be on a totaly wrong way. Thanks for everybody!
-
hey there, this part of my program: ;Base64func _ScreenCapture_Capture(@DesktopDir&"\OCR.png",1241, 226,1619, 348) $FN = ("C:\Users\Username\Desktop\OCR.png") $dat=FileRead(FileOpen($FN,16)) $objXML=ObjCreate("MSXML2.DOMDocument") $objNode=$objXML.createElement("b64") $objNode.dataType="bin.base64" $objNode.nodeTypedValue=$dat $sImage = ($objNode.Text) is changing a screenshot into a base64 string. On my computer (win7 desktop pc) it is working totaly fine. On the computer of a friend (win10) it is delivering a empty string. For sure noone can actually solve the problem because I think the code is right but maybe someone got the same thing happen
-
Hey there, im using a little skript to let the user select an area where a screenshot is going to be taken. On my computer (1920x1080) it works fine. When im testing it on my macbook (13" late 2017) the cordinates are really low. Like the rectangle is drawn in the middle of the desktop but the cords which are save are like 300-400. So i thougth thats maybe a problem with bootcamp on the macbook. So I sended the tool to a freind asking him to check it out. he got the same issue. (ACER 4k Notebook) Any ideas? FileDelete(@ScriptDir & "\cords.txt") Local $aMouse_Pos, $hMask, $hMaster_Mask, $iTemp Local $UserDLL = DllOpen("user32.dll") ; Create transparent GUI with Cross cursor $hCross_GUI = GUICreate("Test", @DesktopWidth, @DesktopHeight - 20, 0, 0, $WS_POPUP, $WS_EX_TOPMOST) WinSetTrans($hCross_GUI, "", 8) GUISetState(@SW_SHOW, $hCross_GUI) GUISetCursor(3, 1, $hCross_GUI) Global $hRectangle_GUI = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST) GUISetBkColor(0x000000) ; Wait until mouse button pressed While Not _IsPressed("01", $UserDLL) Sleep(10) WEnd ; Get first mouse position $aMouse_Pos = MouseGetPos() $iX1 = $aMouse_Pos[0] $iY1 = $aMouse_Pos[1] ; Draw rectangle while mouse button pressed While _IsPressed("01", $UserDLL) $aMouse_Pos = MouseGetPos() $hMaster_Mask = _WinAPI_CreateRectRgn(0, 0, 0, 0) $hMask = _WinAPI_CreateRectRgn($iX1, $aMouse_Pos[1], $aMouse_Pos[0], $aMouse_Pos[1] + 1) ; Bottom of rectangle _WinAPI_CombineRgn($hMaster_Mask, $hMask, $hMaster_Mask, 2) _WinAPI_DeleteObject($hMask) $hMask = _WinAPI_CreateRectRgn($iX1, $iY1, $iX1 + 1, $aMouse_Pos[1]) ; Left of rectangle _WinAPI_CombineRgn($hMaster_Mask, $hMask, $hMaster_Mask, 2) _WinAPI_DeleteObject($hMask) $hMask = _WinAPI_CreateRectRgn($iX1 + 1, $iY1 + 1, $aMouse_Pos[0], $iY1) ; Top of rectangle _WinAPI_CombineRgn($hMaster_Mask, $hMask, $hMaster_Mask, 2) _WinAPI_DeleteObject($hMask) $hMask = _WinAPI_CreateRectRgn($aMouse_Pos[0], $iY1, $aMouse_Pos[0] + 1, $aMouse_Pos[1]) ; Right of rectangle _WinAPI_CombineRgn($hMaster_Mask, $hMask, $hMaster_Mask, 2) _WinAPI_DeleteObject($hMask) ; Set overall region _WinAPI_SetWindowRgn($hRectangle_GUI, $hMaster_Mask) If WinGetState($hRectangle_GUI) < 15 Then GUISetState() Sleep(10) WEnd ; Get second mouse position $iX2 = $aMouse_Pos[0] $iY2 = $aMouse_Pos[1] GUIDelete($hRectangle_GUI) GUIDelete($hCross_GUI) DllClose($UserDLL) ConsoleWrite($iX1&" "&$iY1&" "&$iX2&" "&$iY2&" ") FileOpen(@ScriptDir & "\cords.txt", 1) FileWriteLine(@ScriptDir & "\cords.txt",$iX1&@CRLF&$iY1&@CRLF&$iX2&@CRLF&$iY2) FileClose("cords.txt")
-
got it running tasty guys thanks a lot <3
-
looks sweet thank u
-
So if im pressing (X) it should go back to the first GUI basicly into the first loop
-
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 613, 430, 192, 132) $Button1 = GUICtrlCreateButton("Button1", 48, 48, 137, 57) $Button2 = GUICtrlCreateButton("Button2", 208, 48, 161, 57) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(0,"Hello","Hello") Case $Button2 $Form1 = GUICreate("Form1", 613, 430, 192, 132) $Button3 = GUICtrlCreateButton("Button1", 48, 48, 137, 57) $Button4 = GUICtrlCreateButton("Button2", 208, 48, 161, 57) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button3 MsgBox(0,"Hello","Hello") EndSwitch WEnd EndSwitch WEnd
-
Hey there, I wrote a program which contains a GUI where the user is able to click on several buttons. With a click on my "settings" button, the user is able to open a new GUI where he can click on some more buttons. My problem is, that after a click in the "settings" GUI it is not possible to get back to the first GUI and continue using the program. You have to restart the wohle program. Does anyone knows this problem? Thanks for answer #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 613, 430, 192, 132) $Button1 = GUICtrlCreateButton("Button1", 48, 48, 137, 57) $Button2 = GUICtrlCreateButton("Button2", 208, 48, 161, 57) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(0,"Hello","Hello") Case $Button2 $Form1 = GUICreate("Form1", 613, 430, 192, 132) $Button3 = GUICtrlCreateButton("Button1", 48, 48, 137, 57) $Button4 = GUICtrlCreateButton("Button2", 208, 48, 161, 57) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button3 MsgBox(0,"Hello","Hello") EndSwitch WEnd EndSwitch WEnd
-
looks pretty, thanks a los im going to test tomorrow
-
Thanks for that, but I dont think its gonna be fast enough for me... the skript is 0.8sec for now per runtime