View previous topic :: View next topic |
Author |
Message |
Eric Newbie
Joined: 07 May 2002 Posts: 8 Location: France
|
Posted: Sun Oct 20, 2002 8:30 pm Post subject: America Online Reconnect System |
|
|
This is my first AOL Reconnecter designed for Microsoft Windows XP and AOL 7 All languages, don't forget to activate the Memorize password in settings of AOL.
this is good if you download files while you don't here, the software automaticaly detect Disconnection and relaunch automaticaly AOL.
Code: |
OPTION PRIORITY,IDLE
title AOL Auto reconnect
%E = @SYSINFO(W)
if @equal(5.1,%E)
goto ok
else
info This Program Work only with Microsoft Windows XP.
stop
:ok
if @not(@winexists(AOL))
Info Launch AOL7 before launch AOL Auto reconnect !.
stop
else
title AOL Auto reconnect
if @not(@file(@path(%0)aolset.ini))
INIFILE open,@path(%0)AOLset.ini
INIFILE WRITE,Data,shutdown,00:00
INIFILE WRITE,Data,ping,90
INIFILE WRITE,Date,AOLDIR,C:\AOL\
DIALOG CREATE,AOL Auto reconnect 1.0,-1,0,200,170
%%AOLDIR = @dirdlg(Who is AOL Directory ?)
%%AOLDIR2 = %%AOLDIR\
INIFILE WRITE,Date,AOLDIR,%%AOLDIR2
INFO %%AOLDIR2
goto else
else
:else
INIFILE open,@path(%0)AOLset.ini
%C = @INIREAD(data,shutdown)
%A = @INIREAD(data,ping)
if @ask(Use last parameters ?@cr()@cr()Shutdown time : %C@cr()Ping in seconds : %A)
goto begin
else
Title AOL Auto reconnect
%a = @input(Ping value in seconds :,90)
if @not(@ok())
exit
else
%c = @input(PC Shutdown time ? : <<0 for not>>,00:00)
if @not(@ok())
exit
else
INIFILE WRITE,DATA,ping,%A
INIFILE WRITE,DATA,shutdown,%C
:begin
OPTION PRIORITY,IDLE
%B = %A
list create,1
Title AOL Auto reconnect
DIALOG CREATE,AOL Auto reconnect 1.0,-1,0,200,170
DIALOG ADD,TEXT,TEXT1,12,1,,,Etat :
DIALOG ADD,TEXT,T2,12,27,,,
DIALOG ADD,list,EDIT1,51,1,192,116,,
DIALOG ADD,TEXT,TEXT2,37,0,,,Report :
DIALOG SHOW
:retest
if @equal(%C,@datetime(hh:nn))
DIALOG SET,T2,PC Shutown process ...
goto arrt
else
%A = %B
DIALOG SET,T2,Pinging ...
runh ping -n 3 -w 60000 www.winzip.com,wait
%%output = @retcode()
if @equal(%%output,0)
repeat
wait 0
%V = @event()
if %V
goto %V
else
%a = @diff(%a,1)
DIALOG SET,T2,Ping done"," ping in %a seconds ...
wait
until @equal(%A,0)
goto retest
else
OPTION PRIORITY,HIGH
REM IF AOL DISCONNECT WHILE SHUT DOWN INTERACT CAN BE UNDO SHUTDOWN SYSTEM AND STAND COMPUTER ON..
list add,1,disconnected the @datetime(dd/mm) at @datetime(hh:nn:ss)
list savefile,1,@path(%0)aol.log
list loadfile,edit1,@path(%0)aol.log
DIALOG SET,T2,Ping error"," KILL AOL ...
RUNh TASKKILL /F /IM waol.exe
wait 5
DIALOG SET,T2,Ping error"," KILL AOL x2 ...
RUNh TASKKILL /F /IM waol.exe
wait 5
DIALOG SET,T2,Ping error"," KILL AOL x3 ...
RUNh TASKKILL /F /IM waol.exe
wait 10
DIALOG SET,T2,Launch d'AOL 7.0 ...
%A = @shortname(%%AOLDIR2)
run %aaol.exe
DIALOG SET,T2,Waiting AOL ...
wait 10
WINDOW SEND,AOL,@cr()
DIALOG SET,T2,Connect to AOL ...
end
wait 65
goto retest
:arrt
DIALOG SET,T2,KILL AOL ...
RUNh TASKKILL /F /IM waol.exe
wait 5
DIALOG SET,T2,KILL AOL x2 ...
RUNh TASKKILL /F /IM waol.exe
wait 5
DIALOG SET,T2,KILL AOL x3 ...
RUNh TASKKILL /F /IM waol.exe
wait 5
DIALOG SET,T2,KILL messenger ...
RUNh TASKKILL /F /IM msmsgs.exe
wait 10
RUN TASKMGR
wait 5
OPTION SKDELAY,1000
WINDOW SETTEXT,Windows TASK Manager, Processing Shut Down ...
Window send,Please Wait ...,@alt(A)@key(DOWN)@key(DOWN)@cr()
wait 2
exit
exit
:close
stop
|
_________________ -----------------------------------
Eric11 |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Sun Oct 20, 2002 10:15 pm Post subject: |
|
|
Just a general piece of advice
You should watch your syntax.. leaving out the 'end' part of your 'if' statements is not a great idea.
Also 'goto' statements are generally bad news in 'repeat' loops.
Sometimes you'll be lucky that your script will be unaffected, other times your script will crash or do unexpected
things when not sticking to VDS syntax.
Greetz
Dr. Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Mon Oct 21, 2002 11:37 am Post subject: |
|
|
Another thing, when you post code you should disable the Smilies... |
|
Back to top |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Mon Oct 21, 2002 4:33 pm Post subject: |
|
|
Well, sometimes one gets a little inspired by these things so I wrote a small program to check a script for
IF commands without appropriate END statements. I often thought about doing this when travelling a complex
section line by line to find where an END was missing. But then I never got around to it.
Now I did. Posted in this VDS 3 section.
Greetz
Dr. Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing
Last edited by Dr. Dread on Mon Oct 21, 2002 7:00 pm; edited 1 time in total |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Oct 21, 2002 4:46 pm Post subject: |
|
|
Lol Dread.
I also started one a while back, but never finished it.
Mine was going to follow subroutines and check how
deep IF/ELSE/ENDs, REPEAT/UNTILs, and WHILE/WENDs
are nested as well.
The plan was to add this routine to the variable checker
I made. I'd actually forgot about it though...
Cheers, Mac _________________ 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 |
|
|
Dr. Dread Professional Member
Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Mon Oct 21, 2002 6:59 pm Post subject: |
|
|
He-he, Mac I know that feeling... my path is also littered with good intentions and "golden" code snippets
which never really materialized into something useable
Greetz
Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
Back to top |
|
|
Eric Newbie
Joined: 07 May 2002 Posts: 8 Location: France
|
Posted: Tue Oct 22, 2002 2:27 pm Post subject: RE |
|
|
Ok, i don't really look the correct sentences of if else end etc ...
for my next script a correct this [stupids] errors
Skit sorry for the smilies !
the label k
cause a smilie
bye _________________ -----------------------------------
Eric11 |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue Oct 22, 2002 4:03 pm Post subject: |
|
|
You did it again...
Btw. I didn't know that you can use labels with an like character: :arr t. Useful to know! |
|
Back to top |
|
|
|
|
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
|
|