Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
Simon
- VIP Livecode Opensource Backer

- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
Post
by Simon » Fri Feb 01, 2013 9:17 pm
Hi alemrantareq,
Actually you just have to give us the real URL to the file.
I'm sure I can think of a name of a file that's not there
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
alemrantareq
- Posts: 203
- Joined: Wed Jul 23, 2008 8:46 am
Post
by alemrantareq » Sat Feb 02, 2013 9:20 pm
Simon wrote:Hi alemrantareq,
Actually you just have to give us the real URL to the file.
I'm sure I can think of a name of a file that's not there
Simon
Nope, the file exists in the server. If I put the file url in IDM, it downloads the file successfully. But I can't catch the file through rev
Is there any way to call IDM & post the url in IDM to download the file automatically? I'm talking abt auto script !! I wonder if its really possible for rev

-
Simon
- VIP Livecode Opensource Backer

- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
Post
by Simon » Sat Feb 02, 2013 10:45 pm
I think you misunderstood me:
Code: Select all
put URL "http://mysiteurl.com/file.rar" into myData
put the result into rslt
if rslt is empty then
answer "Found"
else
answer "Not Found"
end if
Works fine on my server, if the file is there it says Found, if the file is not there it says Not Found.
Of course I use a URL towards my server.
What I was asking was for you to post your real URL (Not
http://mysiteurl.com/) so that we could test what the feedback was from your server.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
Steve Denney
- Posts: 101
- Joined: Wed Dec 22, 2010 8:17 pm
Post
by Steve Denney » Sun Feb 03, 2013 5:17 am
You only want to check for files on one server, right?
So the file will either be there or you'll get whatever page you get at that website when there's a file not found.
You almost had it with...
Instead test for the opposite, test for html from the failure page.
Like this...
put URL "
http://thesiteurl.com/bogusfile.pox" into msg
This will give you the html for the failure page.
Then use some string from that failure page to do your test.
Code: Select all
put URL "http://thesiteurl.com/file.rar" into myData
if theFailString is in myData then
exit to top // or whatever, it's a fail
else
//download as planned
end if
Can't see why this won't work

-
alemrantareq
- Posts: 203
- Joined: Wed Jul 23, 2008 8:46 am
Post
by alemrantareq » Wed Feb 27, 2013 7:32 am
Well guys, thanks a lot for the replies. I've tried all the codes that you suggested; but my bad, I always get the same result whether the file exists or not.
Here I give a link that exists on the server -
Code: Select all
http://www.kassio.altervista.org/jdscript_a/JD-17-2-2013.zip
And here is a link that doesn't exist on the server -
Code: Select all
http://www.kassio.altervista.org/jdscript_a/JD-18-2-2013.zip
Now can anyone help me to get the msg of real file existance? replies will b most appreciated

-
alemrantareq
- Posts: 203
- Joined: Wed Jul 23, 2008 8:46 am
Post
by alemrantareq » Wed Feb 27, 2013 8:18 am
Did you check the link with IDM? It starts the download immediately both in IDM & in my browsers !!! If your browser doesn't integrated with IDM, then the link wont work.
-
Simon
- VIP Livecode Opensource Backer

- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
Post
by Simon » Wed Feb 27, 2013 8:23 am
Do you have a plugin for that site?
What is IDM? Do you mean IDE?
I tried it in the IDE and it did not work.
It correctly downloads the download page but not the file!
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
Simon
- VIP Livecode Opensource Backer

- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
Post
by Simon » Wed Feb 27, 2013 8:44 am
Here to help you understand try this:
Code: Select all
on mouseUp
put URL "http://www.philmrev.on-rev.com/dragon.png" into myData
put the result into rslt
if rslt is empty then
answer "Found"
else
answer "Not Found"
end if
end mouseUp
Then try
http://www.philmrev.on-rev.com/dragon.png in a browser, you will see the picture not a different page.
Try "
http://www.philmrev.on-rev.com/dragon_file_not_here.png" in the above mouseUp handler you will see that you get a 404 and the file is not found.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
alemrantareq
- Posts: 203
- Joined: Wed Jul 23, 2008 8:46 am
Post
by alemrantareq » Wed Feb 27, 2013 9:03 am
Yes bro, your code works for other files perfectly. But I actually want to download from that server. IDM = Internet Download Manager. I think that server uses a javascript to download the file which can be caught by IDM perfectly.
-
Simon
- VIP Livecode Opensource Backer

- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
Post
by Simon » Wed Feb 27, 2013 9:10 am
Would have helped here if you mentioned that you were using a 3rd party product to download.
"put url" only grabs the file at the given url not implement a downloader.
It wont work in your application.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
-
sturgis
- Livecode Opensource Backer

- Posts: 1685
- Joined: Sat Feb 28, 2009 11:49 pm
Post
by sturgis » Wed Feb 27, 2013 3:45 pm
Might try starting up a hidden revbrowser instance, point it to the location and see if it will kick in the download manager.
If it works you might be able to use the browserdownloadrequest message which will hopefully give you the actual real url to the download (rather than the mangled indirect one they have you use so that the download manager etc can be brought into play)
Hopefully though the download manager will kick in on its own and you can just let it do it's thing. Hopefully any installed IDM plugin will still work through revbrowser.
-
alemrantareq
- Posts: 203
- Joined: Wed Jul 23, 2008 8:46 am
Post
by alemrantareq » Fri Mar 01, 2013 6:31 am
Dear sturgis, thanks for the reply. Well, I never used hidden revbrowser instance and browserdownloadrequest message in any of my past projects. I've gone through the dictionary; but its not sufficient for me to start with. Can you please give me a sample script; so that I can go into deep of it. Thanks

-
sturgis
- Livecode Opensource Backer

- Posts: 1685
- Joined: Sat Feb 28, 2009 11:49 pm
Post
by sturgis » Fri Mar 01, 2013 2:41 pm
You might want to click the resources button on the livecode coolbar, then open up the internet section on the left. Then click on "browser sampler" and download the stack.
You can learn a lot about the revbrowser that way.
Don't have time this morning to give an example but..
In the dictionary look at revbrowseropen, revbrowserclose, browserdocumentcomplete, anything starting with revbrowser
Also look at browserdownloadrequest.. If you receive that message it is possible that the url that is passed in the message is the real download URL so if the download doesn't start automatically you might be able to use that url and manually start your download manager (maybe using launch or shell or even open process) and pass the url to it.
Gotta run, good luck!