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 


Need help with the RUN stuff
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Zikdalik
Newbie


Joined: 11 Apr 2004
Posts: 7

PostPosted: Mon Apr 12, 2004 11:31 am    Post subject: Need help with the RUN stuff Reply with quote

Yoo

Uhm i made something that runs another .exe. But after i close that exe my program has executed i want do some more stuff. How can i detect that the .exe is closed??

si its just like the .exe gets executed, the program detects that i closed it, and then he has to do some other code. I know how to do in c++ but dont know in vds. Can someone help me out please?
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Apr 12, 2004 12:57 pm    Post subject: Reply with quote

Hello before I give you any help can I persuade you to change your Handle on this forum? This is not a cracking/viri forum and your handle leaves others to think that we allow that kind of activity here which we do not Exclamation So if you would please change your handle I will be more than happy to help you with your questions.
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Zikdalik
Newbie


Joined: 11 Apr 2004
Posts: 7

PostPosted: Mon Apr 12, 2004 1:18 pm    Post subject: Reply with quote

noo its not a virus at all. Look, i want to edit something in a .ini file from a game, then my program launches the game and when the game is closed he has to change back the .ini to its original. I know how to edit and stuff but not how to detect when the .exe is closed.
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Apr 12, 2004 1:27 pm    Post subject: Reply with quote

WoRm-X,
Which version of VDS are you using? Can you post a sample of the code you have written so far so we don't have to start from scratch? Did you write the Exe that you are trying to detect? Is the exe a console application or a Windows 32bit application?

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Zikdalik
Newbie


Joined: 11 Apr 2004
Posts: 7

PostPosted: Mon Apr 12, 2004 1:41 pm    Post subject: Reply with quote

i did not write the .exe i want to detect, its the UT2004.exe

here is my code:

Code:

dialog create,wormx



file copy,@path(%0)ut2004.ini,@path(%0)ut2004.in_

inifile open,@path(%0)ut2004.ini


inifile write,XInterface.ExtendedConsole,ServerInfo,WoRmX.MyInfo


inifile close

wait 3

run @path(%0)ut2004.exe


# here has to come the code that detects when the .exe is closed and then run the code below:

file delete,@path(%0)ut2004.ini


file copy,@path(%0)ut2004.in_,@path(%0)ut2004.ini

file delete,@path(%0)ut2004.in_




oh and btw, thx 2 skit3000 for helping on this code what its like now Wink
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Apr 12, 2004 1:45 pm    Post subject: Reply with quote

WoRm-X,

Ok this is easy...

Code:
dialog create,wormx



file copy,@path(%0)ut2004.ini,@path(%0)ut2004.in_

inifile open,@path(%0)ut2004.ini


inifile write,XInterface.ExtendedConsole,ServerInfo,WoRmX.MyInfo


inifile close

wait 3

run @path(%0)ut2004.exe,WAIT


# here has to come the code that detects when the .exe is closed and then run the code below:

file delete,@path(%0)ut2004.ini


file copy,@path(%0)ut2004.in_,@path(%0)ut2004.ini

file delete,@path(%0)ut2004.in_


I added the WAIT at the end of the run line so it will wait until the Exe is done.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Zikdalik
Newbie


Joined: 11 Apr 2004
Posts: 7

PostPosted: Mon Apr 12, 2004 1:56 pm    Post subject: Reply with quote

lol yeah that was hard :\

thx anyway!
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Mon Apr 12, 2004 2:08 pm    Post subject: Reply with quote

WoRm-X,
Did that work for you?

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Mon Apr 12, 2004 2:48 pm    Post subject: Reply with quote

worm-X


I think i understand want yea want....i don't know if you are uses vds 5.0
if you want to check so see if exe is running there are a few ways to do this..i would uses the list task and have it look for the exe you want to watch OR you could have your program check to see if the "game window" is open if not then uses org. ini file.

Quote:

LIST TASKLIST,<list>,<flags>

TASKLIST fills a list with information about the tasks running on the system. Optional flags N and I allow you to choose whether the list should contain the name of the task and/or its process identifier, separated by the current field separator character.


here is a example how to check if a window is open....


if @winexists(Connected to Internet)

WINDOW position,Connected to Internet,100,100

WINDOW ontop,Connected to Internet

end

to find more info on window commands...the help file tells ya more about it

sorry i don't have a example for your needs

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Mon Apr 12, 2004 2:56 pm    Post subject: Reply with quote

to find out what the name of the window is use window spy.exe ( i think that is the name of it)

here is a example that uses notepad to open it and write a few line..hopefully this example will give ya a few ideas



Code:

REM ****************************************************
REM sktest.dsc v. 4.0
REM use of WINDOW SEND command
REM (c) 1995 - 2003 Commercial Research Ltd

%%Title = Visual DialogScript SendKey demonstration
title %%Title

REM Correct the following variables according to your language settings with Wordpad
%A = Wordpad
%W = Document - Wordpad
%Z = Save As

%%P1 = @input(Enter your name : ,Fred)
%%P2 = @input(Enter your birthday : ,01/01/2000)
WARN Be sure to set your keyboard lowercase !@cr()@cr()Hit ENTER to start ...

if @winexists(%W)
  window activate,%W
else
  shell open,%A.EXE
  %C = 3000
  repeat
    %C = @pred(%C)
    if @zero(%C)
      warn Can't launch %A.exe !
      exit 
   end
  until @winexists(%W)
end

%W = @winexists(%W)

window settext,%W,%%Title

wait 1
window position,%W,5,480,400,600
rem enter some text
window send,%W,Hello %%P1 !@cr()This is a test string@CR()
gosub checkok
window send,%W,The current directory is @curdir()@CR()
gosub checkok
window send,%W,@tab()This text is indented.@CR()
gosub checkok
window send,%W,@shift(and this text is in capitals)@cr()
gosub checkok
window send,%W,5 > 4 = true?@CR()
gosub checkOK
IF @NOT(@EQUAL(%%P2,dd/mm/yyyy))
  gosub Days
  window send,%W,You'd already spent %R days on earth !
  gosub checkOK
END
window send,%W,The date is: @alt(I)D@CR()@cr()
wait 1
gosub checkok
window send,%W,Let's copy some text to the clipboard...@CR()
wait 1
gosub checkok
window send,%W,@ctrl(@key(home))@shift(@key(end)@key(down)@key(down)@key(down)@key(end))
wait 1
window send,%W,@ctrl(c)
wait 1
window send,%W,@ctrl(@key(end))
wait 1
window send,%W,... and insert the copied text here.@CR()
wait 1
gosub checkok
window send,%W,@shift(@key(ins))
window send,%W,@cr()@cr()
wait 3
window send,%W,Here are some accented characters:@CR()
gosub checkok
window send,%W,€אחטיכמנפשר@chr(255)@CR()
gosub checkok
window send,%W,@CR()
wait 2
window send,%W,@CR()Now let's save the file.@CR()
gosub checkok
rem Correct the hotkey value below according to your Wordpad version !
window send,%W,@alt(F)A
rem wait for Save As dialog
%C = 1000
repeat
  %C = @pred(%C)
  if @zero(%C)
    warn Cannot find window %Z - aborting@cr()Check the hotkey value at line 76","@cr()according to your Wordpad version !
    exit
  end
until @winexists(%Z)
wait 1
window send,%Z,Test
wait 2
window send,%Z,@chr(27)
wait 1
window send,%W,Changed my mind!@CR()
wait 2
rem quit Wordpad
window send,%W,@alt(@key(F4))
%C = 1000
repeat
  %C = @pred(%C)
  if @zero(%C)
    warn Cannot find window @chr(32)%%Title@chr(32) - aborting
    exit
  end
until @winexists(%W)
wait 1
rem select No option on dialog
window send,%A,@alt(n)
wait 1
window send,DESKTOP,@key(scroll)
INFO  End of demonstration
exit

:checkok
if @not(@ok())
  window send,%W,** The result of "@ok()" was false after the@CR()
  window send,%W,** previous line was sent"," indicating that@CR()
  window send,%W,** one or more of the characters was not@CR()
  window send,%W,** a valid keyboard character.@CR()
end
exit

:Days
option decimalsep,"."
option fieldsep,"."
parse "%9,%8",@datetime()
parse "%8,%7",@datetime(,%%P2)
%R = @diff(%9,%8)
Exit

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Tue Apr 13, 2004 12:36 am    Post subject: Reply with quote

I still think he should change his handle, and why did he iqnore MindPower's request , where the boot button Laughing
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Apr 13, 2004 12:39 am    Post subject: Reply with quote

Per users' request, Worm-X will need to change his handle. As of now he
is known as 'UID381', corresponding to user_id '381'. This handle may
be changed upon contacting an administrator.

This is done because VDSWorld does not condone cracking or hacking
viruses or anything of the sort.

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


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Tue Apr 13, 2004 1:50 am    Post subject: Reply with quote

I'm wondering why Worm-X is automatically thought of as having to do with virii?
When I think of Worm X I think of the dog de-worming product...
Welcome to Russia.

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Apr 13, 2004 1:53 am    Post subject: Reply with quote

As it was said, 'Worm-X' can come to any site team member and asked
to have his name changed, however, it's best to have it changed to
something else, one way or the other, since more than a few people
thought it should be changed.

Worm-X you can contact any of the following people to change your
username:

http://www.vdsworld.com/?page=team

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


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Tue Apr 13, 2004 4:19 am    Post subject: Reply with quote

Off topic (and only my opinion)

It seems strange his name needs to be changed. Sure there are malicious files called 'worms' but there is also a game called Worms, Worms 3d, Worms Armageddon. etc.

Now if his name was hack-vdsworld.com that might be something all too different. Even then I don't think I would make him change his name unless he made threats of carrying out such actions. Whereupon an ip ban would follow. But none of the above has occurred.

Again this is only my opinion and I am not trying to influence the vdsworld team's decision on this matter.
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 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