Jump to content

Kyler Carlson

Active Members
  • Posts

    73
  • Joined

  • Last visited

Everything posted by Kyler Carlson

  1. Sleep(5000) Dim $count = "" Dim $result = "" Dim $chat $text = WinGetText("") $lines = StringSplit($text,@LF) for $i = 1 to $lines[0] if StringInStr($lines[$i], "lol") then $lol = 0 For $times = 1 to 100 $string = StringInStr($lines[$i] ,"lol",0, $times) If $string <> 0 Then $lol = $lol + 1 EndIf Next $username = stringsplit($Lines[$i]," ") If $username[1] = "" Then $username[1] = $username[2] Do If $lol > 0 Then $count = $count & $username[1] & " " $lol = $lol - 1 Until $lol = 0 endif next do $username = stringsplit($count," ") $count = stringreplace($count, $username[1],"") If @extended <> "" Then $result = $result & $username[1] & " said lol " & @extended & " times." & @CRLF $count = StringStripWS($count,7) until $username[0] = 1 msgbox(0,"Result", $result) okay, this is what i'm using now. Its basically based off of florisch's code with some bug fixes and support for multiple "lol"'s in a line. Thanks guys and sry if i made you angry at all /dev/null, I was just verrryy confused about why that mine wasn't working when others were. I knew i was doing something wrong but wasn't sure and yes i had been testing them... understanding them was an issue however which is why i kept asking for help. anyway, thatsk again everybody for all of your help.
  2. okay thanks for all of the responese, they are all doing atleast some of what i want them to. To answer JS's questions, I'm getting the text my recording the window text (wingettext) but this really isn't the best way i know because it could have false positives if i was looking at a webpage or something. I am willing to do some testing but not a huge amount. I would really love it if it was possible to get the usernames aoutmatically because, yes, i will be in chat rooms with multiple people chatting at once. Back on the subject of how to obtain the text in the chat room. I'm using AIM and i haven't managed to get any of the control read functions to work. does anyone else have an idea how to do this or an alternative to getting the text of the entire window? thanks for all of the help already guys btw.
  3. okay basically, i want to keep track of how many times that my different friends say "lol" in a chat program. I can do everything except for pick the word out of the chat screen. Say that $text is all of the text in the conversation and that this is the conversation. User1 [10:17 P.M.]: hah yes i'm doing fine lol User2 [10:18 P.M.]: thats good User1 [10:18 P.M.]: ya it is User2 [10:18 P.M.]: lol User1 [10:18 P.M.]: lol how dould i pull from that that user one has said "lol 2 times and that user2 has said "lol 1 time? I can do the rest but this part is really confusing me. Thanks for any help
  4. anyone know if this is even possible to do? Even if you don't know how to or don' want to write a script for me can you atleast tell me that?
  5. okay... my school has gotten smart to autoit and they are using something called rogue process manager to block any application that wasn't launched by the application launcher (and thus has a different parent PID). This prolly is making me sound like a bad guy... but i'm not. I just want to run a few games durring some of my more boring classes but thats being blocked now so i'm trying to find a way around it. Also, the process manager checks every 3 seconds for rogue processes so there will be time to load an autoit program and have it do something.
  6. Is it possible to change the parent PID of an application after it loads? If not, is it possible to make it so that a process will load with with a different Parent PID than the one that it would use on default? If this is possible, does anyone know if its possible to do in Autoit? Help is very appreciated on this. Thanks.
  7. okay thanks but... why isn't it working... like why arent the variables registering as being 1 to stop them from repeating that question?
  8. okay heres my code... Global $count = 1 Global $correct1 Global $correct2 Global $correct3 Global $correct4 Global $correct5 Global $correct6 Global $correct7 Global $correct8 Global $correct9 Global $correct10 Global $correct11 Global $correct12 Global $correct13 Global $correct14 ;### Words ### $word_1 = "Pala" $word_2 = "Anteojos" $word_3 = "Huevo" $word_4 = "Maiz" $word_5 = "Tamano" $word_6 = "Tortuga" $word_7 = "Desvan" $word_8 = "Abeja" $word_9 = "Pulsera" $word_10 = "Ninguna Parte" $word_11 = "Alguna parte" $word_12 = "Cajon" $word_13 = "Mojarse" $word_14 = "Imperdible" ;### Defenitions ### $def_1 = "Spade" $def_2 = "Glasses" $def_3 = "Egg" $def_4 = "Corn" $def_5 = "Size" $def_6 = "Turtle" $def_7 = "Attic" $def_8 = "Bumble Bee" $def_9 = "Bracelet" $def_10 = "Nowhere" $def_11 = "Somewhere" $def_12 = "Drawer" $def_13 = "To Wet" $def_14 = "Pin" HotKeySet("{F1}","start") HotKeySet("{esc}","exit1") While 1 sleep(100) WEnd Func start() $num = Round(Random(0.5,14.5),0) Do If $num = 1 And $correct1 = 0 Then word($word_1,$def_1) MsgBox(0,"",$correct1) ElseIf $num = 2 And $correct2 = 0 Then word($word_2,$def_2) MsgBox(0,"",$correct2) ElseIf $num = 3 And $correct3 = 0 Then word($word_3,$def_3) MsgBox(0,"",$correct3) ElseIf $num = 4 And $correct4 = 0 Then word($word_4,$def_4) MsgBox(0,"",$correct4) ElseIf $num = 5 And $correct5 = 0 Then word($word_5,$def_5) MsgBox(0,"",$correct5) ElseIf $num = 6 And $correct6 = 0 Then word($word_6,$def_6) MsgBox(0,"",$correct6) ElseIf $num = 7 And $correct7 = 0 Then word($word_7,$def_7) MsgBox(0,"",$correct7) ElseIf $num = 8 And $correct8 = 0 Then word($word_8,$def_8) MsgBox(0,"",$correct8) ElseIf $num = 9 And $correct9 = 0 Then word($word_9,$def_9) MsgBox(0,"",$correct9) ElseIf $num = 10 And $correct10 = 0 Then word($word_10,$def_10) MsgBox(0,"",$correct10) ElseIf $num = 11 And $correct11 = 0 Then word($word_11,$def_11) MsgBox(0,"",$correct11) ElseIf $num = 12 And $correct12 = 0 Then word($word_12,$def_12) MsgBox(0,"",$correct12) ElseIf $num = 13 And $correct13 = 0 Then word($word_13,$def_13) MsgBox(0,"",$correct13) ElseIf $num = 14 And $correct14 = 0 Then word($word_14,$def_14) MsgBox(0,"",$correct14) Else $num = Round(Random(0.5,14.5),0) EndIf Until $correct1 = 1 And $correct2 = 1 And $correct3 = 1 And $correct4 = 1 And $correct5 = 1 And $correct6 = 1 And $correct7 = 1 And $correct8 = 1 And $correct9 = 1 And $correct10 = 1 And $correct11 = 1 And $correct12 = 1 And $correct13 = 1 And $correct14 = 1 EndFunc Func word($word,$def) $ans = InputBox("Spanish Papelles Bancos",$def,"") If $ans = $word Then If $count = 1 Then $correct1 = 1 ;MsgBox(0,"",$correct1) EndIf If $count = 2 Then $correct2 = 1 ;MsgBox(0,"",$correct2) EndIf If $count = 3 Then $correct3 = 1 ; MsgBox(0,"",$correct3) EndIf If $count = 4 Then $correct4 = 1 ;MsgBox(0,"",$correct4) EndIf If $count = 5 Then $correct5 = 1 ;MsgBox(0,"",$correct5) EndIf If $count = 6 Then $correct6 = 1 ;MsgBox(0,"",$correct6) EndIf If $count = 7 Then $correct7 = 1 ;MsgBox(0,"",$correct7) EndIf If $count = 8 Then $correct8 = 1 ;MsgBox(0,"",$correct8) EndIf If $count = 9 Then $correct9 = 1 ;MsgBox(0,"",$correct9) EndIf If $count = 10 Then $correct10 = 1 ;MsgBox(0,"",$correct10) EndIf If $count = 11 Then $correct11 = 1 ;MsgBox(0,"",$correct11) EndIf If $count = 12 Then $correct12 = 1 ;MsgBox(0,"",$correct12) EndIf If $count = 13 Then $correct13 = 1 ;MsgBox(0,"",$correct13) EndIf If $count = 14 Then $correct14 = 1 ;MsgBox(0,"",$correct14) EndIf Global $num = Round(Random(0.5,14.5),0) $count = $count + 1 MsgBox(0,"Correct",$def & " : " & $word) Else MsgBox(0,"Incorrect",$def & " : " & $word) EndIf EndFunc Func exit1() Exit EndFunc it you run it, it will pop up a random word that i'm studying for for my spanish test... the problem is that its repeating the words even after you've spelt them right... say it has "spade" as the first thing to spell... you type in "pala", the right answer... it should then be setting $correct1 = 1 but when my little debug message pops up that tells you what $correct1 really equals... it doesn't register that it should equal one and thus repeates things u've already spelt right... anyone know why because help is greatly appreciated and time is of the essence since the test is tomorrow... also... please don't tell me to study the old fashioned way... ik that that would b better since this isn't a functioning program yet but... u don't need to remind me... thanks in advance
  9. I really am not having luck searching google so i think i'll ask you cuys. Whats the formula to fin the angle that 3 points make... like say i have point A, B, and C somewhere on my desktop... how can i determine the angles of them? thanks in advance.
  10. not completely understanding you but... would this work? @UserName ----- ID of the currently logged on user.
  11. hmm... i'm having one main problem with using the richtext. Is there like a prefix that will make text after it be effected. As a hypothetical example, lets say I wanted to make the text "This is a test" be red. Could I put it in <red> "This is a test" <\red> tags and make it red. I'm pretty sure just doing that wouldn't work but is there a similar system for setting colors i could use because right not i'm using " $font_color = _ChooseColor(0,0,1) $oRP.SelColor = $font_color" but you have to select the text to change its color. I want a way to only set the color of some text but not have to select it and have it automatically be colored (hope that makes sense). If there is like a readme for the richtext thing i'm using, could someone please point me to it?
  12. been trying to modify an example i found in the help file using RICHTEXT. Some luck so far but I think I'll be able to get it to work with some more tinkering. Thanks.
  13. Hey guys, A quick question before I head off to church. How would I change the text color of only parts of a inputbox on a gui? For example, I'm making a chat program. I want the messages that say somebody had joined or left the channel to be red instead of the normal black that the rest of the text is , but I want the rest of the type to still be black. This all has to be done in one inputbox so I am really unsure how to do this. If there was a way to have something like GUICtrlSetColor set the color of maybe just a certain line of the inputbox or just some of the text, I would love to know it. Thanks.
  14. k i plan on making my own remote desktop type thing with autoit but i'm having some issues. I basically want an image in the gui to constantly (every tenth of a second) refresh to a new screencapture of your desktop. Right now... well its horrible. For some reason... it constantly repeates the title of the window and slowly moves it down the screen (sorry, its hard to explain but if you try it, you'll see). It also flickers every time. Any help is appreciated. For anyone who doesn't have it, download lazycat's dll at http://www.autoitscript.com/forum/index.ph...ic=8377&hl= . $remote_user = @UserName GUICreate($remote_user,@DesktopWidth,@desktopheight,0,0) GUICtrlCreatePic (@UserName & ".jpg",0,0,@DesktopWidth,@DesktopHeight) GUISetState() While 1 GUICtrlDelete(3) GUICtrlCreatePic (@UserName & ".jpg",0,0,@DesktopWidth,@DesktopHeight) ;GUICtrlSetImage(3,@scriptdir & @UserName & ".jpg") sleep(100) DllCall("captdll.dll", "int", "CaptureScreen", "str", @UserName & ".jpg", "int", 85) WEnd ; Capture full screen ; Fist parameter - filename, last - jpeg quality. ;DllCall("captdll.dll", "int", "CaptureScreen", "str", @UserName & ".jpg", "int", 85) help appreciated, thanks
  15. welcome to the forums. this will get the text of a window if it can me recognized with autoit. $win = "Title" $text = WinGetText($win) msgbox(0,"Text",$text) Edit: this would probabally only word for a text document. I don't know how to do the second part of what you're asking, sorry.
  16. the AdLibEnable seems to be fixing everything. thanks a whole lot to all who helped. Edid: spelling
  17. okay but still odd things... Func start() $whileile = 0 $count = 0 $channel = GUICtrlRead($channel) $users = IniRead($location & $name,"Names","Users","") $chans = IniRead($location & $name,"Names","Users and Channels","") IniWrite($location & $name,"Names","Users", @UserName & "¡" & $users) IniWrite($location & $name,"Names","Users and Channels", @UserName & ": " & $channel& "¡" & $chans) HotKeySet("{enter}","enter") While 1 $count = $count + 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE and WinActive("Talk Alpha") then exit1() ;If $count = 2 Then MsgBox(0,"","") $talk = IniRead($location & $name,"Chat",$channel,"") $talk1 = StringReplace($talk,"¡",@CRLF) GUICtrlSetData(5,$talk1,"") $count = 0 changewall() ;EndIf If $msg = $send Then sendmsg() If $msg = $exit Then WinClose("Specialness...") If $msg = $refresh Then $list = IniRead($location & $name,"Names","Users","") $list = StringReplace($list,"¡",@crlf) GUICtrlSetData($active,$list) EndIf If $msg = $set Then change() ;sleep(50) WEnd EndFunc for some odd reason... the message boxes aren't poping up steadily. It will pop up somewhere between 4-10 times in very quick sucession (basically instantly) but then... it randomly takes a break of 3-15 seconds... i have no idea why. does anyone??
  18. okay. I'm making a chatting program for my network. Right now, I'm using ini's to save the chat log to the network and to read the chat log. It is currently set up to check the ini file every 1/2 a second but it ramdomly will get very laggy and can take up to 15 seconds to display a message. I really don't know why this is happening. Any help about fixing that or any other bugs you see are appreciated. #include <GUIConstants.au3> #Include <Date.au3> #NoTrayIcon HotKeySet("^i","special") ;IniWrite("c:\walls\location.ini","location","location","") $location = IniRead(@ScriptDir & "\location.ini","location","location",@ScriptDir);"c:" $name = "\chat.ini" $msg2 = "" $bg = "" $exit = "" $refresh = "" $set = "" $active = "" $effect = "" $name2 = "" ;If IsAdmin() Then Exit GUICreate("Talk Alpha",800,600,0,0) $start = GUICtrlCreateButton("Start Chat",20,20,75,30) $channel = GUICtrlCreateInput("Channel",115,25,75,20) $input = GUICtrlCreateInput("",20,100,760,430,"0x00201004") $msg3 = GUICtrlCreateInput("",20,550,670,20) $send = GUICtrlCreateButton("Send",710,545,50,30) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE and WinActive("Talk Alpha") then exit1() If $msg = $start Then start() If $msg = $exit Then WinClose("Specialness...") If $msg = $refresh Then $list = IniRead($location & $name,"Names","Users","") $list = StringReplace($list,"¡",@crlf) GUICtrlSetData($active,$list) EndIf If $msg = $set Then change() sleep(100) WEnd Func start() $count = 0 $channel = GUICtrlRead($channel) $users = IniRead($location & $name,"Names","Users","") $chans = IniRead($location & $name,"Names","Users and Channels","") IniWrite($location & $name,"Names","Users", @UserName & "¡" & $users) IniWrite($location & $name,"Names","Users and Channels", @UserName & ": " & $channel& "¡" & $chans) HotKeySet("{enter}","enter") While 1 $count = $count + 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE and WinActive("Talk Alpha") then exit1() If $count = 10 Then $talk = IniRead($location & $name,"Chat",$channel,"") $talk1 = StringReplace($talk,"¡",@CRLF) GUICtrlSetData(5,$talk1,"") $count = 0 changewall() EndIf If $msg = $send Then sendmsg() If $msg = $exit Then WinClose("Specialness...") If $msg = $refresh Then $list = IniRead($location & $name,"Names","Users","") $list = StringReplace($list,"¡",@crlf) GUICtrlSetData($active,$list) EndIf If $msg = $set Then change() sleep(50) WEnd EndFunc Func exit1() $users = IniRead($location & $name,"Names","Users","") $chans = IniRead($location & $name,"Names","Users and Channels","") $users = StringReplace($users,@UserName & "¡","") $chans = StringReplace($chans,@UserName & ": " & $channel& "¡","") IniWrite($location & $name,"Names","Users", $users) IniWrite($location & $name,"Names","Users and Channels", $chans) If $users = "" Or $chans = "" Then IniDelete($location & $name,"Chat",$channel) Exit EndFunc Func enter() If WinActive("Talk Alpha") Then sendmsg() Else HotKeySet("{enter}") Send("{enter}") HotKeySet("{enter}","enter") EndIf EndFunc Func sendmsg() $msg2 = GUICtrlRead($msg3) $msg_old = IniRead($location & $name,"Chat",$channel,"") IniWrite($location & $name,"Chat",$channel, @UserName & ": " & _NowTime(5) & " -- " & $msg2 & "¡" & $msg_old) GUICtrlSetData($msg3,"") EndFunc that is a shortened version of my code. I'll paste the full version if anyone things its needed but I'm not having issues with that part.
  19. Can i have it so that my script will continue to run and function after a user that launched it logs out? If so, does anyone know either how to do this or someone else who has done this becaue i doubt i'd be able to code this so help is very apperciated. Also, anybody know how to have a script load even if a user isn't logged on? thanks, Kyler.
  20. i don't think that works... or it isn't on my computer... but i would really perfer that it was done through editing the registry.
  21. anyone know how to do this??
  22. Hey guys... I've seen this somewhere on the net before but I can't seem to find it again... I know its possible to completely dissable right clicking through the registry but I can't seem to find out how to. Could anybody find out what modifications are nessecary to enable and to disable right clicking through the registry. Also, though this is possible to do with other techniques other than modifying the registry, this is a better option for me. I would greatly appreciate it if anybody could find out what t modify in the registry or write a program in autoit that can change the registry and enable/disable it automatically. thanks a lot.
×
×
  • Create New...