Jump to content
UBot Underground

How To: Save/download Csv File To Folder


Recommended Posts

I`m having big problems saving CSV files from an online keyword research tool I`m using.

 

I`ve already searched this forum and other sources but nothing helped me.

 

What I want to do:

After a click command on: Download as CSV, the "Save as Dialog" will open. (so far so good)

Now I only need to set a WINDOWS COMMAND -> CLICK DIALOG BUTTON -> INPUT THE CORRECT VALUES....right? Wrong! When I put this command after the Click Command, the Save as Dialog will open but nothing is going to happen from this point on.

 

Please see this video for more details:

https://www.loom.com/share/8f94ea1097f949399c6917790d377130

 

Furthermore I can`t find a command to save files I want to download to a specific folder. Its only possible to save files to a file on the computer....

 

Can somebody help me to solve this problem?

 

 

 

Link to post
Share on other sites

You have a few options here.

 

First and easiest may be using the heopas plugin it's free plugin with clipboard controls.  I noticed you can copy to clipboard.

 

The use 
"create folder" command and $special folder function to save where you want. In the function "Application" is where your bot file is.

 

Windows commands

you can "Tab" through the fields and type the directory needed then hit "Enter".

You may also need to "set active window" first.

 

You cant mess with the keyboard or mouse while running either.

 

Regards,

Nick

Link to post
Share on other sites

plugin command("HeopasCustom.dll", "Heopas Set Clipboard", "one,two,three
four,five,six")
alert($special folder("Application"))
create folder($special folder("Application"),"Data")
save to file("{$special folder("Application")}\\Data\\yourfile.csv",$plugin function("HeopasCustom.dll", "$Heopas Get Clipboard"))

Link to post
Share on other sites

Thanks a lot for your answer and the code Code Dacota!

 

The problem is, that I can`t work with the "copy to clipboard"-function, kwfinder is providing. Everytime I click on it, kwfinder sends me a info which says "can`t copy to clipboard - something went wrong"

 

So I have to download the csv files to a defined folder.

 

Can you describe in more detail how I can  "Tab" through the fields and type the directory needed then hit "Enter".

 

It could also be helpful to me to know how I can setup the "set active window" command. 

 

This command says: "Press the Control Key over the object you wish to click"

 
First Question: Whats the Control Key?
 
Secound Question: How can I use this on the newly open windows window? I think I can`t click or do anything in ubot, when the "save as" window pops up.
 
Thanks
  • Like 1
Link to post
Share on other sites

plugin command("WindowsCommands.dll", "keyboard event", "Tab", "Key Press")
plugin command("WindowsCommands.dll", "keyboard event", "Enter", "Key Press")

They have two drop downs in the command.

One is for the key.

They other is for the action. press, key up and key down

 

if you wish to use more than one key you use key down then ctrl key and s key, then key up all in separate commands.

Link to post
Share on other sites

Thank you so much, finally I got it working, thanks to your code. This is the code I had to add to get the save as dialog saving the file:

 

    plugin command("WindowsCommands.dll", "click dialog button", "Speichern unter", "Speichern")
    plugin command("WindowsCommands.dll", "keyboard event", "Tab", "Key Press")
    plugin command("WindowsCommands.dll", "keyboard event", "Tab", "Key Press")
    plugin command("WindowsCommands.dll", "keyboard event", "Tab", "Key Press")
    plugin command("WindowsCommands.dll", "keyboard event", "Tab", "Key Press")
    plugin command("WindowsCommands.dll", "keyboard event", "Enter", "Key Press")

  • Like 1
Link to post
Share on other sites

I`ve discovered another problem:

 

Since I put all this commands into a loop, the "save as window" will only open, on the last loop.

Example 5 Loops:

First 4 times of the loop: "save as window" will not pop up

5th time of the loop: "save as window" will pop`s up, but only the last csv file (from the 5th run) is going to be saved

 

Example 1 Loop:

"save as window" will pop up

 

Since I have to make at least 100 Loops, how can I trigger the "save-as" pop-up all the time?

Is there something like a break-command I can use?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...