forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Making an away msg'er respond to chat... ????
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Wraith
Newbie


Joined: 21 Oct 2003
Posts: 14

PostPosted: Thu Oct 23, 2003 7:56 pm    Post subject: Reply with quote

To answer a few quick questions:
I'm using VDS v3.5

This is a screen shot of the ingame chat.

I've tried Win Spy on all areas of the game window and came up with nothing new. There isnt a different name for the chat area or the enter chat area.

I'm going to play with what I've been given and see how far i get.
Back to top
View user's profile Send private message
Wraith
Newbie


Joined: 21 Oct 2003
Posts: 14

PostPosted: Thu Oct 23, 2003 8:23 pm    Post subject: Reply with quote

Mindpower,

I gave your code a try as is and it kind of works. It doesn't wait for the trigger word and sends the responce right away. I'm not sure why that is. Also it doesnt send the complete reply msg. It sends out a fragmented reply. Meaning some letters are missing in the reply (reply is: "It_works" and I'm getting: "work", "_works", "s") I thinkmaybe the the window send, t might be messing it up and I'm trying to set a mouse click at 751,657; thats where the enter chat button is. I think the code is "@click(751,657)"
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Fri Oct 24, 2003 12:25 am    Post subject: Reply with quote

More then likely your game will auto focus the mouse pointer/cursor into the chat window area, so I don't know if you really need to do a window click.

Also after your window send, t message you should put a WAIT 1, just so it waits about 1 second before sending any text, this will make sure the text area has been clicked on appropriatly and is ready for text to be entered. Otherwise it just sends a window send t and immediately starts sending the text, which is probably why some of the text you mentioned is cut off at the beginning.
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Oct 24, 2003 1:13 am    Post subject: Reply with quote

I think you should give WAIT 1 for a second delay (or more if it takes more time to open chat window) as PGWARE said.
Using window click may not be relaible as your chat window/button position may change based on it's size screen resolution etc.
I will explain U more on why it always sends the reply.
Briefly your script has no EVLOOP wait event. or it should have a EXIT/STOP after the END at the end of goto Reply. I will modify the example

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Wraith
Newbie


Joined: 21 Oct 2003
Posts: 14

PostPosted: Fri Oct 24, 2003 2:08 am    Post subject: Reply with quote

Yeah "Wait 2" did the trick, not as fast but it's adding full sentances, so thats perfect.

CodeScript,
If I understand you correctly your saying I basicly need this:
run
search for word trigger
if trigger is found send reply then start again
if trigger is not found
loop
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Oct 24, 2003 3:03 am    Post subject: Reply with quote

Exactly!, here is the modified code :
I have added a dialog too.
Code:
  OPTION DECIMALSEP,"."
  Title Answering Machine
  DIALOG CREATE,Answering Machine,-1,0,394,75,ONTOP
  REM You can remove ONTOP style once U have done testing
  REM You can also add a TASKICON to make it stay in "Systray"
  DIALOG ADD,STATUS,STATUS1
  DIALOG ADD,TEXT,TEXT1,36,8,,,Contents of your window should be displayed here below :
  DIALOG ADD,TEXT,TEXT2,17,11,,,"%%window" =
  DIALOG ADD,TEXT,TEXT3,18,84,100,13,%%window
  DIALOG SHOW

 
:EVLOOP
  WAIT EVENT,0.02
  GOTO @EVENT()
 
:TIMER
  %%window = @winexists(#DRANSIK)
  %%contents = @wintext(%%window)
  Dialog set,STATUS1,%%contents
  %%contents = @wintext(%%window)
  rem *** inconsistent @ character, opening bracket and closing bracket count on previous line ***
  List Create,1

  rem If the edit box only has one line in it the List Add will do.
  List Add,1, %%contents
  rem If your edit box has more than one line and has carriage returns
  rem you may consider using
  rem List Assign,1,%%contents
  rem This will place each line in a seperate item in the list

  rem Now move the pointer in the list to first item, The first item in all
  rem VDS lists is 0 (ie...Zero)
  List seek,1,0
  rem Test if the line contains your desired string:
  IF @MATCH(1,test)
    rem if you use Goto here then you will never reach the List Close,1 line
    rem below so you can use a GoSub instead. A GoSub will Return when it
    rem reaches an Exit command.
    GoSub reply
  END
  LIST close,1
GOTO EVLOOP
 
:Reply
  Window send,%%window,t
  wait 2
  Window send,%%window,It works!
  Window send,%%window,@CR()
  rem Always make sure you end a sub-routine with an Exit or Stop
  rem command.
  Exit

:CLOSE
EXIT


Enjoy!

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Wraith
Newbie


Joined: 21 Oct 2003
Posts: 14

PostPosted: Fri Oct 24, 2003 3:32 am    Post subject: Reply with quote

CodeScript,

I gave your code a run and unfortunetly it didn't do anything. I added " %%window = @winexists(#DRANSIK)" above the first Dialog line to identify the %%window, but no luck. The text ingame should show in the dialog correct?
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Oct 24, 2003 5:52 am    Post subject: Reply with quote

A few questions to you:
Does %%window = show some value on the dialog ?

Change:
Code:
IF @MATCH(1,test)


to

Code:
IF @NOT(@MATCH(1,test))


So that it enters the text indiscriminately
and see if it types something into chat area.

If your answer is yes to both questions and the dialog statusbar
doesnot show any text then it simply means either:

The chat display area ("This is area ia always here" in your screen shot) is a text/listbox.

I suggest you use the easy window spy below:
Just paste the code into your VDS IDE and hit run.
Now you move your mouse over :

1.Main Game window
Note the Window ID,text and class name.

2."This is area is always here"
Note the Window ID,text and class name.

If they are different then you know you should
use the class name of the chat display area to
get the text message.

Let me know what happens.

Code:
  OPTION DECIMALSEP,"."
  Title Easy Window spy
  DIALOG CREATE,Easy Window spy,-1,0,399,198,ONTOP
  DIALOG ADD,TEXT,TEXT1,50,10,,,Text of your window should be displayed here below :
  DIALOG ADD,TEXT,TEXT2,17,11,,,"%%window" =
  DIALOG ADD,TEXT,TEXT3,18,84,100,13,%%window
  DIALOG ADD,EDIT,EDIT1,69,10,367,102,,,MULTI
  DIALOG ADD,TEXT,TEXT5,180,8,110,13,Window #Class name :
  DIALOG ADD,TEXT,TEXT6,180,128,136,13
  DIALOG SHOW

:EVLOOP
  WAIT EVENT,0.02
  GOTO @EVENT()
 
:TIMER
 %%win = @WINATPOINT(@MOUSEPOS(X),@MOUSEPOS(Y))
 DIALOG SET,TEXT3,%%win
 DIALOG SET,EDIT1,@WINTEXT(%%win)
 DIALOG SET,TEXT6,#@WINCLASS(%%win)
 GOTO EVLOOP
 
:CLOSE
EXIT

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Wraith
Newbie


Joined: 21 Oct 2003
Posts: 14

PostPosted: Fri Oct 24, 2003 7:33 pm    Post subject: Reply with quote

CodeScript,

Yes the %%window = shows a value of some sorts. Its different everyting I reopen the game.
I have that code switch a try and it turned into a chat flooder lol.
I tried that easy win spy code you gave me and I get the same results as I did with the Window Spy. Theres no different Name for any part of the window but #DRANSIK "Dransik (c)opyright 2001 Asylumsoft Inc."

Any other ideas?

Thanks again.
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sat Oct 25, 2003 4:51 am    Post subject: Reply with quote

Then it very much explains why you are unable to get the chat window contents - The script simply gets "Dransik (c)opyright 2001 Asylumsoft Inc."
Most likely the chat display text is painted as part of a picture/graphic. Obviously there is no "text" you can get.
You can try to confirm it further whether you can select/copy the contents of the chat area.

OR may be the window has overlay graphics ??

You couldn't get a different value/class name even over the area where you type the reply Question

In your window spy (not easy window spy) can U see a number of child windows(entries) below the main window ?? Does any one of them contain the chat window text.(Post a screenshot if U don't mind).

If yor answer is NO to all above questions then you have to look for alternatives:
You should find out where/how the chat contents are stored.
If the game writes it to a text file you are most lucky.
Mostly they write to a XML file etc Sad for performance reasons
OR
May not write it at all in which case you are at a complete loss.

You may also try contact your game company to find out where if it stores
these info.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Wraith
Newbie


Joined: 21 Oct 2003
Posts: 14

PostPosted: Sat Oct 25, 2003 1:36 pm    Post subject: Reply with quote

CodeScript,

No, I cant copy any of the chat. I do have a chat log txt though and tons of .dat and extentionless files. I would have mentioned that earlier but it doesn't show everything I was hoping this program would look for. The Window Spy doesn't come up with any child windows either, only #DRANSIK.
I'm going to talk to the Developers and see what they say. They might not even like the idea :-/ lol. I'll let you know what I come up with.

Thanks for all the help,
Matt
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sat Oct 25, 2003 2:32 pm    Post subject: Reply with quote

Yeah then it's almost confirmed that all the chat text is painted on the dialog and no question of getting text from it.
So you need to search that folder to see which of those dat files contain chat messages and if these are written in real time or only on progrm exit.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Wraith
Newbie


Joined: 21 Oct 2003
Posts: 14

PostPosted: Sat Oct 25, 2003 2:57 pm    Post subject: Reply with quote

How would I go about doing that?
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Oct 25, 2003 3:11 pm    Post subject: Reply with quote

Open them while playing the game... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Wraith
Newbie


Joined: 21 Oct 2003
Posts: 14

PostPosted: Sat Oct 25, 2003 3:25 pm    Post subject: Reply with quote

But they're files that aren't compatable with notepad or did you mean to open it with something else?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group