Jump to content



HelloInsomnia

Member Since 10 Apr 2012
Offline Last Active Today, 02:20 PM
*****

#140444 Launching Ubot Tab Code, From Another Tab?

Posted by HelloInsomnia on 10 September 2020 - 12:43 PM

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.




#140439 Launching Ubot Tab Code, From Another Tab?

Posted by HelloInsomnia on 08 September 2020 - 01:58 PM

Put the code to run into a define: http://wiki.ubotstudio.com/wiki/Define




#140271 Ultimate Ui - Create Beautiful Uis With Xaml, Datagrid, Metro & More!

Posted by HelloInsomnia on 02 July 2020 - 01:28 PM

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.




#140270 Ultimate Ui - Create Beautiful Uis With Xaml, Datagrid, Metro & More!

Posted by HelloInsomnia on 02 July 2020 - 12:33 PM

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")
}



#140263 Ultimate Ui - Create Beautiful Uis With Xaml, Datagrid, Metro & More!

Posted by HelloInsomnia on 24 June 2020 - 02:03 PM

Update V 1.12

 

Added
  • Change DataGrid CheckBox Cell Value
  • Set TreeViewItem Property
  • Get TreeViewItem Property
  • Add TreeViewItem Event



#140244 Ultimate Ui - Create Beautiful Uis With Xaml, Datagrid, Metro & More!

Posted by HelloInsomnia on 17 June 2020 - 10:19 AM

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.




#140207 Change Default Starting Site To Some Other Site In Compiled Bot

Posted by HelloInsomnia on 04 June 2020 - 10:51 AM

Not sure whats in the community edition but you can also use the on load command if its in there:

on load("Bot Loaded") {
    navigate("https://www.reddit.com/","Wait")
}



#140137 Ultimate Ui - Create Beautiful Uis With Xaml, Datagrid, Metro & More!

Posted by HelloInsomnia on 09 May 2020 - 09:27 PM

Edit: I had Metro on in the previous version (which would work too) - so this is for a normal button




#140133 Ultimate Ui - Create Beautiful Uis With Xaml, Datagrid, Metro & More!

Posted by HelloInsomnia on 09 May 2020 - 12:28 PM

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.




#139987 Flow Explanation?

Posted by HelloInsomnia on 14 April 2020 - 11:05 AM

From the link Pash provided to the wiki page: "The UI stat monitor is a live command, and it is always checking the value of the variable, list item or table cell assigned to it."




#139985 Problem Ubot Update

Posted by HelloInsomnia on 14 April 2020 - 10:39 AM

IIRC this just happens the first time, if you restart Ubot the Gmail/Trello stuff should work fine.

 

But regardless since you are getting an error you can report it in the tracker: http://tracker.ubotstudio.com/




#139960 Expression To Delete Everything In Txt From X To Y ?

Posted by HelloInsomnia on 09 April 2020 - 12:14 PM

You probably want this then:

set(#article,$replace regular expression("Title:
Bald Heads

Word Count:
253

Summary:
Over the ages, baldness has been considered a disease. Lately, it has also been followed as a fashion. However, greater numbers of people still feel that a head covered by hair is always more attractive than a bald one.


Keywords:
Bald, Bald Heads, Bald Women, Bald Men


Article Body:
Here is the article...","(?si)^title.+?body:\\n",""),"Global")



#139953 Expression To Delete Everything In Txt From X To Y ?

Posted by HelloInsomnia on 08 April 2020 - 10:11 AM

Replace regular expression using:

(?i)^start.+?status



#139848 Scrape Dokument-Names From A Folder

Posted by HelloInsomnia on 19 March 2020 - 12:02 PM

Here is a function with an example:

 

clear list(%files)
add list to list(%files,$list from text("19-0215458-test.pdf
20-0357896.pdf
20-035789620-035789620-035789620-0357896.pdf",$new line),"Delete","Global")
loop($list total(%files)) {
    set(#file,$next list item(%files),"Global")
    alert($GetFirstTenDigits(#file))
}
define $GetFirstTenDigits(#_text) {
    comment("Get all digits")
    set(#_digits,$replace regular expression(#_text,"[^0-9]+",$nothing),"Local")
    if($comparison($text length(#_digits),"< Less than",11)) {
        then {
            comment("If less than 11 then return")
            return(#_digits)
        }
        else {
            comment("Else return first 10 only")
            return($substring(#_digits,0,10))
        }
    }
}




#139770 Ultimate Ui - Create Beautiful Uis With Xaml, Datagrid, Metro & More!

Posted by HelloInsomnia on 03 March 2020 - 11:22 AM

This is probably closer to what you want:

plugin command("UltimateUI.dll", "UI Load XAML", "<TextBox x:Name=\"Log\" 
                 Height=\"200\" 
                 IsReadOnly=\"True\"
                 VerticalScrollBarVisibility=\"Auto\"/>", "False", "False", "False", "BaseLight", "Blue")
clear list(%log)
loop(20) {
    add item to list(%log,"{$date} - {$random text($rand(30,50))}","Don\'t Delete","Global")
    plugin command("UltimateUI.dll", "UI Set TextBox Property", "Text", "Log", %log)
    wait(1)
}