CavaliereBianco Posted March 30, 2020 Posted March 30, 2020 Hi to all, i'm new to this language and i can't solve this problem (i've seen help files and old topic in forum but no solved my problem). I have this code: Global $tenChuongTrinh = "Extractor Studio IT - Versione Freeware" WinSetState ($tenChuongTrinh,"",@SW_MAXIMIZE) WinSetOnTop ( $tenChuongTrinh, "", 1 ) Sleep(3000) MouseMove(0.5*@DesktopWidth,0.376*@DesktopHeight) MouseClick('left') MouseClick('left') Send("{HOME}") $so_Lan_Lap = ControlGetText($tenChuongTrinh, "", '[CLASS:Static; INSTANCE:21]') FileDelete(@ScriptDir&'\text.txt') For $i = 1 To $so_Lan_Lap Step + 1 ClipPut("") Send("^c") Sleep(180) FileWriteLine(@ScriptDir&'\text.txt',ClipGet()) Sleep(260) Send("{DOWN}") Next The command ^c sometimes works, sometimes it doesn't and the file text.txt is empty. Is there another way to copy certainly the text? Thank you
Aelc Posted March 30, 2020 Posted March 30, 2020 (edited) i dont know that program but why dont use controlgettext for the copy? or other things to get the text out of control ^c is so unsual and just should be used in emergency Edited March 30, 2020 by Aelc why do i get garbage when i buy garbage bags?
alienclone Posted March 30, 2020 Posted March 30, 2020 add an extra 0 to that sleep time between send ctrl+c and filewrite If @error Then MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!") EndIf "Yeah yeah yeah patience, how long will that take?" -Ed Gruberman REAL search results | SciTE4AutoIt3 Editor Full Version
CavaliereBianco Posted March 30, 2020 Author Posted March 30, 2020 Thanks of reply, i try ControlGetText but don't work (or i make error) I try: For $i = 1 To $so_Lan_Lap Step + 1 ClipPut("") ;Send("^c") ControlGetText($tenChuongTrinh, "") Sleep(180) FileWriteLine(@ScriptDir&'\text.txt',ClipGet()) Sleep(260) Send("{DOWN}") Next But don't works. Here the Info whene select listview.
Aelc Posted March 30, 2020 Posted March 30, 2020 (edited) You didnt callled the control where the text should be read from. Controlgettext ( $tenChoungTrinh,"","RB_PANE7" ) Im not sure if it works because its a listview... maybe you have to delimiter the string after to get what you want additionally you have to get this to a variable and insert it instead of clipget() like this For $i = 1 To $so_Lan_Lap Step + 1 $txt = ControlGetText($tenChuongTrinh, "","RB_PANE7") FileWriteLine(@ScriptDir&'\text.txt',$txt) Send("{DOWN}") Sleep(180) Next btw. would be easier if i would have installed the program Edited March 30, 2020 by Aelc why do i get garbage when i buy garbage bags?
CavaliereBianco Posted March 30, 2020 Author Posted March 30, 2020 Thanks, i changed but don't works. The file txt that produced is empty.
Aelc Posted March 30, 2020 Posted March 30, 2020 yea i see it's because it's listview... i just downloaded it and trying to find solution. why do i get garbage when i buy garbage bags?
FrancescoDiMuro Posted March 30, 2020 Posted March 30, 2020 (edited) @Aelc If you think that's a ListView control, just try to grab the handle of it and use _GUICtrlListView_* functions to see if you can manage with those @CavaliereBianco Waiting for someone to solve your problems is never a good practice, first because you are going to be still unable to solve your problems yourself, and second, this is a Forum where we help people with their own script. Put some effort in solving your problem just to be grateful to yourself about what you have done. Does it sound good, doesn't it? Edited March 30, 2020 by FrancescoDiMuro Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette
Aelc Posted March 30, 2020 Posted March 30, 2020 (edited) @FrancescoDiMuro yes i tried but couldnt make it work it was a bit creepy i have never seen before... they safed the data because you have to pay to export it i guess but you can copy it anyway... i just could figure out a html code where i couldnt secure the raw data of the listview... i was hyped to finish it without Clipget anyway we got a solution by modifying his own script already done with PNs here the solution again: WinActivate ( $tenChuongTrinh ) WinWaitActive ( $tenChuongTrinh ) $so_Lan_Lap = ControlGetText($tenChuongTrinh, "", '[CLASS:Static; INSTANCE:21]') FileDelete(@ScriptDir&'\text.txt') ControlFocus ( $tenChuongTrinh, "",'[CLASS:RB_Pane; INSTANCE:7]' ) Send ("{CTRLDOWN}" ) For $i = 1 To $so_Lan_Lap Step + 1 Send ( "c" ) Sleep(30) Send("{DOWN}") FileWrite(@ScriptDir&'\text.txt',ClipGet() & @CRLF) Next Send ("{CTRLUP}" ) but you are right practice is necessary to improve Edited March 30, 2020 by Aelc FrancescoDiMuro 1 why do i get garbage when i buy garbage bags?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now