stacy 0 Posted February 5, 2015 Report Share Posted February 5, 2015 (edited) Hi, Firstly thanks for all the help people have been very kind, my bots are really coming forward. ( i will share when done free of course. ) Im trying to upload a pdf file hosting on my local computer. When i come to the upload on the site i can click on the relevant buttons but how do i tell ubot to go to a file and select a file? Any help would be greatly appreciated. Thanks Edited February 5, 2015 by stacy Quote Link to post Share on other sites
HelloInsomnia 1103 Posted February 5, 2015 Report Share Posted February 5, 2015 Hi Stacy, change file field is probably the command you want so that there is no file pop up when you use that. Here is an example: navigate("http://ubotsandbox.com/dialog-box.php", "Wait") wait(2) change file field(<id="testbox">, "YOUR PDF HERE") Quote Link to post Share on other sites
stacy 0 Posted February 6, 2015 Author Report Share Posted February 6, 2015 Nick as always that works like a dream. One question about this bit - change file field(<id="testbox">, "YOUR PDF HERE") If i wanted to set it to pull a random pdf from the file how would i do that? This way i dont have to change the bot everytime and reset it. Thanks Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted February 6, 2015 Report Share Posted February 6, 2015 Here is a wayyyy... set(#pdf file oath,$random list item($list from text($get files($special folder("Desktop"),"Yes"),$new line)),"Global")alert($random list item($list from text($get files($special folder("Desktop"),"Yes"),$new line))) In action with above bit... navigate("http://ubotsandbox.com/dialog-box.php","Wait")wait(2)change file field(<id="testbox">,$random list item($list from text($get files($special folder("Desktop"),"Yes"),$new line))) CD Quote Link to post Share on other sites
stacy 0 Posted February 6, 2015 Author Report Share Posted February 6, 2015 Cheers Buddy Quote Link to post Share on other sites
HelloInsomnia 1103 Posted February 6, 2015 Report Share Posted February 6, 2015 Stacy, when you say random do you actually mean random or do you just not want it to be hard coded? I'm going to send you a PM in a minute because I think you may mean the latter. 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.