APTS 3 Posted September 14, 2015 Report Share Posted September 14, 2015 Really hoping someone can help me with this. I am trying to use various commands in the WindowsCommands.dll but I am running into a problem whenever the Save As dialog opens. The problem is that once the Save As Dialog box opens after clicking the `Download` button on the page, focus then shifts to the Save As dialog and I cannot interact or debug with uBot while the Save As dialog is open. Another problem is that I can only get the Save As dialog to even open if I stop the code immediately after the download line. For example, if I use the following code, the Save As dialog box will open: click(<id="download">,"Left Click","No")stop script But if I don't use `stop script` and instead try to wait for the Save As dialog, it never opens up no matter how long I wait, which means that the WindowsCommands.dll do not work: click(<id="download">,"Left Click","No")wait(10)plugin command("WindowsCommands.dll", "set dialog text", "Save As", "File name:", "blue.pdf")wait(5)plugin command("WindowsCommands.dll", "click dialog button", "Save As", "Save")stop script Any idea what I might be doing wrong? Thanks for your help. Quote Link to post Share on other sites
a2mateit 395 Posted September 15, 2015 Report Share Posted September 15, 2015 Hey Dan, Did you try opening two instances of ubot studio. Click the save as dialog in one, and sniff the info for the save as dialog with the other one using the wizard. Give it a shot, it should work for you. Quote Link to post Share on other sites
APTS 3 Posted September 15, 2015 Author Report Share Posted September 15, 2015 Great idea a2mateit. I hadn't thought of that. I'll give that a shot and let you know how I make out. Quote Link to post Share on other sites
APTS 3 Posted September 15, 2015 Author Report Share Posted September 15, 2015 (edited) Your suggestion to use a 2nd, other instance of uBot allowed me to use the wizard as part of the `Set Active Window` Windows Command, to determine that the required syntax in my case should be: plugin command("WindowsCommands.dll", "set active window", "MyBot_v2 - UBotStudio Professional Edition", "HwndWrapper[uBot Studio.exe;;bb768e52-f762-4e77-8d90-e5f03683bf6e]") I wouldn't have been able to determine the above Parent Class on my own without the help of your suggestion. However, I am still have the same problem I was having before with regard to whether or not the Save As dialog will popup after clicking the Download button. I don't know how else to explain it other than when I use this: click(<id="download">,"Left Click","No")stop script the Save As dialog will appear 4 or 5 seconds after clicking download, but when I use this: click(<id="download">,"Left Click","No") wait(50) plugin command("WindowsCommands.dll", "set active window", "MyBot_v2 - UBotStudio Professional Edition", "HwndWrapper[uBot Studio.exe;;bb768e52-f762-4e77-8d90-e5f03683bf6e]") plugin command("WindowsCommands.dll", "click dialog button", "Save As", "Save") alert("end") stop script the Save As dialog will never appear whether I wait(5), wait(10) or wait(50). Everything just seems to stall while I wait for the time to elapse, and the Save As dialog never appears, which means that the Windows Commands fail. Eventually I receive the confirmation alert that the program has reached the end. Any ideas what I might be doing wrong? Why won't the Save As dialog box open up while uBot is running? Edited September 15, 2015 by APTS Quote Link to post Share on other sites
a2mateit 395 Posted September 16, 2015 Report Share Posted September 16, 2015 I had a similar problem with the controlling the save as dialogs with windows commands. If I remember correctly, it is showing up, you just cannot see it. Try running the commands as if it was there, and it should work. I haven't used the windows commands in a long time, so I could be wrong but I believe it should work.Give it a try 1 Quote Link to post Share on other sites
APTS 3 Posted September 17, 2015 Author Report Share Posted September 17, 2015 Thanks for this comment a2mateit. Just wondering - why is it that you haven't used the windows commands in a long time? Is it because there are newer and better ways of getting the same things done? I'm curious. Quote Link to post Share on other sites
a2mateit 395 Posted September 17, 2015 Report Share Posted September 17, 2015 I wrote some custom code for a client using the windows commands. So it's not something that I use personally on a regular basis. 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.