error...i cant find the problem

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Mark Gevry
Pro Scripter
Posts: 63
Joined: Sat Dec 25, 2004 3:23 pm

error...i cant find the problem

Post by Mark Gevry » Sun Jan 02, 2005 4:25 pm

I cant find the problem. Its saying ENDSUB for subroutine video not found!
Dialog>Dialog1
Caption=Blockbuster Search!
Top=251
Width=339
Left=134
Height=212
Label=Welcome to the blockbuster search engine!,56,16
Label=Created by Mark Gevry 2005,80,144
Button=Homepage,16,48,81,33,1
Button=New Releases,16,96,81,33,2
Button=Coming Soon,120,48,75,33,3
Button=Videos,120,96,75,33,4
Button=Seach a Movie,216,48,91,81,5
EndDialog>Dialog1
label>main
show>dialog1,choice
if>choice=1,homepage
if>choice=2,new
if>choice=3,soon
if>choice=4,video
if>choice=5,search
SRT>homepage
VBSTART
Sub OpenPage(URL)
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
IE.navigate URL
End Sub
VBEND
VBRun>OpenPage,www.blockbuster.ca/main.aspx
goto>main
END>homepage



SRT>new
VBSTART
Sub OpenPage(URL)
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
IE.navigate URL
End Sub
VBEND
VBRun>OpenPage,www.blockbuster.ca/movies">movies/default.aspx
END>new



srt>soon
VBSTART
Sub OpenPage(URL)
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
IE.navigate URL
End Sub
VBEND
VBRun>OpenPage,www.blockbuster.ca/movies">movies/coming_soon.aspx
END>soon

srt>video
VBSTART
Sub OpenPage(URL)
Dim IE
Set IE = CreateObject("Internet">InternetExplorer.Application")
IE.visible = 1
IE.navigate URL
End Sub
VBEND
VBRun>OpenPage,www.blockbuster.ca/previously_enjoyed/default.aspx
end>video


srt>search
wait>.5
INPUT>video,Enter the name of a video here!, Enter the name of the video here!
wait>.5
VBSTART
Sub OpenPage(URL)
Dim IE
Set IE = CreateObject("Internet">InternetExplorer.Application")
IE.visible = 1
IE.navigate URL
End Sub
VBEND
wait>.2
VBRun>OpenPage,www.blockbuster.ca/search/search.aspx?search=%video%
end>search

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sun Jan 02, 2005 4:33 pm

Check for trailing spaces after srt>video and end>video lines
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Mark Gevry
Pro Scripter
Posts: 63
Joined: Sat Dec 25, 2004 3:23 pm

Post by Mark Gevry » Sun Jan 02, 2005 6:29 pm

I did. I even used the remove trailing spaces option.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Sun Jan 02, 2005 8:30 pm

I copied your code into a new macro, did Edit/Remove Trailing spaces and then fixed your OpenURL functions to remove the html. No idea why that is there - should just be CreateObject(InternetExplorer.Application) but you have a whole bunch of HTML in there! Anyway, the macro worked perfectly. It might just be the way the code was pasted in to the forum but when I copied from here into a macro there were trailing spaces on all lines. Having removed them and fixing your CreateObject lines your macro worked fine.

However, you can improve it somewhat. You have an identical block of VBScript in each subroutine. This is wasteful and pointless. You only need one. Move one of these to the top of the script and remove them all from the subroutines.

e.g.

VBSTART
Sub OpenURL
bla bla bla
End Sub
VBEND

SRT>One
VBRun>OpenURL,blabla
END>One

SRT>Two
VBRun>OpenURL,blabla
END>Two
MJT Net Support
[email protected]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts