| View previous topic :: View next topic |
| Author |
Message |
Zoltar VDS Pirate


Joined: 26 Dec 2001 Posts: 91
|
Posted: Wed May 08, 2002 3:44 pm Post subject: Post_Past |
|
|
Here is a little code, to paste code from an html page, like vdsworld's forum per example.
- Launch Post_Past.
- Copy the code from your browser
- click on the button
- if you want the script to be lauched, click on the run checkbox
| Code: |
rem Zoltar
option scale,96
title Post_Past
DIALOG CREATE,Post_Past,0,0,63,40,SMALLCAP,ONTOP,savepos,class "Post_Past"
DIALOG ADD,BUTTON,copier,0,0,64,24,copier
DIALOG ADD,CHECK,Run,24,0,58,18,Run
DIALOG SHOW
:Evloop
Wait Event
%E = @Event()
Goto %E
:close
exit
:copierbutton
rem on copie le code ds la liste
list create,1
list paste,1,wait
rem on choisi où le sauver
%%source = @filedlg(Source VDS *.dsc|*.dsc,sauver le source)
rem si ta rien choisi pas d'acion
if %%source
if @equal(@ext(%%source),dsc)
list savefile,1,%%source
list close,1
else
%%source = %%source".dsc"
list savefile,1,%%source
list close,1
end
end
rem si tu as coché run, on execute
if @DlGtExT(run)
repeat
until @file(%%source,ahrs)
shell open,%%source
end
GotO EvLooP
|
_________________
Zoltar
http://membres.lycos.fr/
Last edited by Zoltar on Thu May 09, 2002 7:35 am; edited 1 time in total |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Thu May 09, 2002 12:35 am Post subject: Re: Post_Past |
|
|
Nice thinking. A couple of comments:
You have a WAIT parameter for the LIST PASTE command. Did you find that somewhere -
it is not documented, I think. Does it work?
There is and END missing for the "if %%source" line.
Greetz
Dr. Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu May 09, 2002 6:34 am Post subject: |
|
|
_____________________________________________________________
The WAIT parameter can be used (after a comma) with
many VDS commands/functions. It causes VDS to wait
until the command/function is completed before going
to the next line of code. It does NOT work on everything
though, you'll just have to test it on each one (works nice
for DOS commands BTW...).
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 |
|
 |
Zoltar VDS Pirate


Joined: 26 Dec 2001 Posts: 91
|
Posted: Thu May 09, 2002 7:37 am Post subject: Re: Post_Past |
|
|
| Dr. Dread wrote: | There is and END missing for the "if %%source" line.
|
It's done,
Thanks Dr. Dread and Mac for your comments  _________________
Zoltar
http://membres.lycos.fr/ |
|
| Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
Posted: Thu May 09, 2002 7:53 am Post subject: |
|
|
| Mac wrote: | _____________________________________________________________
The WAIT parameter can be used (after a comma) with
many VDS commands/functions. It causes VDS to wait
until the command/function is completed before going
to the next line of code. It does NOT work on everything
though, you'll just have to test it on each one (works nice
for DOS commands BTW...).
|
Hi, Mac!
I knew about the WAIT parameter for the PLAY, RUN and SHELL commands but
I had no idea that it would be taken in other commands and various functions as
well. Am I right when I say that this is not documented? Perhaps this one should be posted
in the thread concerning undocumented VDS features.
Anyways, it's interesting knowledge and could save some script tuning with various
WAIT 0.4 .. WAIT 2 etc.
Greetz
Dr. Dread _________________ ~~ Alcohol and calculus don't mix... Don't drink and derive! ~~
String.DLL * advanced string processing |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu May 09, 2002 10:59 am Post subject: |
|
|
Hiya Dread,
It seems to be "undocumented" for the most part...
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 |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Thu May 09, 2002 12:10 pm Post subject: Re: Post_Past |
|
|
| Dr. Dread wrote: | Nice thinking. A couple of comments:
You have a WAIT parameter for the LIST PASTE command. Did you find that somewhere -
it is not documented, I think. Does it work?
There is and END missing for the "if %%source" line.
Greetz
Dr. Dread |
Look at "Using Lists" in the VDS 4 helpfile:
| Quote: | PASTE causes <list> to be filled with the contents of the Clipboard (as text.)
COPY causes the contents of <list> to be copied to the Clipboard. |
Tommy |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu May 09, 2002 12:27 pm Post subject: |
|
|
Tommy, we were talkin' about the WAIT parameter...
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 |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Thu May 09, 2002 12:53 pm Post subject: |
|
|
Ok, sorry, never mind then
Will it actually have any effect anyway? |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu May 09, 2002 5:53 pm Post subject: |
|
|
Good point Tommy... An extra comma pretty much kills
further execution on a line, so it probably doesn't do
anything on the undocumented commands after all.
In fact, I just replaced Zoltar's list paste,1,wait with
list paste,1,yahoo and got no errors...
Sorry guys.
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 |
|
 |
Zoltar VDS Pirate


Joined: 26 Dec 2001 Posts: 91
|
Posted: Thu May 09, 2002 6:57 pm Post subject: |
|
|
When I write the code
I didn't look at the help file for the wait parameter.
Perhaps in a future version of vds 5  _________________
Zoltar
http://membres.lycos.fr/ |
|
| 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
|
|