JohnB 255 Posted April 26, 2011 Report Share Posted April 26, 2011 Ok, so I have been playing with different ways to backup some of my mysql databases without using cron jobs, etc. So I have a script that backs up a particular database. Just go into UBot, navigate to the url and it backs up. Nice and easy. The problem was that it created the backup in the same directory the script was running from, and I wanted it on my local hard drive. SO... The next logical step was to use the $download file command. It works, but it has those annoying dialog boxes, and I really didn't feel like clicking here, save to there, etc. So it occurred to me...the dialog boxes are part of the browser safety integration (and yes, it makes sense to have it that way)...you can't overcome that, it needs to be there. BUT...we have UBot Studio and UBot Studio doesn't NEED to use a browser, does it? So right after the nav command, I placed a $download file command inside a socket compartment (bypasses the browser) and guess what? VOILA! File is on my hard drive! I hope this is useful for you guys! John 1 Quote Link to post Share on other sites
UBotBuddy 331 Posted April 26, 2011 Report Share Posted April 26, 2011 Great post! +1 Quote Link to post Share on other sites
JohnB 255 Posted April 26, 2011 Author Report Share Posted April 26, 2011 Thank you...Thank you! http://learnubot.com/images/bow.gif Quote Link to post Share on other sites
Praney Behl 314 Posted April 26, 2011 Report Share Posted April 26, 2011 But John, Sorry I am missing something here, I am a little confused now. Maybe I didn't come across such a case that using $download command popped a file dialog. I thought using the $download file command never pops up a file dialog, so why use socket for it? If I am not wrong, the file dialog will only pop up if you click on the browser to download the file. Quote Link to post Share on other sites
JohnB 255 Posted April 26, 2011 Author Report Share Posted April 26, 2011 If you need to nav directly to the download, OR click a link, you can bypass the dialog with. In my case the $download was producing a dialog (for my .gz file). technically you shouldn't come across many, but if you do...voila! John Quote Link to post Share on other sites
yodayick 2 Posted August 1, 2011 Report Share Posted August 1, 2011 where can i access a socket compartment? Any example? Quote Link to post Share on other sites
JohnB 255 Posted August 1, 2011 Author Report Share Posted August 1, 2011 Sockets are only available in the pro and dev licenses. John 1 Quote Link to post Share on other sites
The Stryng 0 Posted January 31, 2012 Report Share Posted January 31, 2012 Nice one Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.