Fewmitz Posted October 6, 2007 Posted October 6, 2007 (edited) Thanks for the very valuable help guys. Because you know, nowhere in my post did it say that I was MAKING something illegal. Anyway. Say I have a text file, right? Maybe an essay, what have you. And if a part of it looks like this: This is how we do it I don't believe you Why not? Cause I said so Oh yes How could I copy from "I don't believe you" to "Cause I said so"? Edited October 6, 2007 by Fewmitz
DW1 Posted October 6, 2007 Posted October 6, 2007 wow dude, you say "keylogger" twice and "illegal" twice. Im sure you are aware that you can be banned for a post like this. Please modify your post quickly for your own sake. Not trying to be a dick here, just think you might not have been aware of this. AutoIt3 Online Help
aslani Posted October 6, 2007 Posted October 6, 2007 So if I knew part of the contents of the file, could I possibly set it to copy from one line to another?Yes you can, it's possible.Could I just change the function above to copy from "this is the beginning" to "This is the End"?You could if you want. [font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version
Valuater Posted October 6, 2007 Posted October 6, 2007 In a previous threadhttp://www.autoitscript.com/forum/index.ph...st&p=408089 I decompiled it from an exeI found out (once again thanks to one of the members on here) that when it was decompiled, an external script, hence the "file instal" at the beginning. To get this file I need to, apparently And I have an idea of what this means, but no idea how to do it..... andYes, it is.There is historically very little sympathy on this forum for people trying to decompile and rework the scripts of others. I agree with salty and dan!!!8)
Fewmitz Posted October 6, 2007 Author Posted October 6, 2007 (edited) In a previous threadhttp://www.autoitscript.com/forum/index.ph...st&p=408089 .... andI agree with salty and dan!!!8)IT's good to know you actually tracked my posts in order to undermine me.I wasn't making a keylogger, I was trying to make it...not a keylogger, ergo, I wasn't breaking any rules. Edited October 6, 2007 by Fewmitz
DW1 Posted October 6, 2007 Posted October 6, 2007 "How could I copy from "I don't believe you" to "Cause I said so"? " do you know the lines "I don't believe you" and "Cause I said so" -OR- are you copying from Line X to Line Y? AutoIt3 Online Help
DW1 Posted October 6, 2007 Posted October 6, 2007 The following assumes you have a file named "textfile.txt" on the root of C:\ with the following contents: This is how we do it I don't believe you Why not? Cause I said so Oh yesIf you knew that you wanted take everything before the line "Oh yes", This would work:expandcollapse popup#include <GuiConstants.au3> #include <File.au3> Opt("GUIOnEventMode", 1 ) GuiCreate("MyGUI", 200, 250,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Read = GuiCtrlCreateButton("Read C:\textfile.txt", 10, 20, 180, 80) GUICtrlSetOnEvent(-1, "_readfile" ) $Edit1 = GUICtrlCreateEdit( "", 0, 100, 200, 150) GuiSetState() While 1 Sleep(10) WEnd Func _readfile() $file = "C:\textfile.txt" $fileh = FileOpen($file, 0 ) $string = "" For $avar = 1 to _FileCountLines( $file ) ; if you are just wanted a certain number of lines you can set that here $line = FileReadLine( $fileh, $avar ) If $line = "Oh yes" Then ExitLoop Else $string = $string & $line & @CRLF EndIf Next FileClose( $fileh ) GUICtrlSetData( $Edit1, $string ) EndFuncoÝ÷ Øò¢é'{ajܨ»§µçew¶bæ-éí+0¢é]Âäjëh×6#include <GuiConstants.au3> #include <File.au3> Opt("GUIOnEventMode", 1 ) GuiCreate("MyGUI", 200, 250,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Read = GuiCtrlCreateButton("Read C:\textfile.txt", 10, 20, 180, 80) GUICtrlSetOnEvent(-1, "_readfile" ) $Edit1 = GUICtrlCreateEdit( "", 0, 100, 200, 150) GuiSetState() While 1 Sleep(10) WEnd Func _readfile() $file = "C:\textfile.txt" $fileh = FileOpen($file, 0 ) $string = "" $x = 1 $y = 4 For $avar = $x to $y $line = FileReadLine( $fileh, $avar ) $string = $string & $line & @CRLF Next FileClose( $fileh ) GUICtrlSetData( $Edit1, $string ) EndFuncoÝ÷ Øò¢é'{ajܨ»§µç^½êò¶§·Á秪ê-!Ú'ßÛ[zX½ì¨º«¨µ©Ýªê- «¬xÛ(ªê-N¬Â¥w +«¢+Ø¥¹±Õ±ÐíÕ¥ ½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±Ðí¥±¹ÔÌÐì)=ÁÐ ÅÕ½ÐíU%=¹Ù¹Ñ5½ÅÕ½Ðì°Ä¤)U% ÉÑ ÅÕ½Ðí5åU$ÅÕ½Ðì°ÈÀÀ°ÈÔÀ°´Ä°´Ä° ¥Ñ=H ÀÌØí]M}=YI1AA]%9=°ÀÌØí]M} 1%AM% 1%9L¤¤((ÀÌØíIôU% Ñɱ ÉÑ ÕÑѽ¸ ÅÕ½ÐíIèÀäÈíÑáÑ¥±¹ÑáÐÅÕ½Ðì°ÄÀ°ÈÀ°ÄàÀ°àÀ¤)U% ÑɱMÑ=¹Ù¹Ð ´Ä°ÅÕ½Ðí}É¥±ÅÕ½Ðì¤(ÀÌØí¥ÐÄôU% Ñɱ ÉѥРÅÕ½ÐìÅÕ½Ðì°À°ÄÀÀ°ÈÀÀ°ÄÔÀ¤)U%MÑMÑÑ ¤)]¡¥±Ä(%M±À ÄÀ¤)]¹()Õ¹}É¥± ¤($ÀÌØí¥±ôÅÕ½ÐíèÀäÈíÑáÑ¥±¹ÑáÐÅÕ½Ðì($ÀÌØí¥± ô¥±=Á¸ ÀÌØí¥±°À¤($ÀÌØíÍÑÉ¥¹ôÅÕ½ÐìÅÕ½Ðì($ÀÌØí±ôÀ(%½ÈÀÌØíÙÈôÄQ¼}¥± ½Õ¹Ñ1¥¹Ì ÀÌØí¥±¤($$ÀÌØí±¥¹ô¥±I1¥¹ ÀÌØí¥± °ÀÌØíÙȤ($%%ÀÌØí±¥¹ôÅÕ½Ðí$½¸Ìäíб¥Ùå½ÔÅÕ½Ðì=ÈÀÌØí±ôÄQ¡¸($$$ÀÌØí±ôÄ($$$ÀÌØíÍÑÉ¥¹ôÀÌØíÍÑÉ¥¹µÀìÀÌØí±¥¹µÀì I1($$%%ÀÌØí±¥¹ôÅÕ½Ðí ÕÍ$ͥͼÅÕ½ÐìQ¡¸á¥Ñ1½½À($%¹%(%9áÐ(%¥± ±½Í ÀÌØí¥± ¤(%U% ÑɱMÑÑ ÀÌØí¥ÐİÀÌØíÍÑÉ¥¹¤)¹Õ¹ìôôÐí}É¥± AutoIt3 Online Help
Fewmitz Posted October 6, 2007 Author Posted October 6, 2007 The last one was the one I meant, sorry for not being clearer.
Fewmitz Posted October 6, 2007 Author Posted October 6, 2007 Okay cool, that worked great, but now I have another question: If I had those lines buried in a text file in a random place on my computer, is there a way to search the computer for them? Like, for example, if I knew that the text file was in a folder called "potato", but it might be in one of the folders in "Potato". is there a function to search through that folder to find the text file?
Moderators SmOke_N Posted October 6, 2007 Moderators Posted October 6, 2007 _FileListToArray() + FileGetAttrib() to make sure it's a Directory... Possibly even _PathSplit() if you want to separate the Directories... but I don't think that would be necessary. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Fewmitz Posted October 6, 2007 Author Posted October 6, 2007 (edited) I'll have to look into that, but I was actually lying, cause I have another question. What I need to do now is take some text, and make a text file with this text in it. I looked around and couldn't find anything useful, so does anyone here know how to do it? Edited October 6, 2007 by Fewmitz
Moderators SmOke_N Posted October 6, 2007 Moderators Posted October 6, 2007 I'll have to look into that, but I was actually lying, cause I have another question.What I need to do now is take some text, and make a text file with this text in it. I looked around and couldn't find anything useful, so does anyone here know how to do it?Keep looking... kind of obvious questions... it's becoming apparent you aren't trying very hard. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Fewmitz Posted October 6, 2007 Author Posted October 6, 2007 (edited) Keep looking... kind of obvious questions... it's becoming apparent you aren't trying very hard.Or I'm trying hard, just looking in the wrong place.Edit: Nevermind, I'm just dumb >_> Edited October 7, 2007 by Fewmitz
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