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 


Favorites question
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2150
Location: A House

PostPosted: Thu Mar 04, 2004 9:39 pm    Post subject: Reply with quote

There's more to it than just the info you've shown for the .url file. I'll have
to find the example I have here and post it.

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Mar 04, 2004 9:41 pm    Post subject: Reply with quote

I'm sure there is, but I was just explaining the basic structure. I just dragged
one of my favorites links into Notepad and pasted the contents here. Smile

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


Joined: 01 Aug 2002
Posts: 790

PostPosted: Thu Mar 04, 2004 9:43 pm    Post subject: Reply with quote

ok ya all follow what i mean tho right?


hard to explain i'am not that good at explaining ( as you can tell)

_________________
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: Fri Mar 05, 2004 12:54 am    Post subject: Reply with quote

i have been looking at how I.E saves that.....but how would i make vds display it like I.E does? and how would i have vds SAVE a web site url like i.e does? ( like in I.E favorites) its like a Internet Shortcut.


thanks

_________________
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: Fri Mar 05, 2004 4:59 am    Post subject: Reply with quote

any tips on this any one? i can make it save the url name BUT i haven't figure out how to have it save the page name and have the url go with that name Sad


thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Fri Mar 05, 2004 10:44 am    Post subject: Reply with quote

Hi tim6389

I think I can split up your problem into discrete parts:

1. Saving the link in a .URL format
I think that should be easy uisng list commands. LIST SAVEFILE
But the basic question is where from are you trying to save the Favorite ?
From your default browser ? or from a custom browser element on your VDS dialog ? or neither ?
If a custom extension is being used and it has options to return both the title and URL of the site you are viewing.
If from IE then you can use @WINTEXT function Get the title and you can go through the child windows and get the url from the IE address bar Edit.
I think there are several threads discussing that on the forum.

2.URL Groups:
You can save the URL to different folders as IE does - may be under deafault Favorites folder or your custom folder.

3.Displaying the Favorites to the user:
I think a treeview is the best way to go. You can place it on another dialog that canbe shown amd hidden at will.
Other options include a FILELIST element from VDSOBJ DLL . Submenu system (VDSPOPUP DLL ) or Mac's VDSUG DLL (don't know if it has submenus)
When the user clicks at a given file link (be it any of the above) load the file using LIST LOADFILE and parse the contents of the .url file to get the real url and display it where/how ever you want.

Hope this helps some.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sun Mar 07, 2004 3:37 pm    Post subject: Reply with quote

well I have been playing with a few ideas....not going so good Sad have it save the web link is easy BUT having it save the page name and the link that goes with that page is a problem....Sad
_________________
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: Sun Mar 07, 2004 10:01 pm    Post subject: Reply with quote

anyone know how to save the url AND page name?



thanks

_________________
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: Wed Mar 10, 2004 12:42 am    Post subject: Reply with quote

i guess no one knows Sad
_________________
Have a nice day Smile
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Wed Mar 10, 2004 2:08 am    Post subject: Reply with quote

I guess shouldn't be difficult Confused
From where are U obtaining those URL and Title ?
I think U R not clear enough in Ur question bout that
Do U get both of them together ?


Code:
REM I don't know how U R obtaining these
REM Make sure you have both before going
REM through the Routine Below
REM the routine below is very basic you an add more details
REM like icons and stuff.
%%Title = MyCoolWebSite
%%URL = http://myweb.url.com

%%BASEURL = "BASEURL="%%URL
%%URL = "URL="%%URL

LIST CREATE,1
LIST ADD,1,[DEFAULT]
LIST ADD,1,%%BASEURL
LIST ADD,1,[InternetShortcut]
LIST ADD,1,%%URL
LIST SAVEFILE,1,%%Title.url
LIST CLOSE,1
REM reading that file is really simple
REM it's just a ini file!!!
REM You could write also using ini commands
REM if U wish that way!

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Mar 10, 2004 2:22 am    Post subject: Reply with quote

that is the problem how to get that info from a web page?

i mean how to have vds get that info....like if i was to bookmark this page how do i have vds READ the page name in this case " forum.vdsworld.com::post a reply" AND the url whick is "http://forum.vdsworld.com/posting.php?mode=reply&t=2531"

i have made a simple web browser in vds BUT would like to added a favorites fuction to it Smile

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Wed Mar 10, 2004 2:34 am    Post subject: Reply with quote

In VDS U need a extension to place a browser element on the dialog (I guess U R using Pre VDS 5 version) .
If you are using an extension then U need to specify that so people can help more in the particular direction.

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Mar 10, 2004 2:51 am    Post subject: Reply with quote

ahhh kk what dll do i need to make this work? or what vds 5 code would work with this?

yea i just made a layout of a web broswer it don't work yet thought i would see if i could get the favorites to work before i get to far with it....


thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Wed Mar 10, 2004 4:36 am    Post subject: Reply with quote

If you want the Webpage to be displayed on your app's dialog you need a dll - VDS 5 comes with vdsbrw50.dll and in older VDS versions you can go for Marty's vdssurfx.dll. If you are using any of those then my code below won't help. The dlls have built in functions to retrieve the current Title/URL.

This solution is assuming that you are planning viewing the webpage in Internet Explorer to get the URL from and running your app in the "tray" as a TASKICON. You can use Hotkeys (using a dll) to get the Webapge being viewed bookmarked but for now I have added a "Wait 3" for you to click on the IE window soon after starting your script.

Please read the comments carefully - especially about characters forbidden for a file name.

Code:
REM You can keep you app running in the
REM "tray" and have Hotkeys to run it
REM This way user can select a page and
REM then hit your hot key to Bookmark it.
DIRECTORY CHANGE,@PATH(%0)
%%URL = ""
%%TITLE = ""

REM For now in this example
REM Click you browser window immediately after
REM Running this script
WAIT 3
%A = @WINACTIVE(I)
%C = @WINACTIVE(C)
REM Do further search only of it
REM is a IE window
IF @EQUAL(%C,IEFrame)
%%TITLE = @WINTEXT(%A)
REM The user may have chnaged this in his registry
REM needs more work to find that
%%POS = @POS(" - Microsoft Internet Explorer",%%TITLE)
%%TITLE = @SUBSTR(%%TITLE,1,%%POS)
%%C1 = @WINDOW(%A,CHILD)
%%C2 = @WINDOW(%%C1,CHILD)
%%C3 = @WINDOW(%%C2,CHILD)
%%timeout = 0
%%C4 = %%C3
 repeat
 if @equal(@winclass(%%C4),ComboBoxEx32)
 %%counter = 1
 else
 %%timeout = @sum(%%timeout,1)
 %%C4 = @WINDOW(%%C4,NEXT)
    if @greater(%%timeout,10)
    %%counter = 1
    end
 end
 until @equal(%%counter,1)
%%timeout = 0
%%counter = 0
%%C5 = @WINDOW(%%C4,CHILD)
 repeat
 if @equal(@winclass(%%C5),ComboBox)
 %%counter = 1
 else
 %%timeout = @sum(%%timeout,1)
 %%C5 = @WINDOW(%%C5,NEXT)
    if @greater(%%timeout,5)
    %%counter = 1
    end
 end
 until @equal(%%counter,1)
%%URL = @WINTEXT(@WINDOW(%%C5,CHILD))
INFO Title is: @CR()%%TITLE@CR()@CR()URL is: @CR()%%URL
REM Now savw our URL as a .url file
%%BASEURL = "BASEURL="%%URL
%%URL = "URL="%%URL
LIST CREATE,1
LIST ADD,1,[DEFAULT]
LIST ADD,1,%%BASEURL
LIST ADD,1,[InternetShortcut]
LIST ADD,1,%%URL
REM SAVEFILE will fail if file name has
REM unpermissible characters like
REM / \ ? * " : < > |
REM so you need to trim them out
REM you can use string dll by Dr Dread
REM OR use VDS itself to replace these by space etc
LIST SAVEFILE,1,%%TITLE.url
LIST CLOSE,1
REM reading that file is really simple
REM it's just a ini file!!!
ELSE
Warn We could not find your Active Browser window!@CR() or It is not Internet Explorer!
END

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Wed Mar 10, 2004 5:31 am    Post subject: Reply with quote

ok cool thanks for the help will play with that dll to


thanks again

_________________
Have a nice day Smile
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 Previous  1, 2, 3  Next
Page 2 of 3

 
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