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 


Send a message over a network using VDS
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jul 29, 2002 2:04 am    Post subject: Send a message over a network using VDS Reply with quote

Here's a simple program I wrote to Send a message over a network using VDS...
Code:
REM ***********************************************************
REM *   TITLE:  SEND A MESSAGE THROUGH A NETWORK USING VDS    *
REM *   AUTHOR: FREEZINGFIRE                                  *
REM *   E-MAIL: FREEZINGFIRE@PROGRAMMER.NET                   *
REM ***********************************************************
REM *   DIRECTIONS:                                           *
REM *                                                         *
REM *   1) TYPE A COMPUTER NAME OR USERNAME INTO THE BOX      *
REM *      LABELED "User or Computer Name". NOTE: DO NOT      *
REM *      TYPE THE "\\" BEFORE THE COMPUTER NAME. IT IS      *
REM *      NOT NEEDED. ANOTHER COMMAND THAT IS ALSO VERY      *
REM *      GOOD IS TO USE AN ASTERISK (*) IN THE USER OR      *
REM *      COMPUTER NAME FIELD. THIS COMMAND  SENDS  THE      *
REM *      MESSAGE TO ALL COMPUTERS IN THE NETWORK WORK-      *
REM *      GROUP. USE THIS SCRIPT AT YOUR OWN RISK.           *
REM *                                                         *
REM *  2)  TYPE YOUR MESSAGE IN THE "MESSAGE" BOX.            *
REM *                                                         *
REM *  PLEASE NOTE: THIS PROGRAM REQUIRES WINDOWS 2000 OR     *
REM *  XP TO WORK; IT *MAY* WORK ON OTHER VERSIONS.           *
REM ***********************************************************
Title Send a Message
  DIALOG CREATE,Send a Message,-1,0,342,207
  DIALOG ADD,TEXT,Computer,12,9,116,13,User or Computer Name:
  DIALOG ADD,EDIT,cname,10,130,200,19
  DIALOG ADD,TEXT,Messagelabel,38,9,84,13,Message to send:
  DIALOG ADD,EDIT,message,54,10,320,108,,,MULTI,WRAP,SCROLL
  DIALOG ADD,BUTTON,Send,172,74,64,24,Send,,DEFAULT
  DIALOG ADD,BUTTON,Close,172,206,64,24,Close
  DIALOG ADD,BUTTON,Clear,172,140,64,24,Clear
  DIALOG SHOW
:Evloop
  wait event
  goto @event()
:SendBUTTON
  runh net send @dlgtext(cname) @dlgtext(message)
  goto evloop
:clearbutton
  dialog clear,message
  goto evloop
:CloseBUTTON
:Close
exit

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


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

PostPosted: Mon Jul 29, 2002 11:56 am    Post subject: Reply with quote

And how do you recieve messages??? Or does Windows show an INFO box??? If so, try something with this:

Code:

:evloop
%%event = @event()
if @not(@null(%%event))
  goto %%event
  end
if @winexists(Name of infobox)
  %%message = @wintext(@winatpoint(@winpos(t),@winpos(l)))
  end
goto evloop
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jul 29, 2002 1:54 pm    Post subject: Reply with quote

The other person can send the message to you by an info box. Just type your computer name into the "User or Computer Name" box to test it with your computer. To find out your computer name if you do not know it you can type:
Code:

info @env(computername)


P.S.: I can't get this script to tell me what is in the window, but it might be because it is sent by the SYSTEM -- it has a 16-bit look in Windows XP...But am I doing something wrong with this script?
Code:

:evloop
  %%event = @event()
  if @not(@null(%%event))
    goto %%event
  end
  if @winexists(Messenger Service)
    %%message = @wintext(@winatpoint(@winpos(t),@winpos(l)))
rem ---- To test the %%message variable ---- 
info %%message
rem ------------------------------------------------
  end
  goto evloop

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


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

PostPosted: Mon Jul 29, 2002 2:02 pm    Post subject: Reply with quote

Yes, you're doing something wrong...

It has to be:

%%message = @wintext(@winatpoint(@winpos(Messenger Service,t),@winpos(Messenger Service,l)))

Or

%%top = 50
%%left = 75
%%message = @wintext(@winatpoint(@fadd(@winpos(Messenger Service,t),%%top),@fadd(@winpos(Messenger Service,l),%%left)))


Where %%top has to be the pixels from the top to the message text...

Sjoerd

Btw. It was my fould that your program doesn't worked... Sorry for that...


Last edited by Skit3000 on Mon Jul 29, 2002 2:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Skit3000
Admin Team


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

PostPosted: Mon Jul 29, 2002 2:14 pm    Post subject: Reply with quote

HTTP1.1 STATUS 403 Remote Access to this object forbidden This file cannot be directly accessed from a remote site, but must be linked through the Brinkster Member's site. Confused

Strange people @ Brinkser.com ...
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jul 29, 2002 2:23 pm    Post subject: Reply with quote

I just wrote an HTML for it...
you can try it again. Smile

goto http://www21.brinkster.com/vsmirrorsite/vds/default.htm

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


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

PostPosted: Mon Jul 29, 2002 2:30 pm    Post subject: Reply with quote

%%top = 72
%%left = 25

Btw. isn't it usefull for this forum to have a Chatbox??? This is almost real-time chatting, but is nasty because yoú have to check the forum all the time...
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jul 29, 2002 2:33 pm    Post subject: Reply with quote

Yes, that probably would be a useful feature... Smile
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


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

PostPosted: Mon Jul 29, 2002 2:41 pm    Post subject: Reply with quote

Do you have MSN??? Maybe you can add me, skit3000@hotmail.com.
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jul 29, 2002 2:42 pm    Post subject: Reply with quote

I think to recognize it you must use if @winexists(##32770) instead of if @winexists(Messenger Service)
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jul 29, 2002 2:43 pm    Post subject: Reply with quote

No, I don't have MSN...
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


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

PostPosted: Mon Jul 29, 2002 2:51 pm    Post subject: Reply with quote

ICQ then???
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jul 29, 2002 3:10 pm    Post subject: Reply with quote

No, I don't have that either.
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Jul 29, 2002 7:00 pm    Post subject: Reply with quote

Here's an idea that should work on Win95 and up, without
external DLLs (it's not as simple as Freezing Fire's code,
and I'm not exactly sure how to determine if a computer is
logged onto the network).

You would run an EXE on each computer that continually
checks for a message file on it's own system (should check
the reg for network computer names to receive messages).

When run from one computer, it would save a message
on the target computer as a text file. The first part of
text should be the sending computer's name, with a field
separator for reply to the correct computer (the message
folder name should prolly be the same on all computers).

For example:

\\Mac|
Hey how's that project goin?
I'm goin' to lunch at 12:30 today...
Cheers, Mac


When a computer loads the message file, it should load
it as one list item (could save a permanent record if
desired), then delete the message file, and continue
checking for a new message file. Parse the message for
the sender's reply address.

The sending computer would check for the existence of the
message file on the target computer, and not overwrite it
(which would delete an impending message). OR you could
keep adding multiple message files numbered in succesion.

I guess ya could also have an "outgoing messages" file if
the receiving computer is logged off.

Just a thought. You guys prolly already have better ideas.

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Jul 30, 2002 12:30 am    Post subject: Reply with quote

Hi Mac,

Acctually I was seriously considering the same thing...but my idea was a little different...

I was thing more about a network mail/chat system with VDS...

For mail I would use a "headers.dat" file and if the program found a new entry it would notify the user that they had mail...the actual message would be stored in a separate file...

For the chat system, I would use the same sort of thing...
But I hadn't worked out all of the bugs...

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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