View Full Version : Web Browser Object help
shelbygt
10-20-2003, 09:01 AM
I want a file to execute after I've been redirected away from the original url in a web browser object. In other words, I click a button that jumps to a page that loads a web page in a web browser object. I then click on a link within that page that redirects me away from the original page. It's at that point I want the file to execute. Any ideas?
TJ_Tigger
10-20-2003, 10:51 AM
Is the web page on the CD or is it located elsewhere? You mention a redirect, if you could tell us where the files are located that will help in formulating an answer. The page changes are they only changes in the WebObject or are they page changes in AMS? Where is the file to be executed located?
Tigg
shelbygt
10-20-2003, 04:24 PM
Sorry, the webpage is on the Internet. The page change is in AMS. The file to be executed is on the CD.
Let me reiterate; From AMS, I click a button that page jumps me from one page to the next. This next page has a web browser object that displays a website. From there, I click a link within the website that redirects me to another website page. It's at that point I want a file to execute from within the distribution folder.
In other words, is there a way to set an action for when the original webpage url is no longer detected as being @ Web Broswer Object X?
It's not mission critical, just wondering if it could be done.
If I understand your question correctly, then it’s easy to do what you want. Double click on your Web Browser object and click on the Actions tab. The list box lets you pick an event. You can select ‘On Title Change’ then ad your code to execute your file.
shelbygt
10-20-2003, 10:27 PM
I already tried that. Doesn't work.
Corey
10-20-2003, 10:37 PM
Any event you add to the On Navigate Complete event of your web browser object will be automatically launched anytime you navigate to a new page in the web browser object.
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
shelbygt
10-20-2003, 10:44 PM
I tried that too. The application launches after it loads the first page. Not after I click a link after it's loaded.
Corey
10-20-2003, 10:48 PM
Create a link, i.e. #worddoc in your web page, and then in the web browser object's On Navigate Complete event insert:
1. A WEB BROWSER OBJECT > GET PROPERTY > URL action to get the URL into a variable.
2. Use a STRING > GET DELIMITED STRING action using # as your delimiter and 1 as your item index. Use the same variable name for the source and destination fields. This truncates your string to contain only the bit you want, i.e. "worddoc".
3. Use an IF statement to discern which link was passed,, i.e. in this case "worddoc" and then launch the appropriate application however you like.
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
Here is a sample project. It starts the Browser at Google. When you go to a different page, it starts Notepad.exe Look at the Page Properties On Initialize event, and the Web Browser’s On Navigation Complete event.
27368-Sample.zip (http://www.indigorose.com/ubbthreads/uploads/27368-Sample.zip)
shelbygt
10-21-2003, 02:23 AM
Here is a sample project. It starts the Browser at Google. When you go to a different page, it starts Notepad.exe Look at the Page Properties On Initialize event, and the Web Browser’s On Navigation Complete event.
Perfect! That did it bro, thanks.
Thank you too Corey. :D
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.