Jump to content
UBot Underground

UBotDev

Fellow UBotter
  • Content Count

    1360
  • Joined

  • Last visited

  • Days Won

    65

Posts posted by UBotDev

  1. Please remember, the plugin or selenium doesn't change the behavior of chrome and firefox!

    If you can do it natively with Chrome or firefox, we might be able to automate it.

     

    So please tell me how you would archive this with just chrome or ff and I can look into adding it as a command.

     

    PS: I can also wrap a JS command into a ExBrowser command.

     

    Kindest regards

    Dan

     

    I haven't found a way around, I have to wait for the page to load, and then run javascript to stop the player.

     

    Is there a way to NOT wait for navigate command to completely load the page, but wait for that with "wait for" command? (I know selenium has an implicitly_wait wait option, is that one enabled?)

  2. Is there a command to prevent flash in browsers or somehow disable video before page loads?

    Navigate command seems to be active all the time until the page is fully loaded, so removing video after that is kind of late...

     

     

    Edit: I've hidden the video by using JavaScript.

     

    It would be really nice if you would give is control over waiting for the page to load (if selenium allows that, don't remember), instead of "navigate" command doing that for us.

  3. I figured out that the problem was in this command:

    plugin command("Advanced Ubot.dll", "config ui html panel", "True", "False", 0, 230)
    
    

    If I change Width to NaN the UI works, so width = 0 seems to be problematic (although it worked with one of the previous versions of the plugin).

  4. Move my command all out "on load".

    And try single digit increments command.

    Then tell me about the command name at issue.

     

    or send me you code.

     

    There are only 2 commands inside on load:

    -determine window size min/max

    -splash screen

     

    Removed both of them and same happens. I've noticed that UI dissapears after I start the bot in v4 and v5 compiled bot, but it seems to work in UBot Studio v5. Becasue it happens in both I guess it's a plugin fault. Will now check other commands that get ran when I start it...

     

    Edit:I think it's actually some of the HTML code inside UI that causes it (it only happens if bot is started via UI button, works when starting it with Run button)... (although it worked before I added the plugin in both, v4 and v5). Am looking further....

     

    Edit2: Was able to exclude this plugin as a problem, looks like it could be ubot. 

     

    Thanks again for all the support.

  5. 5555+ It's a program error Ubot Studio.

    Not from my plugin

    I found this at the same moment on this.

    I know, seems like it's working now.

     

    I've noticed that the code doesn't load only for Chrome 39, but works OK with 21 (I only noticed that ubot's "splash page" doesn't load). I'm able to load other source codes, so I first thought it's this plugin, but I guess it may also be anything else. Will have to research this and come back later.

     

    Thanks for your fast replies/support.

  6. Yes. work on v5

     

    Sign up for File plug-in and license. "http://ubotplugin.com/my-account/"

    Unable to log in, click on "Lost your password?".

    Thanks. was able to retrieve credentials, login and download.

     

    However, I'm still having some problems opening the code in UBot v5, it just freezes and never loads the code while it works in v4. While I call this plugin from "on load" I think it may be this plugin that's preventing it to open. Any idea why would that happen? I hoped that update will help but it didn't.

  7. Forgot to post this yesterday, another bug discovered by Darryl (where Ubot variable didn't get updated on applying text/background color) was fixed so the code was updated again (for those already using it make sure you have the latest one).

     

     

    "New Document", "Undo" and"Redo" is work for me so far. Maybe onething, that everbody need is that tinymce can builtin with spintax editor this is a bit chalange :D

    Are you sure it worked? I'm pretty sure it didn't during my testing... It could be that you've used the latest version where that was fixed. Anyway, it works now, so it doesn't really matter.

  8. You have quite a lot of "bugs" in your code.

     

    1st: You are not initializing UBot variable #row, so it would most likely have a blank value.

    2nd: You only need to load table once, therefore you shouldn't have it in a loop.

    3rd: To pull login details you need to tell from which row, but you are always using row 0 (you have number zero hard-coded)

    4th: You are always setting table column 0 to value "", meaning that #login variable would have the same value, "".

     

    So here is the fixed code:

    clear table(&Accounts)
    create table from file("C:\\Users\\Peter\\Desktop\\Accounts.csv", &Accounts)
    set(#row, 0, "Global")
    loop(5) {
        set(#Login, $table cell(&Accounts, #row, 0), "Global")
        set(#Password, $table cell(&Accounts, #row, 1), "Global")
        alert("{#Login}{#Password}")
        increment(#row)
    }
    
    
  9. Most likely the code for that would be different for every page; so for which page you need that?

     

    Usually you would use "scrape attribute" command to store URL in a variable, then check if it was scraped successfully and after that add it to the table.

  10. "TINYMCE CONTENT SET" set is used because "run javascript" command won't update the UI, it only works with the browser. To solve that "onchange" event is hooked up on textarea which is also associated with UBot variable that's used inside "TINYMCE CONTENT SET" command, so every time variable is changed editors content gets updated.

     

    Hope that explains it.

    • Like 1
  11. MORE TINYMCE FEATURES BUGFIX + CELANUP:

    I've got some time today so I've updated the snippet to support more TinyMCE features (thanks to dyvel for providing that part).

    The code that he shared has some small bugs (UBot variable was not updated when user clicked "New Document", "Undo" and"Redo"), that's why make sure to check the updated code in my initial response or on my blog: http://ubotdev.com/snippet-tinymce-wysiwyg-editor-implementation

     

    I've tested most of the buttons/menu items and I think it works OK now; if you find any problems let me know.

     

    P.S.: jbsgroup...you are getting a bit off-topic here...maybe open a new thread for that?

    • Like 1
  12. I'm trying to $eval something but the variable i Set remains empty.

     

    Now when i even try a simple math it doesn't do antyhing.

    set(#test, $eval($subtract(7, 3)), "Global")
    

    Using uBot 4.2.20

     

    -. I enabled/disabled JS, both don't work

    -. I restarted uBot and tried into a new script, don't work.

     

    Does anyone experience the same issue????

    As you figured out you don't need eval there, but pftg4 still has a point.

     

     

    you are navigating to a site that has javascript installed first because you can only use javascript after that just an fyi

     

    Right, you need to have JavaScript/JQuery loaded in browser for $eval command to work, else it will jsut return a blank string.

    • Like 1
  13. Hi UBotDev many thanks for it, but I still have one question how we add more function in the editor like:

     

    I don't think that you showed the screenshot of TinyMCE...but while the snippet I use used TinyMCE, you are limited to that one. You can still modify it a bit to fit your needs, check the options on their page: http://www.tinymce.com/

     

    If you don't like TinyMCE, the snippet should give you an idea about how to implement other WYSIWYG editors...

     

    Hope that helps.

    • Like 1
  14. I've noticed that you struggle here so I decided to publish a snippet that I use (using TinyMCE WYSIWYG Editor): 

    http://ubotdev.com/snippet-tinymce-wysiwyg-editor-implementation

     

     

    Hope you like it. ;)

    ui html panel("<textarea style=\"height:250px;\" class=\"wysiwyg\" id=\"wysiwyg\" variable=\"#TINYMCE Content Set\" fillwith=\"value\" onchange=\"tinymce.get(\'wysiwyg\').setContent(this.value);\"></textarea>
    <script src=\"http://tinymce.cachefly.net/4.1/tinymce.min.js\"></script>
    <script>
        //name of UBot variable that will hold TinyMCE content
        var variableName = \'#TINYMCE Content\';    
        
        tinymce.init(\{
            selector:\'textarea.wysiwyg\',
            menubar: true,
            toolbar_items_size: \'medium\',
            toolbar1: \"newdocument | undo redo | bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | outdent indent blockquote | bullist numlist | link unlink anchor | image media | code | insertdatetime preview | forecolor backcolor | hr removeformat | subscript superscript | charmap emoticons | cut copy paste | searchreplace | print fullscreen \",
            
            plugins: [
                \"link image lists charmap print preview hr anchor\",
                \"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking\",
                \"table contextmenu emoticons textcolor paste textcolor colorpicker textpattern\"
            ],          
    
            setup : function(editor) \{
                editor.on(\"change\", function(editor, e) \{
                    updateUBotVariable(variableName);
                \});
                
                editor.on(\"keyup\", function(editor, e) \{
                    updateUBotVariable(variableName);
                \});
                
                //updates UBot variable when \"File->New Document\" is clicked
                editor.on(\"init\", function(editor, e) \{
                    updateUBotVariable(variableName);
                \});
                
                editor.on(\"undo\", function(editor, e) \{
                    updateUBotVariable(variableName);
                \});
                
                editor.on(\"redo\", function(editor, e) \{
                    updateUBotVariable(variableName);
                \});
                
                //updates UBot variable when text color is changed
                editor.on(\"nodeChange\", function(editor, e) \{
                    updateUBotVariable(variableName);
                \});
            \}
        \});            
    </script>
    <script>
        function updateUBotVariable(variable)\{
            ubot.settingChanged(variable, tinyMCE.activeEditor.getContent());
        \}
    </script>", 400)
    define TINYMCE CONTENT SET(#DEF Content) {
        set(#TINYMCE Content Set, "", "Global")
        wait(0.1)
        set(#TINYMCE Content Set, #DEF Content, "Global")
        set(#TINYMCE Content, #DEF Content, "Global")
    }
    
    
    • Like 3
×
×
  • Create New...