getting a url with variables

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Maurice

getting a url with variables

Post by Maurice » Thu Feb 13, 2003 11:26 am

tHi,

Is it possible to make a script which will recieve a variable URL?

I want to display a website on my computer with some headlines, real time stock etc.

The URL which must be received looks likes this:
http://www.website.com/blabla=200300010000
The digits on the end of the url defines from which time and date you want the information from.
2003 is the year
00 is January, 01 is Februari etc. etc.
01 is the day, so 01 is Monday
0000 is the time.

The script i want to make have to make every hour a the real time url and display it in Internet Explorer.

I hope that you can understand want i am talking about because my english is very well.....sorry!!!

But is there anyone who can help me, a allready finished script is also welcome! :wink:

Thanks

Lumumba

Post by Lumumba » Thu Feb 13, 2003 8:08 pm

Check this out ... worked fine with me :D


Label>LetsGo
VBStart
Function WDay ()
WDay = Weekday(Now(),2)
End Function
VBEND

VBEval>WDay (),DD

Let>NewDD=
Let>NewMM=

Month>MM
Year>YY
Hour>Hour
Let>LastHour=Hour
Min>Min
Let>LastMin=Min

Length>DD,DDL

Sub>MM,1
Length>MM,MML

Label>CheckDD
If>%DDL%>1,CheckMM
ConCat>NewDD,0%DD%

Label>CheckMM
If>%MML%>1,IE
ConCat>NewMM,0%MM%

Label>IE
//Run Program>IExplore http://www.website.com/blabla=%YY%%NewM ... %Hour%%Min%
//Replace the following line with the previous one - after testing
MessageModal>www.website.com/blabla=%YY%%NewMM%%NewDD%%Hour%%Min%

Label>Wait
Message>Last page refresh at:%CRLF%%CRLF%%CRLF% %LastHour%:%LastMin%
Wait>30
Hour>Hour
If>Hour=%LastHour%,Wait,LetsGo

Maurice
Newbie
Posts: 4
Joined: Thu Feb 13, 2003 11:28 am

Post by Maurice » Thu Feb 13, 2003 8:47 pm

Unfortunatelly i am getting the following error:
Compile error Microsoft VBScript : 1002
Syntaxfailure
Line 8, Colomn 6

Do you know how i can fix this or do you have another example for me?

Thanks,

Maurice

Lumumba

Post by Lumumba » Fri Feb 14, 2003 9:26 am

Hope you are aware about the "copy code from forum" -issue.
Cause the VBCode worked fine before:

please delete the copied VB-Section and write it instead of copying it.
If it works afterwards, you know that there have been "invisible" characters left at the end of each line.

So check each line you've copied for that "invisible" extension.

Maurice
Newbie
Posts: 4
Joined: Thu Feb 13, 2003 11:28 am

Post by Maurice » Fri Feb 14, 2003 9:38 am

Thank you very much, it is working fine!!!!!

I wasn't aware of "copy code from forum" -issue, stupid me...

There were some secret caracters.

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Feb 14, 2003 9:45 am

Hi,

I have edited Lumumba's post so that the spaces are removed from the end of the lines. Now you can copy his code again and it should work.

Please remember when posting code to press the 'Code' button or insert ... surrounding the code.

Marcus
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Maurice
Newbie
Posts: 4
Joined: Thu Feb 13, 2003 11:28 am

Post by Maurice » Fri Feb 14, 2003 9:53 am

Thanks mtettmar.

Lumumba

Post by Lumumba » Fri Feb 14, 2003 5:32 pm

Ooopps,
you can delete the following lines from the code.
I guess we won't get any 2 digit weekday result :roll:


Length>DD,DDL
...

Label>CheckDD
If>%DDL%>1,CheckMM
...

Maurice
Newbie
Posts: 4
Joined: Thu Feb 13, 2003 11:28 am

Post by Maurice » Fri Feb 14, 2003 7:50 pm

You're right!

Thanks

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