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 


Post_Past

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code
View previous topic :: View next topic  
Author Message
Zoltar
VDS Pirate
VDS Pirate


Joined: 26 Dec 2001
Posts: 91

PostPosted: Wed May 08, 2002 3:44 pm    Post subject: Post_Past Reply with quote

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
View user's profile Send private message Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Thu May 09, 2002 12:35 am    Post subject: Re: Post_Past Reply with quote

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
View user's profile Send private message
Mac
Professional Member
Professional Member


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

PostPosted: Thu May 09, 2002 6:34 am    Post subject: Reply with quote

_____________________________________________________________
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 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
Zoltar
VDS Pirate
VDS Pirate


Joined: 26 Dec 2001
Posts: 91

PostPosted: Thu May 09, 2002 7:37 am    Post subject: Re: Post_Past Reply with quote

Dr. Dread wrote:
There is and END missing for the "if %%source" line.


It's done,
Thanks Dr. Dread and Mac for your comments Wink

_________________
Zoltar


http://membres.lycos.fr/
Back to top
View user's profile Send private message Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Thu May 09, 2002 7:53 am    Post subject: Reply with quote

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
View user's profile Send private message
Mac
Professional Member
Professional Member


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

PostPosted: Thu May 09, 2002 10:59 am    Post subject: Reply with quote

Hiya Dread,

It seems to be "undocumented" for the most part...

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
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Thu May 09, 2002 12:10 pm    Post subject: Re: Post_Past Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Mac
Professional Member
Professional Member


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

PostPosted: Thu May 09, 2002 12:27 pm    Post subject: Reply with quote

Tommy, we were talkin' about the WAIT parameter...

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
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Thu May 09, 2002 12:53 pm    Post subject: Reply with quote

Ok, sorry, never mind then Embarassed

Will it actually have any effect anyway?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mac
Professional Member
Professional Member


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

PostPosted: Thu May 09, 2002 5:53 pm    Post subject: Reply with quote

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. Embarassed

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
Zoltar
VDS Pirate
VDS Pirate


Joined: 26 Dec 2001
Posts: 91

PostPosted: Thu May 09, 2002 6:57 pm    Post subject: Reply with quote

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 Razz

_________________
Zoltar


http://membres.lycos.fr/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code All times are GMT
Page 1 of 1

 
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