Jump to content
UBot Underground

HelloInsomnia

Moderators
  • Content Count

    3168
  • Joined

  • Last visited

  • Days Won

    309

Posts posted by HelloInsomnia

  1. i want the togggle switch metro datagrid to be like this but im not able to do add this in the final ubot LOAD XAML UI.

    In that it ends up looking like another toggle switch, like the one you show in the training video.

     

    this is the code i used and although in xaml UI it shows exactly like this the windows 10 style toggle switch like the link of mahaapps below, in the final UI inside Uobt it shows like , like the one you show in the training video.which is the normal toggle switch and not windows 10 stylr

     

                                            <StackPanel Grid.Column="0" Margin="220,120,0,0" Height="167" VerticalAlignment="Top">

                                                <Controls:ToggleSwitch  x:Name="metroProgressBar" Header="Toggle Switch Sample"

                        

                         VerticalAlignment="Stretch"/>

                                            </StackPanel>

     

     

     

    https://mahapps.com/docs/controls/toggleswitch

     

    The new version looks like that but updating would break things for everyone so I'll have to see if there is another way.

  2. Update v 1.15 - over 7,000+ icons added

     

    Added

    • Material Icons
    • FontAwesome Icons
    • Modern Icons
    • Metro Demo With Icons demo project
    Fixed
    • Metro Demo Project change static resources to dynamic
    • Metro Demo Project fix issue with load xaml

     

    How To Use Icons

     

    In your VS project add these packages:

     

    https://www.nuget.org/packages/MahApps.Metro.IconPacks.FontAwesome/

    https://www.nuget.org/packages/MahApps.Metro.IconPacks.Material/

    https://www.nuget.org/packages/MahApps.Metro.IconPacks.Modern/

     

    Then add the following namespaces:

    xmlns:Material="clr-namespace:MahApps.Metro.IconPacks;assembly=MahApps.Metro.IconPacks.Material"
    xmlns:FontAwesome="clr-namespace:MahApps.Metro.IconPacks;assembly=MahApps.Metro.IconPacks.FontAwesome"
    xmlns:Modern="clr-namespace:MahApps.Metro.IconPacks;assembly=MahApps.Metro.IconPacks.Modern"
    

    Now you can use icons in the following way:

    <Material:PackIconMaterial Kind="Account" />
    <Modern:PackIconModern Kind="User" />
    <FontAwesome:PackIconFontAwesome Kind="UserSolid" />
  3. Awesome! Just what I was looking for.

     

    But I do have another question;

     

    If I were to open up the software in Incognito Mode, by simply using the CMD and typing in- software.exe /hide - How would I make a define run at the start?

     

    Thanks!

     

    It just runs the first tab code, so if you have defined some code in another tab then you would call that from the first tab by going to custom commands and dragging the node out. When it runs incognito its as if the user opened it into the first tab and pressed the Run button.

    • Like 1
  4. Actually I directly use "Table to Datagrid" command without using "UI Add DataGrid Row" (adding row command seems to work slow, isn't it?).

     

    So I first add new lines to the list of items(which is stroed in a #var), then convert the #var to a list, and add that list as a column to the table, then convert the table to the datagrid. it works but I'll miss those new lines in the datagrid.

     

    Can you post some code that is always helpful to replicate an issue.

  5. Nick,

    Can I have multi-line cells in datagrid? If yes, how should I do that?

    Thanks

     

    I think this is what you mean:

     

    plugin command("UltimateUI.dll", "UI Load XAML", "<DataGrid x:Name=\"dg\"/>", "False", "False", "False", "BaseLight", "Blue")
    plugin command("UltimateUI.dll", "UI Initialize DataGrid", "dg", "{$plugin function("UltimateUI.dll", "$UI Add DataGrid Text Column", "Name")}{$plugin function("UltimateUI.dll", "$UI Add DataGrid Text Column", "Age")}", 16, "Arial", "", "")
    plugin command("UltimateUI.dll", "UI Add DataGrid Row", "dg", "{$plugin function("UltimateUI.dll", "$UI DataGrid Text Cell", "Bob", "", "Arial", 12, "", "", "Center", "Center")}{$plugin function("UltimateUI.dll", "$UI DataGrid Text Cell", 36, "", "Arial", 12, "", "", "Center", "Center")}")
    plugin command("UltimateUI.dll", "UI Add DataGrid Row", "dg", "{$plugin function("UltimateUI.dll", "$UI DataGrid Text Cell", "Jane
    Steve", "", "Arial", 12, "", "", "Center", "Center")}{$plugin function("UltimateUI.dll", "$UI DataGrid Text Cell", 29, "", "Arial", 12, "", "", "Center", "Center")}")
    plugin command("UltimateUI.dll", "UI Add DataGrid Row", "dg", "{$plugin function("UltimateUI.dll", "$UI DataGrid Text Cell", "Taylor", "", "Arial", 12, "", "", "Center", "Center")}{$plugin function("UltimateUI.dll", "$UI DataGrid Text Cell", 22, "", "Arial", 12, "", "", "Center", "Center")}")
    plugin command("UltimateUI.dll", "UI Add DataGrid Row", "dg", "{$plugin function("UltimateUI.dll", "$UI DataGrid Text Cell", "Joe", "", "Arial", 12, "", "", "Center", "Center")}{$plugin function("UltimateUI.dll", "$UI DataGrid Text Cell", 41, "", "Arial", 12, "", "", "Center", "Center")}")
  6.  

    Update V 1.14

     

    Added

    • Padding, Font Family, Font Size, Foreground, Background, Horizontal Alignment, Vertical Alignment parameters to Table To DataGrid
    Fixed
    • Bug where Change DataGrid Text Cell would throw an error when using Table To DataGrid
    • Removed extra space at bottom of DataGrid
    Breaking Changes
    • Table To DataGrid has added properties which will break that command so you will need to update it
  7. Update V 1.13

     

    Added
    • Padding, Font Family, Font Size, Foreground, Background, Horizontal Alignment, Vertical Alignment parameters to Change DataGrid Text Cell
    • Max Width, Max Height, Horizontal Alignment, Vertical Alignment parameters to Change DataGrid Image Cell
    • Padding, Font Family, Font Size, Foreground, Background, Horizontal Alignment, Vertical Alignment parameters to Change DataGrid Button Cell
    Breaking Changes
    • Rename: Change DataGrid Button Cell Value -> Change DataGrid Button Cell
    • Rename: Change DataGrid CheckBox Cell Value -> Change DataGrid CheckBox Cell
    • Rename: Change DataGrid Image Cell Value -> Change DataGrid Image Cell
    • Rename: Change DataGrid Text Cell Value -> Change DataGrid Text Cell

     

    Note: these names provide better longevity to the software and flexibility to change more than just the values of the cells.

    • Like 2
  8. Somebody was asking about the TreeView commands, they work the same as most of the others but here is a brief example of some of them:

    plugin command("UltimateUI.dll", "UI Load XAML", "<TreeView Name=\"myTreeViewEvent\">
                <TreeViewItem Header=\"Employee1\" x:Name=\"emp1\">
                    <TreeViewItem Header=\"Jesper Aaberg\" x:Name=\"jesper\" />
                    <TreeViewItem Header=\"Employee Number\">
                        <TreeViewItem Header=\"12345\" />
                    </TreeViewItem>
                    <TreeViewItem Header=\"Work Days\">
                        <TreeViewItem Header=\"Monday\" />
                        <TreeViewItem Header=\"Tuesday\" />
                        <TreeViewItem Header=\"Thursday\" />
                    </TreeViewItem>
                </TreeViewItem>            
            </TreeView>", "False", "False", "False", "BaseLight", "Blue")
    plugin command("UltimateUI.dll", "UI Add TreeViewItem Event", "Expanded", "emp1", "Expanded")
    plugin command("UltimateUI.dll", "UI Add TreeViewItem Event", "Collapsed", "emp1", "Collapsed")
    alert("expanding")
    wait(0.5)
    plugin command("UltimateUI.dll", "UI Set TreeViewItem Property", "IsExpanded", "emp1", "true")
    define Expanded {
        alert("{$plugin function("UltimateUI.dll", "$UI Get TreeViewItem Property", "Header", "emp1")} expanded")
    }
    define Collapsed {
        alert("{$plugin function("UltimateUI.dll", "$UI Get TreeViewItem Property", "Header", "emp1")} collapsed")
    }
    • Like 1
  9. Update V 1.11

     

    Added
    • Change DataGrid Text Cell Value
    • Change DataGrid Image Cell Value
    • Change DataGrid Button Cell Value
    • Add DataGrid Header Click Event

    The ability to run a command when the datagrid header is clicked means that you can implement a sorting algorithm for the datagrid. In the UltimateUI Demo folder that comes with the plugin you will see DataGrid With Sort Example to see a basic example of how to use Add DataGrid Header Click Event and sort a table.

    • Like 1
  10. Hi Nick,

     

    Could you post some sample code on how to change UI buttons appearance on hover? I can set the buttons background color and border with something like:

    <Border Padding="8">
         <Border.Resources>
            <Style TargetType="{x:Type Button}">
                    <Setter Property="Background" Value="#181818" />
                    <Setter Property="BorderBrush" Value="#181818" />
                    <Setter Property="Foreground" Value="#B3B5B1" />
              </Style>
         </Border.Resources>
    </Border>
    

    However, when I add some code like:

    <Style.Triggers>
       <Trigger Property="IsMouseOver" Value="True">
            <Setter Property="Background" Value="#FFF" />
            <Setter Property="BorderBrush"  Value="#FFF"/>
       </Trigger>
    </Style.Triggers>
    

    In between the <Style> tags it doesn't take effect - the default styling still applies to the hover state.

     

    Could you point me in the right direction on how to customize WPF elements on different states (such as hover)?

     

    Would be much appreciated. Thanks in advance!

     

    Yes probably something like this:

     

    <Grid>
            <Grid.Resources>
                <Style x:Key="FocusVisual">
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
                <SolidColorBrush x:Key="Button.Static.Background" Color="#FF181818"/>
                <SolidColorBrush x:Key="Button.Static.Border" Color="#FF181818"/>
                <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFFFFFFF"/>
                <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FFFFFFFF"/>
                <SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
                <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
                <SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
                <SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
                <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
                <Style x:Key="CustomButton" TargetType="{x:Type Button}">
                    <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
                    <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
                    <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
                    <Setter Property="Foreground" Value="#FFB3B5B1"/>
                    <Setter Property="BorderThickness" Value="1"/>
                    <Setter Property="HorizontalContentAlignment" Value="Center"/>
                    <Setter Property="VerticalContentAlignment" Value="Center"/>
                    <Setter Property="Padding" Value="1"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type Button}">
                                <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
                                    <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                </Border>
                                <ControlTemplate.Triggers>
                                    <Trigger Property="IsDefaulted" Value="true">
                                        <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
                                    </Trigger>
                                    <Trigger Property="IsMouseOver" Value="true">
                                        <Setter Property="Background" TargetName="border" Value="{StaticResource Button.MouseOver.Background}"/>
                                        <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.MouseOver.Border}"/>
                                    </Trigger>
                                    <Trigger Property="IsPressed" Value="true">
                                        <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Pressed.Background}"/>
                                        <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Pressed.Border}"/>
                                    </Trigger>
                                    <Trigger Property="IsEnabled" Value="false">
                                        <Setter Property="Background" TargetName="border" Value="{StaticResource Button.Disabled.Background}"/>
                                        <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource Button.Disabled.Border}"/>
                                        <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
                                    </Trigger>
                                </ControlTemplate.Triggers>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Grid.Resources>
            <Button Content="Your Content" Style="{DynamicResource CustomButton}"/>
        </Grid>

    And I know probably what that looks like

     

    giphy.gif

     

    But here is the EASY way to do it:

     

    1. Go into Visual Studio (probably Blend would work too)

    2. Make a normal button

    3. In the visual designer right click on the button then go to Edit Template-> Edit a Copy

    4. Place it in the relevant resources section (e.g. in the top level grid if you want to use it everywhere)

    5. Use the name wherever you want it, e.g. Template="{DynamicResource CustomButton}"

     

    Note: I added FF in front of the 6 letter/number color code just because in the template that is the format that use. 

     

    Note: You may want to change the IsPressed, etc as well to make it look better.

    • Like 1
  11. Easiest way is to use xpath, there is a free plugin with an xpath parser here: https://network.ubotstudio.com/forum/index.php/topic/20002-free-heopas-custom-plugin-thread-lock-sqlite-thread-variables-email-ini-clipboard/

     

    I know xpath is just one more thing to learn but its worth it considering many sites will be tricky (at best) to parse using the built in selectors.

     

    One thing you can do in Chrome is right click -> inspect on the element you want. Be sure its highlighted in the element inspector in dev tools and then right click -> copy -> copy xpath. This will give you the xpath for this particular element. In this case you probably want a list and so it wouldn't help much but sometimes that can work.

     

    Here is a pure Ubot example:

    add list to list(%urls,$scrape attribute($element child(<class="r">),"href"),"Delete","Global")
    

    And using xpath instead:

    add list to list(%urls,$plugin function("HeopasCustom.dll", "$Heopas Xpath Parser", $document text, "//div[@class=\'r\']/a", "href", ""),"Delete","Global")
×
×
  • Create New...