Jump to content

west

Active Members
  • Posts

    31
  • Joined

  • Last visited

west's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. yes ControlGetText() thank you $var = ControlGetText($Name, "","[iD:1056]") $dj = $var MsgBox(0, "DJ:", $dj)
  2. HI all I try to figure out how to grab (extract) TEXT from a control (button) and store it in a varibalbe to comapre it where i can find some info about HOW TO do that i try read into the herlp i cant find anythings thanks
  3. yes this is working fine thanks a lots but the cons is its need to be hardcoded in the script if i want to READ it fomr a file and then put it in a variable and then put in clipboard is there a good way to do it
  4. any way to put multiple line of text into the clip board same as Hello my name is john doe blablalblalblalblalalalalalalalal bye and after extract this full multine of text and paste it ive read the help but seem its only can put 1 line of thext at time
  5. ya CPU load is 0% now just add the sleep(10) after the DO statement hehe good tips
  6. is there anyway to got window info an use it in VB
  7. MMMMM can somebody help me this script work somewhat fine but its kill the CPU 75% of the CPU is took while its runing Thanks a lots
  8. yap ive add at this place ; Get username from chat text $split = StringSplit($currentline, "*") $split2 = StringSplit($split[1], ":") $split3 = StringSplit($split2[2], ":") $username = $split2[1] $username2 = StringStripCR($split3[1]) ;test pour voir la variable ;MsgBox(0, "UserName is", $username2) $Greeting_Word = ", Welcome to the chat room" $Greeting = $username2 & $Greeting_Word the greetings work perfectly now but still the same issue with multiple line of text see BOT : 121212121 121212 in this example i will got error cause its on 2 lines error is $split3 = stringsplit($split2[2], ":" $split3 = stringsplit(^ERROR Error : Array variable has incorrect munber of subscripts or subscripts dimmension range exceeded. every time i got multiple line BOT gor this error how i can avoid this???? is it because in multine line the second line there is not : caracter????? thanks you
  9. yes work but why its a carriage return when i paste in the room Bot : dewidar ,Welcome to the chat room I want it do Bot : dewidar ,Welcome to the chat room
  10. what is the purpose of the * in $split = StringSplit($currentline, "*")
  11. this is my code for a greeting BOt for a chat room the BOT run, but have some serious matter lol multiline of text make the BOT crash single line of text without " : " also make bot crash i also want to know how i can use 2 string of text to concatenate into one as example $a = $b + c$ ok now the code ( ive find many coded in this forum in many post ) ;set empty prevline var used later to check against new text $prevline = "" ; Begin loop $l = 0 do ; Read from the chat window bon ca ca compte les lignes the texte dans la room apres avoir mouse clicker sur le main chat $totallines = ControlCommand($RoomName, "", "RichEdit20A1", "GetLineCount", "") $currentline = ControlCommand($RoomName, "", "RichEdit20A1", "GetLine", $totallines - 1) ; Check for new text If $prevline <> $currentline Then ; Store current text for check against new text $prevline = $currentline ; Write to the LOG FILE ; OPEN the LOG FILE $file1 = FileOpen(@DesktopDir & "\AnyFileNameHere.txt",1) FileWriteLine($file1, $currentline & @CRLF) FileClose($file1) EndIf ; Get username from chat text $split = StringSplit($currentline, "*") $split2 = StringSplit($split[1], ":") $username = $split2[1] ;test pour voir la variable ;MsgBox(0, "Line TEXT is:", $prevline) ; Get username from chat text $split = StringSplit($currentline, "*") $split2 = StringSplit($split[1], ":") $split3 = StringSplit($split2[2],":") $username = $split2[1] $username2 = $split3[1] ;test pour voir la variable ;MsgBox(0, "UserName is", $username2) ; IF $username = $join Then ; fonctionne pas ;$greetings = $username2 + " : Welcome to the room" ;test pour voir la variable ;MsgBox(0, "UserName is", $greetings) ;test pour voir la variable ;MsgBox(0, "A Droite du :", $username2) ;test pour voir la variable ;MsgBox(0, "toute la lignes astie:", $split) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; open the advert file read it and paste text in the chat room ; $file = FileOpen("Greetings.txt", 0) ; Check if file opened for reading OK ; If $file = -1 Then ; MsgBox(0, "Error", "Unable to open file.") ; Exit ; EndIf ; Read in lines of text until the EOF is reached ;While 1 ; $line = FileReadLine($file) ; If @error = -1 Then ExitLoop ;MsgBox(0, "Line read:", $line) ControlSetText($RoomName, "", "[iD:1042]", $username2 ) ;ControlSetText($RoomName, "", "[iD:1042]", " : Welcome to chat room" ) ControlClick($RoomName, "", "[iD:1019]") ;sleep(20000) ; FileClose($file) ; Wend $prevline = "" EndIf ; Restart the Do loop Until $l = 1 i will appreciate any help thanks you so much sorry to be newbie lol
  12. this code using a file may i use it live in the script i mean dont need to write or read the file to find the users ID and his text????
  13. mmm ive find out is the chat window is open at full its fine i can graps all the text its only when the chat windows is customised smaller and the line of text overlap into multiple line that its dont work
  14. how can this bot be able to KNOW how many line of text a users send into the room???? and read it ive try this code into a chat room but ive only got the last line of text if a user type USER : line 1 line 2 line 3 i mean multi line before click the SEND button the BOT only read the last LINE (LINE 3) how can aproces can be made for GOT t the X number of line and why not in same time EXTRACT the users NICK thanks
  15. mmm this seem more a way to to read ans search into the file I am at the step before i want to write into the file what i extract i can do it but unfortunaly only the last line of text fromt he chat room i try find a way to extract x lines of text by users its can be 1 to x lines depand what they type
×
×
  • Create New...